Struct google_games1::ScoreMethods
[−]
[src]
pub struct ScoreMethods<'a, C, A> where C: 'a, A: 'a { /* fields omitted */ }
A builder providing access to all methods supported on score resources.
It is not used directly, but through the Games
hub.
Example
Instantiate a resource builder
extern crate hyper; extern crate yup_oauth2 as oauth2; extern crate google_games1 as games1; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use games1::Games; let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::new(), <MemoryStorage as Default>::default(), None); let mut hub = Games::new(hyper::Client::new(), auth); // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* // like `get(...)`, `list(...)`, `list_window(...)`, `submit(...)` and `submit_multiple(...)` // to build up your call. let rb = hub.scores();
Methods
impl<'a, C, A> ScoreMethods<'a, C, A>
[src]
fn submit(&self, leaderboard_id: &str, score: &str) -> ScoreSubmitCall<'a, C, A>
Create a builder to help you perform the following task:
Submits a score to the specified leaderboard.
Arguments
leaderboardId
- The ID of the leaderboard.score
- The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.
fn list(&self,
leaderboard_id: &str,
collection: &str,
time_span: &str)
-> ScoreListCall<'a, C, A>
leaderboard_id: &str,
collection: &str,
time_span: &str)
-> ScoreListCall<'a, C, A>
Create a builder to help you perform the following task:
Lists the scores in a leaderboard, starting from the top.
Arguments
leaderboardId
- The ID of the leaderboard.collection
- The collection of scores you're requesting.timeSpan
- The time span for the scores and ranks you're requesting.
fn get(&self,
player_id: &str,
leaderboard_id: &str,
time_span: &str)
-> ScoreGetCall<'a, C, A>
player_id: &str,
leaderboard_id: &str,
time_span: &str)
-> ScoreGetCall<'a, C, A>
Create a builder to help you perform the following task:
Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, leaderboardId can be set to ALL to retrieve data for all leaderboards in a given time span. NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'.
Arguments
playerId
- A player ID. A value of me may be used in place of the authenticated player's ID.leaderboardId
- The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application.timeSpan
- The time span for the scores and ranks you're requesting.
fn submit_multiple(&self,
request: PlayerScoreSubmissionList)
-> ScoreSubmitMultipleCall<'a, C, A>
request: PlayerScoreSubmissionList)
-> ScoreSubmitMultipleCall<'a, C, A>
Create a builder to help you perform the following task:
Submits multiple scores to leaderboards.
Arguments
request
- No description provided.
fn list_window(&self,
leaderboard_id: &str,
collection: &str,
time_span: &str)
-> ScoreListWindowCall<'a, C, A>
leaderboard_id: &str,
collection: &str,
time_span: &str)
-> ScoreListWindowCall<'a, C, A>
Create a builder to help you perform the following task:
Lists the scores in a leaderboard around (and including) a player's score.
Arguments
leaderboardId
- The ID of the leaderboard.collection
- The collection of scores you're requesting.timeSpan
- The time span for the scores and ranks you're requesting.