Class: Google::Apis::GamesV1::PlayerLeaderboardScore

Inherits:
Object
  • Object
show all
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

A player leaderboard score object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PlayerLeaderboardScore

Returns a new instance of PlayerLeaderboardScore.



2212
2213
2214
# File 'lib/google/apis/games_v1/classes.rb', line 2212

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

Instance Attribute Details

#friends_rankGoogle::Apis::GamesV1::LeaderboardScoreRank

A score rank in a leaderboard. Corresponds to the JSON property friendsRank



2162
2163
2164
# File 'lib/google/apis/games_v1/classes.rb', line 2162

def friends_rank
  @friends_rank
end

#kindString

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

Returns:

  • (String)


2168
2169
2170
# File 'lib/google/apis/games_v1/classes.rb', line 2168

def kind
  @kind
end

#leaderboard_idString

The ID of the leaderboard this score is in. Corresponds to the JSON property leaderboard_id

Returns:

  • (String)


2173
2174
2175
# File 'lib/google/apis/games_v1/classes.rb', line 2173

def leaderboard_id
  @leaderboard_id
end

#public_rankGoogle::Apis::GamesV1::LeaderboardScoreRank

A score rank in a leaderboard. Corresponds to the JSON property publicRank



2178
2179
2180
# File 'lib/google/apis/games_v1/classes.rb', line 2178

def public_rank
  @public_rank
end

#score_stringString

The formatted value of this score. Corresponds to the JSON property scoreString

Returns:

  • (String)


2183
2184
2185
# File 'lib/google/apis/games_v1/classes.rb', line 2183

def score_string
  @score_string
end

#score_tagString

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

Returns:

  • (String)


2189
2190
2191
# File 'lib/google/apis/games_v1/classes.rb', line 2189

def score_tag
  @score_tag
end

#score_valueFixnum

The numerical value of this score. Corresponds to the JSON property scoreValue

Returns:

  • (Fixnum)


2194
2195
2196
# File 'lib/google/apis/games_v1/classes.rb', line 2194

def score_value
  @score_value
end

#social_rankGoogle::Apis::GamesV1::LeaderboardScoreRank

A score rank in a leaderboard. Corresponds to the JSON property socialRank



2199
2200
2201
# File 'lib/google/apis/games_v1/classes.rb', line 2199

def social_rank
  @social_rank
end

#time_spanString

The time span of this score. Corresponds to the JSON property timeSpan

Returns:

  • (String)


2204
2205
2206
# File 'lib/google/apis/games_v1/classes.rb', line 2204

def time_span
  @time_span
end

#write_timestampFixnum

The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. Corresponds to the JSON property writeTimestamp

Returns:

  • (Fixnum)


2210
2211
2212
# File 'lib/google/apis/games_v1/classes.rb', line 2210

def write_timestamp
  @write_timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
# File 'lib/google/apis/games_v1/classes.rb', line 2217

def update!(**args)
  @friends_rank = args[:friends_rank] if args.key?(:friends_rank)
  @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