class Zara4::API::Communication::Authentication::Authenticator

Attributes

client_id[RW]
client_secret[RW]

Public Class Methods

new(client_id, client_secret) click to toggle source

Constructor

# File lib/zara4/api/communication/authentication/authenticator.rb, line 9
def initialize(client_id, client_secret)
  @client_id     = client_id
  @client_secret = client_secret
  @scopes        = [];
end

Public Instance Methods

with_image_processing() click to toggle source

Add image processing to the Authenticator scope.

# File lib/zara4/api/communication/authentication/authenticator.rb, line 19
def with_image_processing
  @scopes.push('image-processing')
  return self
end
with_usage() click to toggle source

Add reading account usage to the Authenticator scope.

# File lib/zara4/api/communication/authentication/authenticator.rb, line 28
def with_usage
  @scopes.push('usage')
  return self
end