Module: Twitter::API::Undocumented

Includes:
Utils
Included in:
Client
Defined in:
lib/twitter/api/undocumented.rb

Constant Summary

Constants included from Utils

Twitter::API::Utils::DEFAULT_CURSOR

Instance Method Summary collapse

Instance Method Details

#activity_about_me(options = {}) ⇒ Array

Note:

Undocumented

Returns activity about me

Examples:

Return activity about me

Twitter.activity_about_me

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :count (Integer)

    Specifies the number of records to retrieve. Must be less than or equal to 100.

  • :since_id (Integer)

    Returns results with an ID greater than (that is, more recent than) the specified ID.

Returns:

  • (Array)

    An array of actions

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



25
26
27
# File 'lib/twitter/api/undocumented.rb', line 25

def activity_about_me(options={})
  objects_from_response(Twitter::ActionFactory, :get, "/i/activity/about_me.json", options)
end

#activity_by_friends(options = {}) ⇒ Array

Note:

Undocumented

Returns activity by friends

Examples:

Return activity by friends

Twitter.activity_by_friends

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :count (Integer)

    Specifies the number of records to retrieve. Must be less than or equal to 100.

  • :since_id (Integer)

    Returns results with an ID greater than (that is, more recent than) the specified ID.

Returns:

  • (Array)

    An array of actions

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



41
42
43
# File 'lib/twitter/api/undocumented.rb', line 41

def activity_by_friends(options={})
  objects_from_response(Twitter::ActionFactory, :get, "/i/activity/by_friends.json", options)
end

#following_followers_of(options = {}) ⇒ Object #following_followers_of(user, options = {}) ⇒ Object

Note:

Undocumented

Overloads:

  • #following_followers_of(options = {}) ⇒ Object

    Returns users following followers of the specified user

    Examples:

    Return users follow followers of @sferik

    Twitter.following_followers_of
    

    Parameters:

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

      A customizable set of options. @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list. @return [Twitter::Cursor]

  • #following_followers_of(user, options = {}) ⇒ Object

    Returns users following followers of the authenticated user

    Examples:

    Return users follow followers of @sferik

    Twitter.following_followers_of('sferik')
    Twitter.following_followers_of(7505382)  # Same as above
    

    Parameters:

    • user (Integer, String, Twitter::User)

      A Twitter user ID, screen name, or object.

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

      A customizable set of options. @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list. @return [Twitter::Cursor]

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



69
70
71
# File 'lib/twitter/api/undocumented.rb', line 69

def following_followers_of(*args)
  cursor_from_response_with_user(:users, Twitter::User, :get, "/users/following_followers_of.json", args, :following_followers_of)
end

#status_activity(id, options = {}) ⇒ Twitter::Tweet Also known as: tweet_activity

Note:

Undocumented

Returns activity summary for a Tweet

Examples:

Return activity summary for the Tweet with the ID 25938088801

Twitter.status_activity(25938088801)

Parameters:

  • id (Integer)

    A Tweet ID.

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

    A customizable set of options.

Returns:

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



84
85
86
87
88
# File 'lib/twitter/api/undocumented.rb', line 84

def status_activity(id, options={})
  response = get("/i/statuses/#{id}/activity/summary.json", options)
  response[:body].merge!(:id => id) if response[:body]
  Twitter::Tweet.from_response(response)
end

#statuses_activity(*ids) ⇒ Array<Twitter::Tweet> #statuses_activity(*ids, options) ⇒ Array<Twitter::Tweet>

Note:

Undocumented

Returns activity summary for Tweets

Overloads:

  • #statuses_activity(*ids) ⇒ Array<Twitter::Tweet>

    Examples:

    Return activity summary for the Tweet with the ID 25938088801

    Twitter.statuses_activity(25938088801)
    

    Parameters:

    • ids (Array<Integer>, Set<Integer>)

      An array of Tweet IDs.

  • #statuses_activity(*ids, options) ⇒ Array<Twitter::Tweet>

    Parameters:

    • ids (Array<Integer>, Set<Integer>)

      An array of Tweet IDs.

    • options (Hash)

      A customizable set of options.

Returns:

Raises:

Rate Limited?:

  • Yes

Authentication:

  • Requires user context



105
106
107
108
109
110
# File 'lib/twitter/api/undocumented.rb', line 105

def statuses_activity(*args)
  arguments = Twitter::API::Arguments.new(args)
  arguments.flatten.threaded_map do |id|
    status_activity(id, arguments.options)
  end
end