maybe you can move that earlier in the method, and add `?{query}` to `API_URL_TEMPLATE`