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

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 player leaderboard score object.

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) ⇒ PlayerLeaderboardScore

Returns a new instance of PlayerLeaderboardScore.



2376
2377
2378
# File 'generated/google/apis/games_v1/classes.rb', line 2376

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


2328
2329
2330
# File 'generated/google/apis/games_v1/classes.rb', line 2328

def kind
  @kind
end

#leaderboard_idString

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

Returns:

  • (String)


2333
2334
2335
# File 'generated/google/apis/games_v1/classes.rb', line 2333

def leaderboard_id
  @leaderboard_id
end

#public_rankGoogle::Apis::GamesV1::LeaderboardScoreRank

This is a JSON template for a score rank in a leaderboard. Corresponds to the JSON property publicRank



2338
2339
2340
# File 'generated/google/apis/games_v1/classes.rb', line 2338

def public_rank
  @public_rank
end

#score_stringString

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

Returns:

  • (String)


2343
2344
2345
# File 'generated/google/apis/games_v1/classes.rb', line 2343

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)


2349
2350
2351
# File 'generated/google/apis/games_v1/classes.rb', line 2349

def score_tag
  @score_tag
end

#score_valueFixnum

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

Returns:

  • (Fixnum)


2354
2355
2356
# File 'generated/google/apis/games_v1/classes.rb', line 2354

def score_value
  @score_value
end

#social_rankGoogle::Apis::GamesV1::LeaderboardScoreRank

This is a JSON template for a score rank in a leaderboard. Corresponds to the JSON property socialRank



2359
2360
2361
# File 'generated/google/apis/games_v1/classes.rb', line 2359

def social_rank
  @social_rank
end

#time_spanString

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

Returns:

  • (String)


2368
2369
2370
# File 'generated/google/apis/games_v1/classes.rb', line 2368

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)


2374
2375
2376
# File 'generated/google/apis/games_v1/classes.rb', line 2374

def write_timestamp
  @write_timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
# File 'generated/google/apis/games_v1/classes.rb', line 2381

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