[][src]Struct google_games1::ScoreMethods

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 hyper_rustls;
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::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
                              <MemoryStorage as Default>::default(), None);
let mut hub = Games::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::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]

pub fn submit(
    &self,
    leaderboard_id: &str,
    score: &str
) -> ScoreSubmitCall<'a, C, A>
[src]

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.

pub fn list(
    &self,
    leaderboard_id: &str,
    collection: &str,
    time_span: &str
) -> ScoreListCall<'a, C, A>
[src]

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.

pub fn get(
    &self,
    player_id: &str,
    leaderboard_id: &str,
    time_span: &str
) -> ScoreGetCall<'a, C, A>
[src]

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.

pub fn submit_multiple(
    &self,
    request: PlayerScoreSubmissionList
) -> ScoreSubmitMultipleCall<'a, C, A>
[src]

Create a builder to help you perform the following task:

Submits multiple scores to leaderboards.

Arguments

  • request - No description provided.

pub fn list_window(
    &self,
    leaderboard_id: &str,
    collection: &str,
    time_span: &str
) -> ScoreListWindowCall<'a, C, A>
[src]

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.

Trait Implementations

impl<'a, C, A> MethodsBuilder for ScoreMethods<'a, C, A>[src]

Auto Trait Implementations

impl<'a, C, A> !Send for ScoreMethods<'a, C, A>

impl<'a, C, A> Unpin for ScoreMethods<'a, C, A>

impl<'a, C, A> !Sync for ScoreMethods<'a, C, A>

impl<'a, C, A> !UnwindSafe for ScoreMethods<'a, C, A>

impl<'a, C, A> !RefUnwindSafe for ScoreMethods<'a, C, A>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.