Class: Google::Apis::GamesV1::AchievementDefinition
- Inherits:
-
Object
- Object
- Google::Apis::GamesV1::AchievementDefinition
- 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 an achievement definition object.
Instance Attribute Summary collapse
-
#achievement_type ⇒ String
The type of the achievement.
-
#description ⇒ String
The description of the achievement.
-
#experience_points ⇒ Fixnum
Experience points which will be earned when unlocking this achievement.
-
#formatted_total_steps ⇒ String
The total steps for an incremental achievement as a string.
-
#id ⇒ String
The ID of the achievement.
-
#initial_state ⇒ String
The initial state of the achievement.
-
#is_revealed_icon_url_default ⇒ Boolean
(also: #is_revealed_icon_url_default?)
Indicates whether the revealed icon image being returned is a default image, or is provided by the game.
-
#is_unlocked_icon_url_default ⇒ Boolean
(also: #is_unlocked_icon_url_default?)
Indicates whether the unlocked icon image being returned is a default image, or is game-provided.
-
#kind ⇒ String
Uniquely identifies the type of this resource.
-
#name ⇒ String
The name of the achievement.
-
#revealed_icon_url ⇒ String
The image URL for the revealed achievement icon.
-
#total_steps ⇒ Fixnum
The total steps for an incremental achievement.
-
#unlocked_icon_url ⇒ String
The image URL for the unlocked achievement icon.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AchievementDefinition
constructor
A new instance of AchievementDefinition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AchievementDefinition
Returns a new instance of AchievementDefinition
106 107 108 |
# File 'generated/google/apis/games_v1/classes.rb', line 106 def initialize(**args) update!(**args) end |
Instance Attribute Details
#achievement_type ⇒ String
The type of the achievement. Possible values are:
- "STANDARD" - Achievement is either locked or unlocked.
- "INCREMENTAL" - Achievement is incremental.
Corresponds to the JSON property
achievementType
35 36 37 |
# File 'generated/google/apis/games_v1/classes.rb', line 35 def achievement_type @achievement_type end |
#description ⇒ String
The description of the achievement.
Corresponds to the JSON property description
40 41 42 |
# File 'generated/google/apis/games_v1/classes.rb', line 40 def description @description end |
#experience_points ⇒ Fixnum
Experience points which will be earned when unlocking this achievement.
Corresponds to the JSON property experiencePoints
45 46 47 |
# File 'generated/google/apis/games_v1/classes.rb', line 45 def experience_points @experience_points end |
#formatted_total_steps ⇒ String
The total steps for an incremental achievement as a string.
Corresponds to the JSON property formattedTotalSteps
50 51 52 |
# File 'generated/google/apis/games_v1/classes.rb', line 50 def formatted_total_steps @formatted_total_steps end |
#id ⇒ String
The ID of the achievement.
Corresponds to the JSON property id
55 56 57 |
# File 'generated/google/apis/games_v1/classes.rb', line 55 def id @id end |
#initial_state ⇒ String
The initial state of the achievement. Possible values are:
- "HIDDEN" - Achievement is hidden.
- "REVEALED" - Achievement is revealed.
- "UNLOCKED" - Achievement is unlocked.
Corresponds to the JSON property
initialState
64 65 66 |
# File 'generated/google/apis/games_v1/classes.rb', line 64 def initial_state @initial_state end |
#is_revealed_icon_url_default ⇒ Boolean Also known as: is_revealed_icon_url_default?
Indicates whether the revealed icon image being returned is a default image,
or is provided by the game.
Corresponds to the JSON property isRevealedIconUrlDefault
70 71 72 |
# File 'generated/google/apis/games_v1/classes.rb', line 70 def is_revealed_icon_url_default @is_revealed_icon_url_default end |
#is_unlocked_icon_url_default ⇒ Boolean Also known as: is_unlocked_icon_url_default?
Indicates whether the unlocked icon image being returned is a default image,
or is game-provided.
Corresponds to the JSON property isUnlockedIconUrlDefault
77 78 79 |
# File 'generated/google/apis/games_v1/classes.rb', line 77 def is_unlocked_icon_url_default @is_unlocked_icon_url_default end |
#kind ⇒ String
Uniquely identifies the type of this resource. Value is always the fixed
string games#achievementDefinition.
Corresponds to the JSON property kind
84 85 86 |
# File 'generated/google/apis/games_v1/classes.rb', line 84 def kind @kind end |
#name ⇒ String
The name of the achievement.
Corresponds to the JSON property name
89 90 91 |
# File 'generated/google/apis/games_v1/classes.rb', line 89 def name @name end |
#revealed_icon_url ⇒ String
The image URL for the revealed achievement icon.
Corresponds to the JSON property revealedIconUrl
94 95 96 |
# File 'generated/google/apis/games_v1/classes.rb', line 94 def revealed_icon_url @revealed_icon_url end |
#total_steps ⇒ Fixnum
The total steps for an incremental achievement.
Corresponds to the JSON property totalSteps
99 100 101 |
# File 'generated/google/apis/games_v1/classes.rb', line 99 def total_steps @total_steps end |
#unlocked_icon_url ⇒ String
The image URL for the unlocked achievement icon.
Corresponds to the JSON property unlockedIconUrl
104 105 106 |
# File 'generated/google/apis/games_v1/classes.rb', line 104 def unlocked_icon_url @unlocked_icon_url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'generated/google/apis/games_v1/classes.rb', line 111 def update!(**args) @achievement_type = args[:achievement_type] if args.key?(:achievement_type) @description = args[:description] if args.key?(:description) @experience_points = args[:experience_points] if args.key?(:experience_points) @formatted_total_steps = args[:formatted_total_steps] if args.key?(:formatted_total_steps) @id = args[:id] if args.key?(:id) @initial_state = args[:initial_state] if args.key?(:initial_state) @is_revealed_icon_url_default = args[:is_revealed_icon_url_default] if args.key?(:is_revealed_icon_url_default) @is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] if args.key?(:is_unlocked_icon_url_default) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) @revealed_icon_url = args[:revealed_icon_url] if args.key?(:revealed_icon_url) @total_steps = args[:total_steps] if args.key?(:total_steps) @unlocked_icon_url = args[:unlocked_icon_url] if args.key?(:unlocked_icon_url) end |