Class: Google::Apis::GamesV1::Player

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 resource.

Defined Under Namespace

Classes: Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Player

Returns a new instance of Player.



1969
1970
1971
# File 'lib/google/apis/games_v1/classes.rb', line 1969

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

Instance Attribute Details

#avatar_image_urlString

The base URL for the image that represents the player. Corresponds to the JSON property avatarImageUrl

Returns:

  • (String)


1902
1903
1904
# File 'lib/google/apis/games_v1/classes.rb', line 1902

def avatar_image_url
  @avatar_image_url
end

The url to the landscape mode player banner image. Corresponds to the JSON property bannerUrlLandscape

Returns:

  • (String)


1907
1908
1909
# File 'lib/google/apis/games_v1/classes.rb', line 1907

def banner_url_landscape
  @banner_url_landscape
end

The url to the portrait mode player banner image. Corresponds to the JSON property bannerUrlPortrait

Returns:

  • (String)


1912
1913
1914
# File 'lib/google/apis/games_v1/classes.rb', line 1912

def banner_url_portrait
  @banner_url_portrait
end

#display_nameString

The name to display for the player. Corresponds to the JSON property displayName

Returns:

  • (String)


1917
1918
1919
# File 'lib/google/apis/games_v1/classes.rb', line 1917

def display_name
  @display_name
end

#experience_infoGoogle::Apis::GamesV1::PlayerExperienceInfo

1P/3P metadata about the player's experience. Corresponds to the JSON property experienceInfo



1922
1923
1924
# File 'lib/google/apis/games_v1/classes.rb', line 1922

def experience_info
  @experience_info
end

#friend_statusString

The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game. Corresponds to the JSON property friendStatus

Returns:

  • (String)


1928
1929
1930
# File 'lib/google/apis/games_v1/classes.rb', line 1928

def friend_status
  @friend_status
end

#game_player_idString

Per-application unique player identifier. Corresponds to the JSON property gamePlayerId

Returns:

  • (String)


1933
1934
1935
# File 'lib/google/apis/games_v1/classes.rb', line 1933

def game_player_id
  @game_player_id
end

#kindString

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

Returns:

  • (String)


1939
1940
1941
# File 'lib/google/apis/games_v1/classes.rb', line 1939

def kind
  @kind
end

#nameGoogle::Apis::GamesV1::Player::Name

A representation of the individual components of the name. Corresponds to the JSON property name



1944
1945
1946
# File 'lib/google/apis/games_v1/classes.rb', line 1944

def name
  @name
end

#original_player_idString

The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. Corresponds to the JSON property originalPlayerId

Returns:

  • (String)


1952
1953
1954
# File 'lib/google/apis/games_v1/classes.rb', line 1952

def original_player_id
  @original_player_id
end

#player_idString

The ID of the player. Corresponds to the JSON property playerId

Returns:

  • (String)


1957
1958
1959
# File 'lib/google/apis/games_v1/classes.rb', line 1957

def player_id
  @player_id
end

#profile_settingsGoogle::Apis::GamesV1::ProfileSettings

Profile settings Corresponds to the JSON property profileSettings



1962
1963
1964
# File 'lib/google/apis/games_v1/classes.rb', line 1962

def profile_settings
  @profile_settings
end

#titleString

The player's title rewarded for their game activities. Corresponds to the JSON property title

Returns:

  • (String)


1967
1968
1969
# File 'lib/google/apis/games_v1/classes.rb', line 1967

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
# File 'lib/google/apis/games_v1/classes.rb', line 1974

def update!(**args)
  @avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url)
  @banner_url_landscape = args[:banner_url_landscape] if args.key?(:banner_url_landscape)
  @banner_url_portrait = args[:banner_url_portrait] if args.key?(:banner_url_portrait)
  @display_name = args[:display_name] if args.key?(:display_name)
  @experience_info = args[:experience_info] if args.key?(:experience_info)
  @friend_status = args[:friend_status] if args.key?(:friend_status)
  @game_player_id = args[:game_player_id] if args.key?(:game_player_id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @original_player_id = args[:original_player_id] if args.key?(:original_player_id)
  @player_id = args[:player_id] if args.key?(:player_id)
  @profile_settings = args[:profile_settings] if args.key?(:profile_settings)
  @title = args[:title] if args.key?(:title)
end