Sha256: 712e37d9eceb51fa9912aa920257b6e0005e98f5ba231a181759cf3d1180a339

Contents?: true

Size: 1 KB

Versions: 11

Compression:

Stored size: 1 KB

Contents

require 'twitter/creatable'
require 'twitter/identity'

module Twitter
  class List < Twitter::Identity
    include Twitter::Creatable
    attr_reader :description, :following, :full_name, :member_count,
                :mode, :name, :slug, :subscriber_count
    object_attr_reader :User, :user

    # @return [Addressable::URI] The URI to the list members.
    def members_uri
      Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/members")
    end
    memoize :members_uri
    alias_method :members_url, :members_uri

    # @return [Addressable::URI] The URI to the list subscribers.
    def subscribers_uri
      Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/subscribers")
    end
    memoize :subscribers_uri
    alias_method :subscribers_url, :subscribers_uri

    # @return [Addressable::URI] The URI to the list.
    def uri
      Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}")
    end
    memoize :uri
    alias_method :url, :uri
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
twitter-5.8.0 lib/twitter/list.rb
twitter-5.7.1 lib/twitter/list.rb
twitter-5.7.0 lib/twitter/list.rb
twitter-5.6.0 lib/twitter/list.rb
twitter-5.5.1 lib/twitter/list.rb
twitter-5.5.0 lib/twitter/list.rb
twitter-5.4.1 lib/twitter/list.rb
twitter-5.4.0 lib/twitter/list.rb
twitter-5.3.1 lib/twitter/list.rb
twitter-5.3.0 lib/twitter/list.rb
twitter-5.2.0 lib/twitter/list.rb