google_api_app_state v0.1.0 GoogleApi.AppState.V1.Api.States View Source

API calls for all endpoints tagged States.

Link to this section Summary

Functions

Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch

Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption

Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned

Lists all the states keys, and optionally the state data

Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB

Link to this section Functions

Link to this function appstate_states_clear(connection, state_key, opts \\ []) View Source
appstate_states_clear(Tesla.Env.client(), integer(), keyword()) ::
  {:ok, GoogleApi.AppState.V1.Model.WriteResult.t()} | {:error, Tesla.Env.t()}

Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch.

Parameters

  • connection (GoogleApi.AppState.V1.Connection): Connection to server
  • state_key (integer()): The key for the data to be retrieved.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :currentDataVersion (String.t): The version of the data to be cleared. Version strings are returned by the server.

Returns

{:ok, %GoogleApi.AppState.V1.Model.WriteResult{}} on success {:error, info} on failure

Link to this function appstate_states_delete(connection, state_key, opts \\ []) View Source
appstate_states_delete(Tesla.Env.client(), integer(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Deletes a key and the data associated with it. The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption.

Parameters

  • connection (GoogleApi.AppState.V1.Connection): Connection to server
  • state_key (integer()): The key for the data to be retrieved.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.

Returns

{:ok, %{}} on success {:error, info} on failure

Link to this function appstate_states_get(connection, state_key, opts \\ []) View Source
appstate_states_get(Tesla.Env.client(), integer(), keyword()) ::
  {:ok, GoogleApi.AppState.V1.Model.GetResponse.t()} | {:error, Tesla.Env.t()}

Retrieves the data corresponding to the passed key. If the key does not exist on the server, an HTTP 404 will be returned.

Parameters

  • connection (GoogleApi.AppState.V1.Connection): Connection to server
  • state_key (integer()): The key for the data to be retrieved.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.

Returns

{:ok, %GoogleApi.AppState.V1.Model.GetResponse{}} on success {:error, info} on failure

Link to this function appstate_states_list(connection, opts \\ []) View Source
appstate_states_list(Tesla.Env.client(), keyword()) ::
  {:ok, GoogleApi.AppState.V1.Model.ListResponse.t()} | {:error, Tesla.Env.t()}

Lists all the states keys, and optionally the state data.

Parameters

  • connection (GoogleApi.AppState.V1.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :includeData (boolean()): Whether to include the full data in addition to the version number

Returns

{:ok, %GoogleApi.AppState.V1.Model.ListResponse{}} on success {:error, info} on failure

Link to this function appstate_states_update(connection, state_key, opts \\ []) View Source
appstate_states_update(Tesla.Env.client(), integer(), keyword()) ::
  {:ok, GoogleApi.AppState.V1.Model.WriteResult.t()} | {:error, Tesla.Env.t()}

Update the data associated with the input key if and only if the passed version matches the currently stored version. This method is safe in the face of concurrent writes. Maximum per-key size is 128KB.

Parameters

  • connection (GoogleApi.AppState.V1.Connection): Connection to server
  • state_key (integer()): The key for the data to be retrieved.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :currentStateVersion (String.t): The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter.
    • :body (UpdateRequest):

Returns

{:ok, %GoogleApi.AppState.V1.Model.WriteResult{}} on success {:error, info} on failure