Class: Google::Apis::GamesV1::PlayerAchievement
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::PlayerAchievement
- 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
An achievement object.
Instance Attribute Summary collapse
-
#achievement_state ⇒ String
The state of the achievement.
-
#current_steps ⇒ Fixnum
The current steps for an incremental achievement.
-
#experience_points ⇒ Fixnum
Experience points earned for the achievement.
-
#formatted_current_steps_string ⇒ String
The current steps for an incremental achievement as a string.
-
#id ⇒ String
The ID of the achievement.
-
#kind ⇒ String
Uniquely identifies the type of this resource.
-
#last_updated_timestamp ⇒ Fixnum
The timestamp of the last modification to this achievement's state.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PlayerAchievement
constructor
A new instance of PlayerAchievement.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PlayerAchievement
Returns a new instance of PlayerAchievement.
1801 1802 1803 |
# File 'generated/google/apis/games_v1/classes.rb', line 1801 def initialize(**args) update!(**args) end |
Instance Attribute Details
#achievement_state ⇒ String
The state of the achievement.
Corresponds to the JSON property achievementState
1766 1767 1768 |
# File 'generated/google/apis/games_v1/classes.rb', line 1766 def achievement_state @achievement_state end |
#current_steps ⇒ Fixnum
The current steps for an incremental achievement.
Corresponds to the JSON property currentSteps
1771 1772 1773 |
# File 'generated/google/apis/games_v1/classes.rb', line 1771 def current_steps @current_steps end |
#experience_points ⇒ Fixnum
Experience points earned for the achievement. This field is absent for
achievements that have not yet been unlocked and 0 for achievements that have
been unlocked by testers but that are unpublished.
Corresponds to the JSON property experiencePoints
1778 1779 1780 |
# File 'generated/google/apis/games_v1/classes.rb', line 1778 def experience_points @experience_points end |
#formatted_current_steps_string ⇒ String
The current steps for an incremental achievement as a string.
Corresponds to the JSON property formattedCurrentStepsString
1783 1784 1785 |
# File 'generated/google/apis/games_v1/classes.rb', line 1783 def formatted_current_steps_string @formatted_current_steps_string end |
#id ⇒ String
The ID of the achievement.
Corresponds to the JSON property id
1788 1789 1790 |
# File 'generated/google/apis/games_v1/classes.rb', line 1788 def id @id end |
#kind ⇒ String
Uniquely identifies the type of this resource. Value is always the fixed
string games#playerAchievement
.
Corresponds to the JSON property kind
1794 1795 1796 |
# File 'generated/google/apis/games_v1/classes.rb', line 1794 def kind @kind end |
#last_updated_timestamp ⇒ Fixnum
The timestamp of the last modification to this achievement's state.
Corresponds to the JSON property lastUpdatedTimestamp
1799 1800 1801 |
# File 'generated/google/apis/games_v1/classes.rb', line 1799 def @last_updated_timestamp end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1806 1807 1808 1809 1810 1811 1812 1813 1814 |
# File 'generated/google/apis/games_v1/classes.rb', line 1806 def update!(**args) @achievement_state = args[:achievement_state] if args.key?(:achievement_state) @current_steps = args[:current_steps] if args.key?(:current_steps) @experience_points = args[:experience_points] if args.key?(:experience_points) @formatted_current_steps_string = args[:formatted_current_steps_string] if args.key?(:formatted_current_steps_string) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @last_updated_timestamp = args[:last_updated_timestamp] if args.key?(:last_updated_timestamp) end |