Module: Yotpo

Defined in:
lib/yotpo.rb,
lib/yotpo/client.rb,
lib/yotpo/version.rb,
lib/yotpo/api/user.rb,
lib/yotpo/api/review.rb,
lib/yotpo/api/account.rb,
lib/yotpo/api/product.rb,
lib/yotpo/api/purchase.rb,
lib/yotpo/api/reminder.rb,
lib/yotpo/api/account_platform.rb,
lib/yotpo/core/response_parser.rb

Defined Under Namespace

Modules: Account, AccountPlatform, Product, Purchase, Reminder, Review, User Classes: Client, EncodeOj, ParseOj, ResponseParser

Constant Summary collapse

VERSION =
'0.0.8'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_keyString

Returns the app key that is registered with Yotpo.

Returns:

  • (String)

    the app key that is registered with Yotpo



16
17
18
# File 'lib/yotpo.rb', line 16

def app_key
  @app_key
end

.parallel_requestsInteger String

Returns defines the maximum parallel request for the gem to preform.

Returns:

  • (Integer String)

    defines the maximum parallel request for the gem to preform



12
13
14
# File 'lib/yotpo.rb', line 12

def parallel_requests
  @parallel_requests
end

.secretString

Returns the secret that is registered with Yotpo.

Returns:

  • (String)

    the secret that is registered with Yotpo



20
21
22
# File 'lib/yotpo.rb', line 20

def secret
  @secret
end

.urlString

Returns the base url of the Yotpo Api.

Returns:

  • (String)

    the base url of the Yotpo Api



8
9
10
# File 'lib/yotpo.rb', line 8

def url
  @url
end

Class Method Details

.clientObject

Returns an instance of Yotpo::Client.

Returns:

  • an instance of Yotpo::Client



42
43
44
# File 'lib/yotpo.rb', line 42

def client
  @client ||= Yotpo::Client.new()
end

.configure {|self| ... } ⇒ Object

Configuration interface of the gem

Yields:

  • (self)

    to accept configuration settings



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

def configure
  yield self
  true
end

.respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Makes sure that the method missing is checked with the Yotpo::Client instance

Parameters:

  • method_name (String)

    the name of the method we want to run

  • include_private (Boolean) (defaults to: false)

    defines wether to check for private functions as well

Returns:

  • (Boolean)


35
36
37
# File 'lib/yotpo.rb', line 35

def respond_to_missing?(method_name, include_private=false)
  client.respond_to?(method_name, include_private)
end