GoogleSheets
Main starting point of the application and provides functions defining the public client API for the library.
Summary↑
fetch!(version_key) | Returns data stored for the given version_key. If no entry is found, an KeyError exception is raised |
fetch(version_key) | Returns {:ok, version_key, data} tuple matching an entry in ETS table for the passed spreadsheet_id, version_key pair |
has_version?(spreadsheet_id) | Returns true, if there is an version for for the given spreadsheet_id stored, false otherwise |
latest!(spreadsheet_id) | Returns {version_key, data} for the latest one stored in ETS table |
latest(spreadsheet_id) | Returns {:ok, version_key, data} where version_key and data are the latest ones found |
latest_key!(spreadsheet_id) | Returns version_key where version_key is the one for latest version stored in ETS table |
latest_key(spreadsheet_id) | Returns {:ok, version_key} where version_key is the one for latest version stored in ETS table |
update(spreadsheet_id, timeout \\ 60000) | Requests the updater process monitoring the given spreadsheet to check for changes immediately |
Functions
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.
Returns data stored for the given version_key. If no entry is found, an KeyError exception is raised.
Returns true, if there is an version for for the given spreadsheet_id stored, false otherwise.
Returns {:ok, version_key, data} where version_key and data are the latest ones found.
If no entry is found, :not_found is returned.
Returns {version_key, data} for the latest one stored in ETS table.
If no entry is found, an KeyError exception is raised.
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.
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.
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.