Class: Imgur::Communication
- Inherits:
-
Struct
- Object
- Struct
- Imgur::Communication
- Defined in:
- lib/imgur/communication.rb
Constant Summary collapse
- API_VERSION =
3
Instance Attribute Summary collapse
-
#session ⇒ Object
Returns the value of attribute session.
Instance Method Summary collapse
-
#call(method, endpoint, params = nil) ⇒ Object
RESTful network call.
Instance Attribute Details
#session ⇒ Object
Returns the value of attribute session
2 3 4 |
# File 'lib/imgur/communication.rb', line 2 def session @session end |
Instance Method Details
#call(method, endpoint, params = nil) ⇒ Object
RESTful network call
7 8 9 10 11 |
# File 'lib/imgur/communication.rb', line 7 def call(method, endpoint, params = nil) request do session.connection.send method, "/#{API_VERSION}/#{endpoint}.json", params end end |