google_api_games v0.0.1 GoogleApi.Games.V1.Api.Achievements View Source

API calls for all endpoints tagged Achievements.

Link to this section Summary

Functions

Increments the steps of the achievement with the given ID for the currently authenticated player

Lists the progress for all your application's achievements for the currently authenticated player

Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player

Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified

Unlocks this achievement for the currently authenticated player

Updates multiple achievements for the currently authenticated player

Link to this section Functions

Link to this function games_achievements_increment(connection, achievement_id, steps_to_increment, opts \\ []) View Source
games_achievements_increment(Tesla.Env.client, String.t, Integer.t, keyword) ::
  {:ok, GoogleApi.Games.V1.Model.AchievementIncrementResponse.t} |
  {:error, Tesla.Env.t}

Increments the steps of the achievement with the given ID for the currently authenticated player.

Parameters

  • connection (GoogleApi.Games.V1.Connection): Connection to server
  • achievement_id (String): The ID of the achievement used by this method.
  • steps_to_increment (Integer): The number of steps to increment.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.
    • :request_id (String): A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.

Returns

{:ok, %GoogleApi.Games.V1.Model.AchievementIncrementResponse{}} on success {:error, info} on failure

Link to this function games_achievements_list(connection, player_id, opts \\ []) View Source
games_achievements_list(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Games.V1.Model.PlayerAchievementListResponse.t} |
  {:error, Tesla.Env.t}

Lists the progress for all your application's achievements for the currently authenticated player.

Parameters

  • connection (GoogleApi.Games.V1.Connection): Connection to server
  • player_id (String): A player ID. A value of me may be used in place of the authenticated player's ID.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.
    • :language (String): The preferred language to use for strings returned by this method.
    • :max_results (Integer): The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults.
    • :page_token (String): The token returned by the previous request.
    • :state (String): Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.

Returns

{:ok, %GoogleApi.Games.V1.Model.PlayerAchievementListResponse{}} on success {:error, info} on failure

Link to this function games_achievements_reveal(connection, achievement_id, opts \\ []) View Source
games_achievements_reveal(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Games.V1.Model.AchievementRevealResponse.t} |
  {:error, Tesla.Env.t}

Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.

Parameters

  • connection (GoogleApi.Games.V1.Connection): Connection to server
  • achievement_id (String): The ID of the achievement used by this method.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.

Returns

{:ok, %GoogleApi.Games.V1.Model.AchievementRevealResponse{}} on success {:error, info} on failure

Link to this function games_achievements_set_steps_at_least(connection, achievement_id, steps, opts \\ []) View Source
games_achievements_set_steps_at_least(Tesla.Env.client, String.t, Integer.t, keyword) ::
  {:ok, GoogleApi.Games.V1.Model.AchievementSetStepsAtLeastResponse.t} |
  {:error, Tesla.Env.t}

Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.

Parameters

  • connection (GoogleApi.Games.V1.Connection): Connection to server
  • achievement_id (String): The ID of the achievement used by this method.
  • steps (Integer): The minimum value to set the steps to.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.

Returns

{:ok, %GoogleApi.Games.V1.Model.AchievementSetStepsAtLeastResponse{}} on success {:error, info} on failure

Link to this function games_achievements_unlock(connection, achievement_id, opts \\ []) View Source
games_achievements_unlock(Tesla.Env.client, String.t, keyword) ::
  {:ok, GoogleApi.Games.V1.Model.AchievementUnlockResponse.t} |
  {:error, Tesla.Env.t}

Unlocks this achievement for the currently authenticated player.

Parameters

  • connection (GoogleApi.Games.V1.Connection): Connection to server
  • achievement_id (String): The ID of the achievement used by this method.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.

Returns

{:ok, %GoogleApi.Games.V1.Model.AchievementUnlockResponse{}} on success {:error, info} on failure

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

Updates multiple achievements for the currently authenticated player.

Parameters

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

    • :alt (String): Data format for the response.
    • :fields (String): Selector specifying which fields to include in a partial response.
    • :key (String): 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): OAuth 2.0 token for the current user.
    • :pretty_print (Boolean): Returns response with indentations and line breaks.
    • :quota_user (String): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits.
    • :consistency_token (String): The last-seen mutation timestamp.
    • :body (AchievementUpdateMultipleRequest):

Returns

{:ok, %GoogleApi.Games.V1.Model.AchievementUpdateMultipleResponse{}} on success {:error, info} on failure