removed reptition of _api-method_ search in code. This required adding an api_method parameter to build_url calls in tests.