GoogleSheets

Main starting point of the application and provides functions defining the public client API for the library.

Summary

Returns data stored for the given version_key. If no entry is found, an KeyError exception is raised

Returns {:ok, version_key, data} tuple matching an entry in ETS table for the passed spreadsheet_id, version_key pair

Returns true, if there is an version for for the given spreadsheet_id stored, false otherwise

Returns {version_key, data} for the latest one stored in ETS table

Returns {:ok, version_key, data} where version_key and data are the latest ones found

Returns data where data is the latest one found

Returns {:ok, data} where data is the latest one found

Returns version_key where version_key is the one for latest version stored in ETS table

Returns {:ok, version_key} where version_key is the one for latest version stored in ETS table

Requests the updater process monitoring the given spreadsheet to check for changes immediately

Functions

fetch(version_key)

Returns {:ok, version_key, data} tuple matching an entry in ETS table for the passed spreadsheet_id, version_key pair.

If no version_key is given, the latest stored version is returned.

If no entry is found, :not_found is returned.

fetch!(version_key)

Returns data stored for the given version_key. If no entry is found, an KeyError exception is raised.

has_version?(spreadsheet_id)

Returns true, if there is an version for for the given spreadsheet_id stored, false otherwise.

latest(spreadsheet_id)

Returns {:ok, version_key, data} where version_key and data are the latest ones found.

If no entry is found, :not_found is returned.

latest!(spreadsheet_id)

Returns {version_key, data} for the latest one stored in ETS table.

If no entry is found, an KeyError exception is raised.

latest_data(spreadsheet_id)

Returns {:ok, data} where data is the latest one found.

If no entry is found, :not_found is returned.

latest_data!(spreadsheet_id)

Returns data where data is the latest one found.

If no entry is found, an KeyError exception is raised.

latest_key(spreadsheet_id)

Returns {:ok, version_key} where version_key is the one for latest version stored in ETS table.

If no entry is found, :not_found is returned.

latest_key!(spreadsheet_id)

Returns version_key where version_key is the one for latest version stored in ETS table.

If no entry is found, an KeyError exception is raised.

update(spreadsheet_id, timeout \\ 60000)

Requests the updater process monitoring the given spreadsheet to check for changes immediately.

Return values: {:updated, version_key} - Spreadsheet was updated and stored with the version_key :unchanged - Spreadsheet contents haven't been changed since last update. {:error, reason} - The update failed because of reason.