Module: Croudia::API::Timelines

Included in:
Client
Defined in:
lib/croudia/api/timelines.rb

Instance Method Summary collapse

Instance Method Details

#home_timeline(params = {}) ⇒ Array<Croudia::Status>

Home Timeline

Parameters:

  • params (Hash) (defaults to: {})

    Additional query parameters

Options Hash (params):

  • :count (String, Integer)

    Number of statuses in the response

  • :include_entities (String)

    Set false to exclude entities

  • :max_id (String, Integer)

    Paging parameter

  • :since_id (String, Integer)

    Paging parameter

  • :trim_user (String)

    Set true to return compact user objects

Returns:

See Also:



31
32
33
34
# File 'lib/croudia/api/timelines.rb', line 31

def home_timeline(params={})
  resp = get('/statuses/home_timeline.json', params)
  objects(Croudia::Status, resp)
end

#mentions(params = {}) ⇒ Array<Croudia::Status> Also known as: mentions_timeline

Mentions

Parameters:

  • params (Hash) (defaults to: {})

    Additional query parameters

Options Hash (params):

  • :count (String, Integer)

    Number of statuses in the response

  • :include_entities (String)

    Set false to exclude entities

  • :max_id (String, Integer)

    Paging parameter

  • :since_id (String, Integer)

    Paging parameter

  • :trim_user (String)

    Set true to return compact user objects

Returns:

See Also:



73
74
75
76
# File 'lib/croudia/api/timelines.rb', line 73

def mentions(params={})
  resp = get('/statuses/mentions.json', params)
  objects(Croudia::Status, resp)
end

#public_timeline(params = {}) ⇒ Array<Croudia::Status>

Public Timeline

Parameters:

  • params (Hash) (defaults to: {})

    Additional query parameters

Options Hash (params):

  • :count (String, Integer)

    Number of statuses in the response

  • :include_entities (String)

    Set false to exclude entities

  • :max_id (String, Integer)

    Paging parameter

  • :since_id (String, Integer)

    Paging parameter

  • :trim_user (String)

    Set true to return compact user objects

Returns:

See Also:



16
17
18
19
# File 'lib/croudia/api/timelines.rb', line 16

def public_timeline(params={})
  resp = get('/statuses/public_timeline.json', params)
  objects(Croudia::Status, resp)
end

#user_timeline(user, params = {}) ⇒ Array<Croudia::Status> #user_timeline(params = {}) ⇒ Array<Croudia::Status>

User Timeline

Overloads:

  • #user_timeline(user, params = {}) ⇒ Array<Croudia::Status>

    Parameters:

    • user (String, Integer, Croudia::User)
    • params (Hash) (defaults to: {})

      Additional query parameters

    Options Hash (params):

    • :count (String, Integer)

      Number of statuses in the response

    • :include_entities (String)

      Set false to exclude entities

    • :max_id (String, Integer)

      Paging parameter

    • :since_id (String, Integer)

      Paging parameter

    • :trim_user (String)

      Set true to return compact user objects

  • #user_timeline(params = {}) ⇒ Array<Croudia::Status>

    Parameters:

    • params (Hash) (defaults to: {})

      Query parameters

    Options Hash (params):

    • :count (String, Integer)

      Number of statuses in the response

    • :include_entities (String)

      Set false to exclude entities

    • :max_id (String, Integer)

      Paging parameter

    • :screen_name (String)

      Screen name of the user

    • :since_id (String, Integer)

      Paging parameter

    • :trim_user (String)

      Set true to return compact user objects

    • :user_id (String, Integer)

      ID of the user

Returns:

See Also:



57
58
59
60
61
# File 'lib/croudia/api/timelines.rb', line 57

def user_timeline(user, params={})
  merge_user!(params, user)
  resp = get('/statuses/user_timeline.json', params)
  objects(Croudia::Status, resp)
end