class Revieto::Client
Attributes
api_key[R]
base_url[R]
Public Class Methods
new(api_key)
click to toggle source
# File lib/revieto/client.rb, line 6 def initialize(api_key) @api_key = api_key validate_credentials! @base_url = build_base_url end
Public Instance Methods
account()
click to toggle source
# File lib/revieto/client.rb, line 14 def account @account ||= Revieto::Account.new(self) end
reviews()
click to toggle source
# File lib/revieto/client.rb, line 18 def reviews @reviews ||= Revieto::Reviews.new(self) end
Private Instance Methods
build_base_url()
click to toggle source
# File lib/revieto/client.rb, line 29 def build_base_url 'https://www.revieto.com' end
validate_credentials!()
click to toggle source
# File lib/revieto/client.rb, line 24 def validate_credentials! error = MisconfiguredClientError.new('api_key must not be nil') fail error if @api_key.nil? end