Class: Google::Apis::GamesV1::PlayerLeaderboardScore
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::PlayerLeaderboardScore
- 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 player leaderboard score object.
Instance Attribute Summary collapse
-
#kind ⇒ String
Uniquely identifies the type of this resource.
-
#leaderboard_id ⇒ String
The ID of the leaderboard this score is in.
-
#public_rank ⇒ Google::Apis::GamesV1::LeaderboardScoreRank
This is a JSON template for a score rank in a leaderboard.
-
#score_string ⇒ String
The formatted value of this score.
-
#score_tag ⇒ String
Additional information about the score.
-
#score_value ⇒ Fixnum
The numerical value of this score.
-
#social_rank ⇒ Google::Apis::GamesV1::LeaderboardScoreRank
This is a JSON template for a score rank in a leaderboard.
-
#time_span ⇒ String
The time span of this score.
-
#write_timestamp ⇒ Fixnum
The timestamp at which this score was recorded, in milliseconds since the epoch in UTC.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PlayerLeaderboardScore
constructor
A new instance of PlayerLeaderboardScore.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ PlayerLeaderboardScore
Returns a new instance of PlayerLeaderboardScore
2370 2371 2372 |
# File 'generated/google/apis/games_v1/classes.rb', line 2370 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kind ⇒ String
Uniquely identifies the type of this resource. Value is always the fixed
string games#playerLeaderboardScore.
Corresponds to the JSON property kind
2322 2323 2324 |
# File 'generated/google/apis/games_v1/classes.rb', line 2322 def kind @kind end |
#leaderboard_id ⇒ String
The ID of the leaderboard this score is in.
Corresponds to the JSON property leaderboard_id
2327 2328 2329 |
# File 'generated/google/apis/games_v1/classes.rb', line 2327 def leaderboard_id @leaderboard_id end |
#public_rank ⇒ Google::Apis::GamesV1::LeaderboardScoreRank
This is a JSON template for a score rank in a leaderboard.
Corresponds to the JSON property publicRank
2332 2333 2334 |
# File 'generated/google/apis/games_v1/classes.rb', line 2332 def public_rank @public_rank end |
#score_string ⇒ String
The formatted value of this score.
Corresponds to the JSON property scoreString
2337 2338 2339 |
# File 'generated/google/apis/games_v1/classes.rb', line 2337 def score_string @score_string end |
#score_tag ⇒ String
Additional information about the score. Values must contain no more than 64
URI-safe characters as defined by section 2.3 of RFC 3986.
Corresponds to the JSON property scoreTag
2343 2344 2345 |
# File 'generated/google/apis/games_v1/classes.rb', line 2343 def score_tag @score_tag end |
#score_value ⇒ Fixnum
The numerical value of this score.
Corresponds to the JSON property scoreValue
2348 2349 2350 |
# File 'generated/google/apis/games_v1/classes.rb', line 2348 def score_value @score_value end |
#social_rank ⇒ Google::Apis::GamesV1::LeaderboardScoreRank
This is a JSON template for a score rank in a leaderboard.
Corresponds to the JSON property socialRank
2353 2354 2355 |
# File 'generated/google/apis/games_v1/classes.rb', line 2353 def @social_rank end |
#time_span ⇒ String
The time span of this score. Possible values are:
- "ALL_TIME" - The score is an all-time score.
- "WEEKLY" - The score is a weekly score.
- "DAILY" - The score is a daily score.
Corresponds to the JSON property
timeSpan
2362 2363 2364 |
# File 'generated/google/apis/games_v1/classes.rb', line 2362 def time_span @time_span end |
#write_timestamp ⇒ Fixnum
The timestamp at which this score was recorded, in milliseconds since the
epoch in UTC.
Corresponds to the JSON property writeTimestamp
2368 2369 2370 |
# File 'generated/google/apis/games_v1/classes.rb', line 2368 def @write_timestamp end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 |
# File 'generated/google/apis/games_v1/classes.rb', line 2375 def update!(**args) @kind = args[:kind] if args.key?(:kind) @leaderboard_id = args[:leaderboard_id] if args.key?(:leaderboard_id) @public_rank = args[:public_rank] if args.key?(:public_rank) @score_string = args[:score_string] if args.key?(:score_string) @score_tag = args[:score_tag] if args.key?(:score_tag) @score_value = args[:score_value] if args.key?(:score_value) @social_rank = args[:social_rank] if args.key?(:social_rank) @time_span = args[:time_span] if args.key?(:time_span) @write_timestamp = args[:write_timestamp] if args.key?(:write_timestamp) end |