Module: Trustpilot

Defined in:
lib/trustpilot.rb,
lib/trustpilot/api.rb,
lib/trustpilot/errors.rb,
lib/trustpilot/request.rb,
lib/trustpilot/version.rb,
lib/trustpilot/auth/token.rb,
lib/trustpilot/api_resource.rb,
lib/trustpilot/error_checker.rb,
lib/trustpilot/auth/authenticator.rb,
lib/trustpilot/resources/invitation.rb

Defined Under Namespace

Modules: Auth Classes: APIError, Api, ApiResource, AuthenticationError, ClientError, Error, ErrorChecker, Invitation, OAuthTokenRequestError, RateLimitError, Request, ServerError

Constant Summary collapse

VERSION =
'0.1.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_emailObject

Returns the value of attribute api_email.



23
24
25
# File 'lib/trustpilot.rb', line 23

def api_email
  @api_email
end

.api_keyObject

Returns the value of attribute api_key.



23
24
25
# File 'lib/trustpilot.rb', line 23

def api_key
  @api_key
end

.api_passwordObject

Returns the value of attribute api_password.



23
24
25
# File 'lib/trustpilot.rb', line 23

def api_password
  @api_password
end

.api_read_timeoutObject

Returns the value of attribute api_read_timeout.



23
24
25
# File 'lib/trustpilot.rb', line 23

def api_read_timeout
  @api_read_timeout
end

.api_secretObject

Returns the value of attribute api_secret.



23
24
25
# File 'lib/trustpilot.rb', line 23

def api_secret
  @api_secret
end

.api_urlObject (readonly)

Returns the value of attribute api_url.



26
27
28
# File 'lib/trustpilot.rb', line 26

def api_url
  @api_url
end

.debugObject

Returns the value of attribute debug.



23
24
25
# File 'lib/trustpilot.rb', line 23

def debug
  @debug
end

.default_business_unit_idObject

Returns the value of attribute default_business_unit_id.



23
24
25
# File 'lib/trustpilot.rb', line 23

def default_business_unit_id
  @default_business_unit_id
end

.redisObject

Returns the value of attribute redis.



23
24
25
# File 'lib/trustpilot.rb', line 23

def redis
  @redis
end

Class Method Details

.with_redis(&block) ⇒ Object

Raises:



28
29
30
31
32
33
34
35
36
# File 'lib/trustpilot.rb', line 28

def with_redis &block
  raise Trustpilot::Error, 'Trustpilot.redis is not set' unless redis

  if redis.respond_to? :with
    redis.with( &block )
  else
    yield redis
  end
end