Class: Twitch::UserFollow

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/user_follow.rb

Overview

Represents a relationship of one user following another.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserFollow

Returns a new instance of UserFollow.



17
18
19
20
21
22
23
# File 'lib/twitch/user_follow.rb', line 17

def initialize(attributes = {})
  @from_id = attributes['from_id']
  @from_name = attributes['from_name']
  @to_id = attributes['to_id']
  @to_name = attributes['to_name']
  @followed_at = attributes['followed_at']
end

Instance Attribute Details

#followed_atObject (readonly)

Date at which the follow action was performed.



15
16
17
# File 'lib/twitch/user_follow.rb', line 15

def followed_at
  @followed_at
end

#from_idObject (readonly)

User ID of the following user.



7
8
9
# File 'lib/twitch/user_follow.rb', line 7

def from_id
  @from_id
end

#from_nameObject (readonly)

Display name of the following user.



9
10
11
# File 'lib/twitch/user_follow.rb', line 9

def from_name
  @from_name
end

#to_idObject (readonly)

User ID of the followed user.



11
12
13
# File 'lib/twitch/user_follow.rb', line 11

def to_id
  @to_id
end

#to_nameObject (readonly)

User name of the followed user.



13
14
15
# File 'lib/twitch/user_follow.rb', line 13

def to_name
  @to_name
end