Class: Google::Apis::GamesV1::LeaderboardEntry

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 the Leaderboard Entry resource.

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

Returns a new instance of LeaderboardEntry.



1549
1550
1551
# File 'generated/google/apis/games_v1/classes.rb', line 1549

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

Instance Attribute Details

#formatted_scoreString

The localized string for the numerical value of this score. Corresponds to the JSON property formattedScore

Returns:

  • (String)


1500
1501
1502
# File 'generated/google/apis/games_v1/classes.rb', line 1500

def formatted_score
  @formatted_score
end

#formatted_score_rankString

The localized string for the rank of this score for this leaderboard. Corresponds to the JSON property formattedScoreRank

Returns:

  • (String)


1505
1506
1507
# File 'generated/google/apis/games_v1/classes.rb', line 1505

def formatted_score_rank
  @formatted_score_rank
end

#kindString

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

Returns:

  • (String)


1511
1512
1513
# File 'generated/google/apis/games_v1/classes.rb', line 1511

def kind
  @kind
end

#playerGoogle::Apis::GamesV1::Player

This is a JSON template for a Player resource. Corresponds to the JSON property player



1516
1517
1518
# File 'generated/google/apis/games_v1/classes.rb', line 1516

def player
  @player
end

#score_rankFixnum

The rank of this score for this leaderboard. Corresponds to the JSON property scoreRank

Returns:

  • (Fixnum)


1521
1522
1523
# File 'generated/google/apis/games_v1/classes.rb', line 1521

def score_rank
  @score_rank
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)


1527
1528
1529
# File 'generated/google/apis/games_v1/classes.rb', line 1527

def score_tag
  @score_tag
end

#score_valueFixnum

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

Returns:

  • (Fixnum)


1532
1533
1534
# File 'generated/google/apis/games_v1/classes.rb', line 1532

def score_value
  @score_value
end

#time_spanString

The time span of this high score. Possible values are:

  • "ALL_TIME" - The score is an all-time high score.
  • "WEEKLY" - The score is a weekly high score.
  • "DAILY" - The score is a daily high score. Corresponds to the JSON property timeSpan

Returns:

  • (String)


1541
1542
1543
# File 'generated/google/apis/games_v1/classes.rb', line 1541

def time_span
  @time_span
end

#write_timestamp_millisFixnum

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

Returns:

  • (Fixnum)


1547
1548
1549
# File 'generated/google/apis/games_v1/classes.rb', line 1547

def write_timestamp_millis
  @write_timestamp_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
# File 'generated/google/apis/games_v1/classes.rb', line 1554

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