Class: Bigcartel::API

Inherits:
Object
  • Object
show all
Defined in:
lib/bigcartel/api.rb

Class Method Summary collapse

Class Method Details

.get(path, params = {}) ⇒ Object



7
8
9
# File 'lib/bigcartel/api.rb', line 7

def get(path, params = {})
  normalize_response RestClient.get(api_url(path), headers.merge(params))
end

.patch(path, options = {}) ⇒ Object



11
12
13
# File 'lib/bigcartel/api.rb', line 11

def patch(path, options = {})
  normalize_response RestClient.patch(api_url(path), options.to_json, headers.merge(content_type: 'application/vnd.api+json', accept: 'application/vnd.api+json'))
end