Class: Twitch::Redemption
- Inherits:
-
Object
- Object
- Twitch::Redemption
- Defined in:
- lib/twitch/redemption.rb
Overview
Data object for Twitch users
Instance Attribute Summary collapse
-
#broadcaster_display_name ⇒ Object
readonly
Formatted username of the broadcaster.
-
#broadcaster_id ⇒ Object
readonly
ID of the broadcaster.
-
#broadcaster_login ⇒ Object
readonly
Unformatted (lowercase) username of thebroadcaster.
-
#id ⇒ Object
readonly
ID of the redemption.
-
#redeemed_at ⇒ Object
readonly
The timestamp of the redemption.
-
#reward ⇒ Object
readonly
The associated reward being redeemed.
-
#status ⇒ Object
readonly
The status of the redemption’s fulfillment.
-
#user_id ⇒ Object
readonly
ID of the user.
-
#user_input ⇒ Object
readonly
The user input (e.g. text) if allowed by the reward.
-
#user_login ⇒ Object
readonly
Unformatted (lowercase) username of the user.
-
#user_name ⇒ Object
readonly
Formatted username of the user.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Redemption
constructor
A new instance of Redemption.
Constructor Details
#initialize(attributes = {}) ⇒ Redemption
Returns a new instance of Redemption.
29 30 31 32 33 |
# File 'lib/twitch/redemption.rb', line 29 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set "@#{key}", value end end |
Instance Attribute Details
#broadcaster_display_name ⇒ Object (readonly)
Formatted username of the broadcaster.
11 12 13 |
# File 'lib/twitch/redemption.rb', line 11 def broadcaster_display_name @broadcaster_display_name end |
#broadcaster_id ⇒ Object (readonly)
ID of the broadcaster.
7 8 9 |
# File 'lib/twitch/redemption.rb', line 7 def broadcaster_id @broadcaster_id end |
#broadcaster_login ⇒ Object (readonly)
Unformatted (lowercase) username of thebroadcaster.
9 10 11 |
# File 'lib/twitch/redemption.rb', line 9 def broadcaster_login @broadcaster_login end |
#id ⇒ Object (readonly)
ID of the redemption.
13 14 15 |
# File 'lib/twitch/redemption.rb', line 13 def id @id end |
#redeemed_at ⇒ Object (readonly)
The timestamp of the redemption
27 28 29 |
# File 'lib/twitch/redemption.rb', line 27 def redeemed_at @redeemed_at end |
#reward ⇒ Object (readonly)
The associated reward being redeemed
21 22 23 |
# File 'lib/twitch/redemption.rb', line 21 def reward @reward end |
#status ⇒ Object (readonly)
The status of the redemption’s fulfillment
25 26 27 |
# File 'lib/twitch/redemption.rb', line 25 def status @status end |
#user_id ⇒ Object (readonly)
ID of the user.
15 16 17 |
# File 'lib/twitch/redemption.rb', line 15 def user_id @user_id end |
#user_input ⇒ Object (readonly)
The user input (e.g. text) if allowed by the reward
23 24 25 |
# File 'lib/twitch/redemption.rb', line 23 def user_input @user_input end |
#user_login ⇒ Object (readonly)
Unformatted (lowercase) username of the user.
17 18 19 |
# File 'lib/twitch/redemption.rb', line 17 def user_login @user_login end |
#user_name ⇒ Object (readonly)
Formatted username of the user.
19 20 21 |
# File 'lib/twitch/redemption.rb', line 19 def user_name @user_name end |