mirror of
https://github.com/plausible/analytics.git
synced 2024-11-26 00:24:44 +03:00
2f87832532
* 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
14 lines
306 B
Elixir
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
|