Class: Google::Apis::GamesV1::PlayerExperienceInfo

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

1P/3P metadata about the player's experience.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PlayerExperienceInfo

Returns a new instance of PlayerExperienceInfo.



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

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

Instance Attribute Details

#current_experience_pointsFixnum

The current number of experience points for the player. Corresponds to the JSON property currentExperiencePoints

Returns:

  • (Fixnum)


1904
1905
1906
# File 'lib/google/apis/games_v1/classes.rb', line 1904

def current_experience_points
  @current_experience_points
end

#current_levelGoogle::Apis::GamesV1::PlayerLevel

1P/3P metadata about a user's level. Corresponds to the JSON property currentLevel



1909
1910
1911
# File 'lib/google/apis/games_v1/classes.rb', line 1909

def current_level
  @current_level
end

#kindString

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

Returns:

  • (String)


1915
1916
1917
# File 'lib/google/apis/games_v1/classes.rb', line 1915

def kind
  @kind
end

#last_level_up_timestamp_millisFixnum

The timestamp when the player was leveled up, in millis since Unix epoch UTC. Corresponds to the JSON property lastLevelUpTimestampMillis

Returns:

  • (Fixnum)


1920
1921
1922
# File 'lib/google/apis/games_v1/classes.rb', line 1920

def last_level_up_timestamp_millis
  @last_level_up_timestamp_millis
end

#next_levelGoogle::Apis::GamesV1::PlayerLevel

1P/3P metadata about a user's level. Corresponds to the JSON property nextLevel



1925
1926
1927
# File 'lib/google/apis/games_v1/classes.rb', line 1925

def next_level
  @next_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

def update!(**args)
  @current_experience_points = args[:current_experience_points] if args.key?(:current_experience_points)
  @current_level = args[:current_level] if args.key?(:current_level)
  @kind = args[:kind] if args.key?(:kind)
  @last_level_up_timestamp_millis = args[:last_level_up_timestamp_millis] if args.key?(:last_level_up_timestamp_millis)
  @next_level = args[:next_level] if args.key?(:next_level)
end