Class: JsBinClient::Rest

Inherits:
Object
  • Object
show all
Defined in:
lib/jsbin-client/rest.rb

Defined Under Namespace

Classes: IndifferentJson

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Rest

Returns a new instance of Rest.



5
6
7
# File 'lib/jsbin-client/rest.rb', line 5

def initialize(options)
  @options = options
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