Class: OpenFdaApi::AnimalAndVeterinary

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/open_fda_api/animal_and_veterinary.rb

Overview

Interact with the Animal & Veterinary API Endpoint:

- Adverse Events

Instance Attribute Summary

Attributes inherited from Endpoint

#client

Instance Method Summary collapse

Methods inherited from Endpoint

#build_inputs, #build_query, #initialize, #make_request

Constructor Details

This class inherits a constructor from OpenFdaApi::Endpoint

Instance Method Details

#adverse_events(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



13
14
15
16
17
18
# File 'lib/open_fda_api/animal_and_veterinary.rb', line 13

def adverse_events(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "event.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end