Class: JsBinClient::Rest
- Inherits:
-
Object
- Object
- JsBinClient::Rest
- Defined in:
- lib/jsbin-client/rest.rb
Defined Under Namespace
Classes: IndifferentJson
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(options) ⇒ Rest
constructor
A new instance of Rest.
- #post(path, params = {}) ⇒ Object
- #put(path, params = {}) ⇒ Object
Constructor Details
#initialize(options) ⇒ Rest
Returns a new instance of Rest.
5 6 7 |
# File 'lib/jsbin-client/rest.rb', line 5 def initialize() = end |
Instance Method Details
#get(path) ⇒ Object
9 10 11 |
# File 'lib/jsbin-client/rest.rb', line 9 def get(path) rest_request :get, "#{end_point}#{path}", headers end |
#post(path, params = {}) ⇒ Object
17 18 19 |
# File 'lib/jsbin-client/rest.rb', line 17 def post(path, params = {}) rest_request :post, "#{end_point}#{path}", params, headers end |
#put(path, params = {}) ⇒ Object
13 14 15 |
# File 'lib/jsbin-client/rest.rb', line 13 def put(path, params = {}) rest_request :put, "#{end_point}#{path}", params, headers end |