Class: Hopo::API
- Includes:
- Connections::Request, Connections::Response
- Defined in:
- lib/hopo/api.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default_params ⇒ Object
readonly
Returns the value of attribute default_params.
-
#http ⇒ Object
Returns the value of attribute http.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#ssl ⇒ Object
readonly
Returns the value of attribute ssl.
-
#uri ⇒ Object
Returns the value of attribute uri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #full_path ⇒ Object
-
#initialize(url, path = nil, ssl = false) ⇒ API
constructor
A new instance of API.
- #params ⇒ Object
- #params=(parameters) ⇒ Object
Methods included from Connections::Response
Methods included from Connections::Request
#delete, #get, included, #patch, #post, #put
Constructor Details
#initialize(url, path = nil, ssl = false) ⇒ API
Returns a new instance of API.
9 10 11 12 13 14 15 16 |
# File 'lib/hopo/api.rb', line 9 def initialize(url, path=nil, ssl=false) @default_params = {} @params = {} @url = url @path = path @ssl = ssl setup_connections end |
Instance Attribute Details
#default_params ⇒ Object (readonly)
Returns the value of attribute default_params.
6 7 8 |
# File 'lib/hopo/api.rb', line 6 def default_params @default_params end |
#http ⇒ Object
Returns the value of attribute http.
7 8 9 |
# File 'lib/hopo/api.rb', line 7 def http @http end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/hopo/api.rb', line 6 def path @path end |
#ssl ⇒ Object (readonly)
Returns the value of attribute ssl.
6 7 8 |
# File 'lib/hopo/api.rb', line 6 def ssl @ssl end |
#uri ⇒ Object
Returns the value of attribute uri.
7 8 9 |
# File 'lib/hopo/api.rb', line 7 def uri @uri end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/hopo/api.rb', line 6 def url @url end |