Class: Google::Apis::GamesV1::LeaderboardEntry
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::LeaderboardEntry
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/games_v1/classes.rb,
lib/google/apis/games_v1/representations.rb,
lib/google/apis/games_v1/representations.rb
Overview
The Leaderboard Entry resource.
Instance Attribute Summary collapse
-
#formatted_score ⇒ String
The localized string for the numerical value of this score.
-
#formatted_score_rank ⇒ String
The localized string for the rank of this score for this leaderboard.
-
#kind ⇒ String
Uniquely identifies the type of this resource.
-
#player ⇒ Google::Apis::GamesV1::Player
A Player resource.
-
#score_rank ⇒ Fixnum
The rank of this score for this leaderboard.
-
#score_tag ⇒ String
Additional information about the score.
-
#score_value ⇒ Fixnum
The numerical value of this score.
-
#time_span ⇒ String
The time span of this high score.
-
#write_timestamp_millis ⇒ Fixnum
The timestamp at which this score was recorded, in milliseconds since the epoch in UTC.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LeaderboardEntry
constructor
A new instance of LeaderboardEntry.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LeaderboardEntry
Returns a new instance of LeaderboardEntry.
1508 1509 1510 |
# File 'lib/google/apis/games_v1/classes.rb', line 1508 def initialize(**args) update!(**args) end |
Instance Attribute Details
#formatted_score ⇒ String
The localized string for the numerical value of this score.
Corresponds to the JSON property formattedScore
1463 1464 1465 |
# File 'lib/google/apis/games_v1/classes.rb', line 1463 def formatted_score @formatted_score end |
#formatted_score_rank ⇒ String
The localized string for the rank of this score for this leaderboard.
Corresponds to the JSON property formattedScoreRank
1468 1469 1470 |
# File 'lib/google/apis/games_v1/classes.rb', line 1468 def formatted_score_rank @formatted_score_rank end |
#kind ⇒ String
Uniquely identifies the type of this resource. Value is always the fixed
string games#leaderboardEntry.
Corresponds to the JSON property kind
1474 1475 1476 |
# File 'lib/google/apis/games_v1/classes.rb', line 1474 def kind @kind end |
#player ⇒ Google::Apis::GamesV1::Player
A Player resource.
Corresponds to the JSON property player
1479 1480 1481 |
# File 'lib/google/apis/games_v1/classes.rb', line 1479 def player @player end |
#score_rank ⇒ Fixnum
The rank of this score for this leaderboard.
Corresponds to the JSON property scoreRank
1484 1485 1486 |
# File 'lib/google/apis/games_v1/classes.rb', line 1484 def score_rank @score_rank 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
1490 1491 1492 |
# File 'lib/google/apis/games_v1/classes.rb', line 1490 def score_tag @score_tag end |
#score_value ⇒ Fixnum
The numerical value of this score.
Corresponds to the JSON property scoreValue
1495 1496 1497 |
# File 'lib/google/apis/games_v1/classes.rb', line 1495 def score_value @score_value end |
#time_span ⇒ String
The time span of this high score.
Corresponds to the JSON property timeSpan
1500 1501 1502 |
# File 'lib/google/apis/games_v1/classes.rb', line 1500 def time_span @time_span end |
#write_timestamp_millis ⇒ Fixnum
The timestamp at which this score was recorded, in milliseconds since the
epoch in UTC.
Corresponds to the JSON property writeTimestampMillis
1506 1507 1508 |
# File 'lib/google/apis/games_v1/classes.rb', line 1506 def @write_timestamp_millis end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 |
# File 'lib/google/apis/games_v1/classes.rb', line 1513 def update!(**args) @formatted_score = args[:formatted_score] if args.key?(:formatted_score) @formatted_score_rank = args[:formatted_score_rank] if args.key?(:formatted_score_rank) @kind = args[:kind] if args.key?(:kind) @player = args[:player] if args.key?(:player) @score_rank = args[:score_rank] if args.key?(:score_rank) @score_tag = args[:score_tag] if args.key?(:score_tag) @score_value = args[:score_value] if args.key?(:score_value) @time_span = args[:time_span] if args.key?(:time_span) @write_timestamp_millis = args[:write_timestamp_millis] if args.key?(:write_timestamp_millis) end |