Module: Hyperclient::ClassMethods
- Defined in:
- lib/hyperclient.rb
Instance Method Summary collapse
-
#auth(type, user, password) ⇒ void
Sets the authentication options for your API client.
-
#entry_point(url) ⇒ void
Set the entry point of your API.
-
#http_options(options = {}) ⇒ Object
Returns a Hash with the HTTP options that will be used to initialize Hyperclient::HTTP.
Instance Method Details
#auth(type, user, password) ⇒ void
This method returns an undefined value.
Sets the authentication options for your API client.
51 52 53 |
# File 'lib/hyperclient.rb', line 51 def auth(type, user, password) ({auth: {type: type, credentials: [user, password]}}) end |
#entry_point(url) ⇒ void
This method returns an undefined value.
Set the entry point of your API.
39 40 41 |
# File 'lib/hyperclient.rb', line 39 def entry_point(url) Resource.entry_point = url end |
#http_options(options = {}) ⇒ Object
Returns a Hash with the HTTP options that will be used to initialize Hyperclient::HTTP.
57 58 59 60 61 62 |
# File 'lib/hyperclient.rb', line 57 def ( = {}) @@http_options ||= {} @@http_options.merge!() {http: @@http_options} end |