Move responsibility of url encoding query parameters to lower level functions which construct and make the call to the API