Module: ChartMogul::API::Actions::All::ClassMethods

Defined in:
lib/chartmogul/api/actions/all.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/chartmogul/api/actions/all.rb', line 10

def all(options = {})
  resp = handling_errors do
    connection.get(resource_path.apply_with_get_params(options)) do |req|
      req.headers['Content-Type'] = 'application/json'
    end
  end
  json = ChartMogul::Utils::JSONParser.parse(resp.body)
  new_from_json(json)
end