Do executes the "games.turnBasedMatches.create" call. Exactly one of *TurnBasedMatch or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TurnBasedMatch.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

Do is referenced in 0 repositories


// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ScoresListWindowCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
	c.ctx_ = ctx
	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
	for {
		x, err := c.Do()
		if err != nil {
			return err
		if err := f(x); err != nil {
			return err
		if x.NextPageToken == "" {
			return nil

// method id "games.scores.submit":

type ScoresSubmitCall struct {
	s             *Service
	leaderboardId string
	urlParams_    gensupport.URLParams
	ctx_          context.Context

// Submit: Submits a score to the specified leaderboard.
func (r *ScoresService) Submit(leaderboardId string, score int64) *ScoresSubmitCall {
	c := &ScoresSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.leaderboardId = leaderboardId
	c.urlParams_.Set("score", fmt.Sprint(score))
	return c

// ConsistencyToken sets the optional parameter "consistencyToken": The
// last-seen mutation timestamp.
func (c *ScoresSubmitCall) ConsistencyToken(consistencyToken int64) *ScoresSubmitCall {
	c.urlParams_.Set("consistencyToken", fmt.Sprint(consistencyToken))
	return c

// Language sets the optional parameter "language": The preferred
// language to use for strings returned by this method.
func (c *ScoresSubmitCall) Language(language string) *ScoresSubmitCall {
	c.urlParams_.Set("language", language)
	return c

// ScoreTag sets the optional parameter "scoreTag": Additional
// information about the score you're submitting. Values must contain no
// more than 64 URI-safe characters as defined by section 2.3 of RFC
// 3986.
func (c *ScoresSubmitCall) ScoreTag(scoreTag string) *ScoresSubmitCall {
	c.urlParams_.Set("scoreTag", scoreTag)
	return c

// Fields allows partial responses to be retrieved. See