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, 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)

Returns:

  • (String)


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

def description
  @description
end

#full_nameString (readonly)

Returns:

  • (String)


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

def full_name
  @full_name
end

#member_countInteger (readonly)

Returns:

  • (Integer)


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

def member_count
  @member_count
end

#modeString (readonly)

Returns:

  • (String)


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

def mode
  @mode
end

#nameString (readonly)

Returns:

  • (String)


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

def name
  @name
end

#slugString (readonly)

Returns:

  • (String)


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

def slug
  @slug
end

#subscriber_countInteger (readonly)

Returns:

  • (Integer)


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

Returns The URI to the list members.

Returns:

  • (Addressable::URI)

    The URI to the list members.



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

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

#subscribers_uriAddressable::URI Also known as: subscribers_url

Returns The URI to the list subscribers.

Returns:

  • (Addressable::URI)

    The URI to the list subscribers.



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

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

#uriAddressable::URI Also known as: url

Returns The URI to the list.

Returns:

  • (Addressable::URI)

    The URI to the list.



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

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

#uri?Boolean

Returns:

  • (Boolean)


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

def uri?
  !!uri
end