Class: LeanCloud::Client
- Inherits:
-
Object
- Object
- LeanCloud::Client
- Defined in:
- lib/lean_cloud/client.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #adapter ⇒ Object
- #headers ⇒ Object
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #instance ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(options) ⇒ Client
11 12 13 |
# File 'lib/lean_cloud/client.rb', line 11 def initialize() = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/lean_cloud/client.rb', line 6 def end |
Instance Method Details
#adapter ⇒ Object
15 16 17 |
# File 'lib/lean_cloud/client.rb', line 15 def adapter http_adapter end |
#headers ⇒ Object
23 24 25 |
# File 'lib/lean_cloud/client.rb', line 23 def headers {"X-AVOSCloud-Application-Id" => app_id, "X-AVOSCloud-Application-Key" => app_key, 'Content-Type' => 'application/json' } end |
#instance ⇒ Object
19 20 21 |
# File 'lib/lean_cloud/client.rb', line 19 def instance adapter.new(url, headers: headers) end |
#url ⇒ Object
27 28 29 |
# File 'lib/lean_cloud/client.rb', line 27 def url [host, version].join('/') end |