Class: Google::Apis::GamesV1::Leaderboard

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

Returns a new instance of Leaderboard



1478
1479
1480
# File 'generated/google/apis/games_v1/classes.rb', line 1478

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

Instance Attribute Details

#icon_urlString

The icon for the leaderboard. Corresponds to the JSON property iconUrl

Returns:

  • (String)


1443
1444
1445
# File 'generated/google/apis/games_v1/classes.rb', line 1443

def icon_url
  @icon_url
end

#idString

The leaderboard ID. Corresponds to the JSON property id

Returns:

  • (String)


1448
1449
1450
# File 'generated/google/apis/games_v1/classes.rb', line 1448

def id
  @id
end

#is_icon_url_defaultBoolean Also known as: is_icon_url_default?

Indicates whether the icon image being returned is a default image, or is game- provided. Corresponds to the JSON property isIconUrlDefault

Returns:

  • (Boolean)


1454
1455
1456
# File 'generated/google/apis/games_v1/classes.rb', line 1454

def is_icon_url_default
  @is_icon_url_default
end

#kindString

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

Returns:

  • (String)


1461
1462
1463
# File 'generated/google/apis/games_v1/classes.rb', line 1461

def kind
  @kind
end

#nameString

The name of the leaderboard. Corresponds to the JSON property name

Returns:

  • (String)


1466
1467
1468
# File 'generated/google/apis/games_v1/classes.rb', line 1466

def name
  @name
end

#orderString

How scores are ordered. Possible values are:

  • "LARGER_IS_BETTER" - Larger values are better; scores are sorted in descending order.
  • "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in ascending order. Corresponds to the JSON property order

Returns:

  • (String)


1476
1477
1478
# File 'generated/google/apis/games_v1/classes.rb', line 1476

def order
  @order
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1483
1484
1485
1486
1487
1488
1489
1490
# File 'generated/google/apis/games_v1/classes.rb', line 1483

def update!(**args)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @id = args[:id] if args.key?(:id)
  @is_icon_url_default = args[:is_icon_url_default] if args.key?(:is_icon_url_default)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @order = args[:order] if args.key?(:order)
end