Class: Platforms::Yammer::Api::Oauth

Inherits:
Base
  • Object
show all
Defined in:
lib/platforms/yammer/api/oauth.rb

Overview

Note:

This class is called Oauth and not OAuth (or OAuth2), because of the syntax of the Yammer API path. There is no underscore between the O and A.

OAuth2 tokens in Yammer, useful for verified admins to impoersonate other users, or to switch networks.

Author:

  • Benjamin Elias

Since:

  • 0.1.0

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Platforms::Yammer::Api::Base

Instance Method Details

#tokens(options = {}, headers = {}) ⇒ Faraday::Response

Get tokens

Parameters:

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

    Options for the request

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

    Additional headers to send with the request

Returns:

  • (Faraday::Response)

    the API response

See Also:

Since:

  • 0.1.0



20
21
22
# File 'lib/platforms/yammer/api/oauth.rb', line 20

def tokens options={}, headers={}
  @connection.get "oauth/tokens.json", options, headers
end