class Pinterest::Client

A Pinterest API client.

@attribute access_token

@return [String] The access token.

@attribute client_id [String]

@return The client id.

@attribute client_secret [String]

@return The client secret.

@attribute verbose [Boolean]

@return If log requests.

@attribute connection_setup [Proc]

@return Additional code to execute on the connection object.

Constants

API_URL

The Pinterest API Root URL.

API_VERSION

The Pinterest API version.

DEFAULT_LIMIT

The maximum number of results to return by default.

SCOPES

The allowed authorization scopes.

Attributes

access_token[RW]
client_id[RW]
client_secret[RW]
connection[RW]
verbose[RW]

Public Class Methods

new(access_token: nil, client_id: nil, client_secret: nil, verbose: false, &connection_setup) click to toggle source

Creates a new client.

@param access_token [String] The access token. @param client_id [String] The client id. @param client_secret [String] The client secret. @param verbose [Boolean] If log requests. @param connection_setup [Proc] Additional code to execute on the connection object.

# File lib/pinterest/client.rb, line 41
def initialize(access_token: nil, client_id: nil, client_secret: nil, verbose: false, &connection_setup)
  @client_id = client_id
  @client_secret = client_secret
  @access_token = access_token
  @verbose = verbose

  ensure_connection(connection_setup)
end