Module: Seoshop

Defined in:
lib/seoshop-api.rb,
lib/seoshop-api/client.rb,
lib/seoshop-api/version.rb,
lib/seoshop-api/api/shop.rb,
lib/seoshop-api/api/brand.rb,
lib/seoshop-api/api/order.rb,
lib/seoshop-api/api/account.rb,
lib/seoshop-api/api/product.rb,
lib/seoshop-api/api/customer.rb,
lib/seoshop-api/api/shop_script.rb,
lib/seoshop-api/api/shop_tracking.rb,
lib/seoshop-api/api/product_category.rb,
lib/seoshop-api/core/response_parser.rb

Defined Under Namespace

Modules: Account, Brand, Customer, Order, Product, ProductCategory, Shop, ShopScript, ShopTracking Classes: Client, ResponseParser

Constant Summary collapse

VERSION =
'0.1.2'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.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



9
10
11
# File 'lib/seoshop-api.rb', line 9

def parallel_requests
  @parallel_requests
end

Class Method Details

.client(api_key, api_secret, access_token, shop_language, cluster_id = 'eu1') ⇒ Object

Returns an instance of Seoshop::Client.

Returns:

  • an instance of Seoshop::Client



31
32
33
# File 'lib/seoshop-api.rb', line 31

def client(api_key, api_secret, access_token, shop_language, cluster_id = 'eu1')
  @client ||= Seoshop::Client.new(api_key, api_secret, access_token, shop_language, cluster_id)
end

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

Configuration interface of the gem

Yields:

  • (self)

    to accept configuration settings



14
15
16
17
# File 'lib/seoshop-api.rb', line 14

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 Seoshop::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)


24
25
26
# File 'lib/seoshop-api.rb', line 24

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