Class: AddonsApi::Client
- Inherits:
-
Object
- Object
- AddonsApi::Client
- Defined in:
- lib/addons-api/client.rb
Defined Under Namespace
Classes: AddonService, OAuth, Team, Wrapper
Class Method Summary collapse
-
.connect(options = nil) ⇒ Object
Get a Client configured to use Token authentication.
-
.connect_with_token(token, options = nil) ⇒ Object
Get a Client configured to use Token authentication.
- .sanitize_options(options) ⇒ Object
Class Method Details
.connect(options = nil) ⇒ Object
Get a Client configured to use Token authentication.
10 11 12 13 |
# File 'lib/addons-api/client.rb', line 10 def self.connect(=nil) = () Wrapper.new() end |
.connect_with_token(token, options = nil) ⇒ Object
Get a Client configured to use Token authentication.
16 17 18 19 20 |
# File 'lib/addons-api/client.rb', line 16 def self.connect_with_token(token, =nil) = () [:token] = token Wrapper.new() end |
.sanitize_options(options) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/addons-api/client.rb', line 22 def self.() return {} if .nil? = {} [:auto_paginate] = [:auto_paginate] if [:auto_paginate] [:headers] = [:headers] if [:headers] [:timeout] = [:timeout] if [:timeout] [:token] = [:token] if [:token] [:base_url] = [:base_url] if [:base_url] end |