Sha256: 612444d70da66b344fee7f9d7f9d7098877073258c5c859a96bba69e4d15b904

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

module Twitch
  # Represents a relationship of one user following another.
  class UserFollow
    # User ID of the *following* user.
    attr_reader :from_id
    # User ID of the *followed* user.
    attr_reader :to_id
    # Date at which the follow action was performed.
    attr_reader :followed_at

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitch-api-0.3.0 lib/twitch/user_follow.rb
twitch-api-0.2.0 lib/twitch/user_follow.rb