Struct google_games1::api::AchievementMethods
source · pub struct AchievementMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on achievement resources.
It is not used directly, but through the Games
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_games1 as games1;
use std::default::Default;
use games1::{Games, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Games::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `increment(...)`, `list(...)`, `reveal(...)`, `set_steps_at_least(...)`, `unlock(...)` and `update_multiple(...)`
// to build up your call.
let rb = hub.achievements();
Implementations§
source§impl<'a, S> AchievementMethods<'a, S>
impl<'a, S> AchievementMethods<'a, S>
sourcepub fn increment(
&self,
achievement_id: &str,
steps_to_increment: i32
) -> AchievementIncrementCall<'a, S>
pub fn increment( &self, achievement_id: &str, steps_to_increment: i32 ) -> AchievementIncrementCall<'a, S>
Create a builder to help you perform the following task:
Increments the steps of the achievement with the given ID for the currently authenticated player.
§Arguments
achievementId
- The ID of the achievement used by this method.stepsToIncrement
- Required. The number of steps to increment.
sourcepub fn list(&self, player_id: &str) -> AchievementListCall<'a, S>
pub fn list(&self, player_id: &str) -> AchievementListCall<'a, S>
Create a builder to help you perform the following task:
Lists the progress for all your application’s achievements for the currently authenticated player.
§Arguments
playerId
- A player ID. A value ofme
may be used in place of the authenticated player’s ID.
sourcepub fn reveal(&self, achievement_id: &str) -> AchievementRevealCall<'a, S>
pub fn reveal(&self, achievement_id: &str) -> AchievementRevealCall<'a, S>
Create a builder to help you perform the following task:
Sets the state of the achievement with the given ID to REVEALED
for the currently authenticated player.
§Arguments
achievementId
- The ID of the achievement used by this method.
sourcepub fn set_steps_at_least(
&self,
achievement_id: &str,
steps: i32
) -> AchievementSetStepsAtLeastCall<'a, S>
pub fn set_steps_at_least( &self, achievement_id: &str, steps: i32 ) -> AchievementSetStepsAtLeastCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
achievementId
- The ID of the achievement used by this method.steps
- Required. The minimum value to set the steps to.
sourcepub fn unlock(&self, achievement_id: &str) -> AchievementUnlockCall<'a, S>
pub fn unlock(&self, achievement_id: &str) -> AchievementUnlockCall<'a, S>
Create a builder to help you perform the following task:
Unlocks this achievement for the currently authenticated player.
§Arguments
achievementId
- The ID of the achievement used by this method.
sourcepub fn update_multiple(
&self,
request: AchievementUpdateMultipleRequest
) -> AchievementUpdateMultipleCall<'a, S>
pub fn update_multiple( &self, request: AchievementUpdateMultipleRequest ) -> AchievementUpdateMultipleCall<'a, S>
Create a builder to help you perform the following task:
Updates multiple achievements for the currently authenticated player.
§Arguments
request
- No description provided.