Module: Twitter::REST::API::Undocumented

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

Constant Summary

Constants included from Utils

Twitter::REST::API::Utils::DEFAULT_CURSOR, Twitter::REST::API::Utils::URI_SUBSTRING

Instance Method Summary collapse

Instance Method Details

#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

    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

    Parameters:

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

      A Twitter user ID, screen name, URI, 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



32
33
34
# File 'lib/twitter/rest/api/undocumented.rb', line 32

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

#tweet_count(uri, options = {}) ⇒ Integer

Note:

Undocumented

Returns Tweets count for a URI

Parameters:

  • uri (String, URI)

    A URI.

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

    A customizable set of options.

Returns:

  • (Integer)

Rate Limited?:

  • No

Authentication:

  • Not required



44
45
46
47
# File 'lib/twitter/rest/api/undocumented.rb', line 44

def tweet_count(uri, options={})
  connection = Faraday.new("https://cdn.api.twitter.com", connection_options.merge(:builder => middleware))
  connection.get("/1/urls/count.json", options.merge(:url => uri.to_s)).body[:count]
end