Class: Google::Apis::GamesV1::ScoreSubmission

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/games_v1/classes.rb,
generated/google/apis/games_v1/representations.rb,
generated/google/apis/games_v1/representations.rb

Overview

This is a JSON template for a request to submit a score to leaderboards.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ScoreSubmission

Returns a new instance of ScoreSubmission.



3602
3603
3604
# File 'generated/google/apis/games_v1/classes.rb', line 3602

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#scoreSubmission. Corresponds to the JSON property kind

Returns:

  • (String)


3578
3579
3580
# File 'generated/google/apis/games_v1/classes.rb', line 3578

def kind
  @kind
end

#leaderboard_idString

The leaderboard this score is being submitted to. Corresponds to the JSON property leaderboardId

Returns:

  • (String)


3583
3584
3585
# File 'generated/google/apis/games_v1/classes.rb', line 3583

def leaderboard_id
  @leaderboard_id
end

#scoreFixnum

The new score being submitted. Corresponds to the JSON property score

Returns:

  • (Fixnum)


3588
3589
3590
# File 'generated/google/apis/games_v1/classes.rb', line 3588

def score
  @score
end

#score_tagString

Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. Corresponds to the JSON property scoreTag

Returns:

  • (String)


3594
3595
3596
# File 'generated/google/apis/games_v1/classes.rb', line 3594

def score_tag
  @score_tag
end

#signatureString

Signature Values will contain URI-safe characters as defined by section 2.3 of RFC 3986. Corresponds to the JSON property signature

Returns:

  • (String)


3600
3601
3602
# File 'generated/google/apis/games_v1/classes.rb', line 3600

def signature
  @signature
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3607
3608
3609
3610
3611
3612
3613
# File 'generated/google/apis/games_v1/classes.rb', line 3607

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id)
  @score = args[:score] if args.key?(:score)
  @score_tag = args[:score_tag] if args.key?(:score_tag)
  @signature = args[:signature] if args.key?(:signature)
end