analytics/test/support/google_api_mock.ex
RobertJoonas 2f87832532
Implement search and pagination in Google Keywords modal (#4378)
* Extend the GSC API with search functionality

* Fix typo in error tuple atom

* log GSC errors

* rename confusing variable name

* Fix the API response format and error handling

* Read results under the `results` key to be consistent with other
  endpoints

* Return errors with a non-200 status code, and with an error payload
  that will be well constructed into ApiError

* rebuild Google Keywords modal with useAPIClient

* Add pagination support in Search Terms API

* delete unused fixture file

* rename fixture files

* fix tests
2024-07-23 11:53:52 +03:00

14 lines
306 B
Elixir

defmodule Plausible.Google.API.Mock do
@moduledoc """
Mock of API to Google services.
"""
def fetch_stats(_auth, _query, _pagination, _search) do
{:ok,
[
%{"name" => "simple web analytics", "count" => 6},
%{"name" => "open-source analytics", "count" => 2}
]}
end
end