Class: Google::Apis::GamesV1::LeaderboardScoreRank

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 score rank in a leaderboard.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LeaderboardScoreRank

Returns a new instance of LeaderboardScoreRank.



1626
1627
1628
# File 'lib/google/apis/games_v1/classes.rb', line 1626

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

Instance Attribute Details

#formatted_num_scoresString

The number of scores in the leaderboard as a string. Corresponds to the JSON property formattedNumScores

Returns:

  • (String)


1603
1604
1605
# File 'lib/google/apis/games_v1/classes.rb', line 1603

def formatted_num_scores
  @formatted_num_scores
end

#formatted_rankString

The rank in the leaderboard as a string. Corresponds to the JSON property formattedRank

Returns:

  • (String)


1608
1609
1610
# File 'lib/google/apis/games_v1/classes.rb', line 1608

def formatted_rank
  @formatted_rank
end

#kindString

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

Returns:

  • (String)


1614
1615
1616
# File 'lib/google/apis/games_v1/classes.rb', line 1614

def kind
  @kind
end

#num_scoresFixnum

The number of scores in the leaderboard. Corresponds to the JSON property numScores

Returns:

  • (Fixnum)


1619
1620
1621
# File 'lib/google/apis/games_v1/classes.rb', line 1619

def num_scores
  @num_scores
end

#rankFixnum

The rank in the leaderboard. Corresponds to the JSON property rank

Returns:

  • (Fixnum)


1624
1625
1626
# File 'lib/google/apis/games_v1/classes.rb', line 1624

def rank
  @rank
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1631
1632
1633
1634
1635
1636
1637
# File 'lib/google/apis/games_v1/classes.rb', line 1631

def update!(**args)
  @formatted_num_scores = args[:formatted_num_scores] if args.key?(:formatted_num_scores)
  @formatted_rank = args[:formatted_rank] if args.key?(:formatted_rank)
  @kind = args[:kind] if args.key?(:kind)
  @num_scores = args[:num_scores] if args.key?(:num_scores)
  @rank = args[:rank] if args.key?(:rank)
end