Module: Shopkit
- Extended by:
- Configuration
- Defined in:
- lib/shopkit.rb,
lib/shopkit/client.rb,
lib/shopkit/request.rb,
lib/shopkit/version.rb,
lib/shopkit/traversal.rb,
lib/shopkit/connection.rb,
lib/shopkit/client/shop.rb,
lib/shopkit/client/orders.rb,
lib/shopkit/configuration.rb,
lib/shopkit/client/products.rb,
lib/shopkit/client/variants.rb,
lib/shopkit/client/webhooks.rb
Defined Under Namespace
Modules: Configuration, Connection, Request, Traversal Classes: Client
Constant Summary collapse
- VERSION =
"0.1.6"
Constants included from Configuration
Configuration::DEFAULT_ADAPTER, Configuration::DEFAULT_API_VERSION, Configuration::DEFAULT_AUTO_TRAVERSAL, Configuration::DEFAULT_PER_PAGE, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_OPTIONS_KEYS
Class Method Summary collapse
-
.method_missing(method, *args, &block) ⇒ Object
Delegate to Shopkit::Client.new.
- .new(options = {}) ⇒ Shopkit::Client
- .setup(options) ⇒ Object
Methods included from Configuration
configure, extended, options, reset
Class Method Details
.method_missing(method, *args, &block) ⇒ Object
Delegate to Shopkit::Client.new
20 21 22 23 |
# File 'lib/shopkit.rb', line 20 def method_missing(method, *args, &block) return super unless new.respond_to?(method) new.send(method, *args, &block) end |
.new(options = {}) ⇒ Shopkit::Client
10 11 12 13 14 15 16 |
# File 'lib/shopkit.rb', line 10 def new(={}) ['url'] = self.url ['access_token'] = self.access_token ['login'] = self.login ['password'] = self.password Shopkit::Client.new() end |
.setup(options) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/shopkit.rb', line 25 def setup() self.url = [:url] self.url = "http://#{self.url}" unless self.url.start_with?('http://', 'https://') self.access_token = [:access_token] self.login = [:login] # or basic auth self.password = [:password] end |