Class: Twitter::List

Inherits:
Identity show all
Includes:
Creatable
Defined in:
lib/twitter/list.rb

Instance Attribute Summary collapse

Attributes inherited from Identity

#id

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#created?, #created_at

Methods inherited from Identity

#initialize

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Twitter::Identity

Instance Attribute Details

#descriptionString (readonly)



10
11
12
# File 'lib/twitter/list.rb', line 10

def description
  @description
end

#full_nameString (readonly)



10
11
12
# File 'lib/twitter/list.rb', line 10

def full_name
  @full_name
end

#member_countInteger (readonly)



8
9
10
# File 'lib/twitter/list.rb', line 8

def member_count
  @member_count
end

#modeString (readonly)



10
11
12
# File 'lib/twitter/list.rb', line 10

def mode
  @mode
end

#nameString (readonly)



10
11
12
# File 'lib/twitter/list.rb', line 10

def name
  @name
end

#slugString (readonly)



10
11
12
# File 'lib/twitter/list.rb', line 10

def slug
  @slug
end

#subscriber_countInteger (readonly)



8
9
10
# File 'lib/twitter/list.rb', line 8

def subscriber_count
  @subscriber_count
end

Instance Method Details

#members_uriAddressable::URI Also known as: members_url



15
16
17
# File 'lib/twitter/list.rb', line 15

def members_uri
  Addressable::URI.parse("#{uri}/members") if uri?
end

#subscribers_uriAddressable::URI Also known as: subscribers_url



22
23
24
# File 'lib/twitter/list.rb', line 22

def subscribers_uri
  Addressable::URI.parse("#{uri}/subscribers") if uri?
end

#uriAddressable::URI Also known as: url



29
30
31
# File 'lib/twitter/list.rb', line 29

def uri
  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}") if slug? && user.screen_name?
end

#uri?Boolean



35
36
37
# File 'lib/twitter/list.rb', line 35

def uri?
  !!uri
end