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.



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

def initialize(attributes = {})
  @from_id = attributes['from_id']
  @to_id = attributes['to_id']
  @followed_at = Time.iso8601(attributes['followed_at'])
end

Instance Attribute Details

#followed_atObject (readonly)

Date at which the follow action was performed.



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

def followed_at
  @followed_at
end

#from_idObject (readonly)

User ID of the following user.



5
6
7
# File 'lib/twitch/user_follow.rb', line 5

def from_id
  @from_id
end

#to_idObject (readonly)

User ID of the followed user.



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

def to_id
  @to_id
end