Class: Ingenia::Bundle
- Inherits:
-
Object
- Object
- Ingenia::Bundle
- Includes:
- Api
- Defined in:
- lib/ingenia_api/bundle.rb
Constant Summary collapse
- PATH =
'/bundles'
- BUNDLE_KNOWN_PARAMS =
These are known request params, all other params will go inside the json object
%i{ full_text offset limit }
Constants included from Api
Class Method Summary collapse
-
.all(params = {}) ⇒ Object
Index your bundles.
-
.create(params = {}) ⇒ Object
Create a new bundle.
- .destroy(id) ⇒ Object
-
.get(id, params = {}) ⇒ Object
Get a single bundle by id.
-
.update(id, params = {}) ⇒ Object
Update an existing bundle.
Methods included from Api
#api_key, #api_key=, #classify, #debug=, #endpoint=, #similar_to, #status, #summarize, #train, #trained_tags, #verify_response, #version=
Class Method Details
.all(params = {}) ⇒ Object
Index your bundles
38 39 40 41 42 43 44 |
# File 'lib/ingenia_api/bundle.rb', line 38 def self.all params = {} initialize_params params Ingenia::Api.verify_response do Remote.get(PATH, @params ) end end |
.create(params = {}) ⇒ Object
Create a new bundle
19 20 21 22 23 24 25 |
# File 'lib/ingenia_api/bundle.rb', line 19 def self.create params = {} initialize_params params Ingenia::Api.verify_response do Remote.post(PATH, @params ) end end |
.destroy(id) ⇒ Object
46 47 48 49 50 |
# File 'lib/ingenia_api/bundle.rb', line 46 def self.destroy id Ingenia::Api.verify_response do Remote.delete("#{PATH}/#{id}", :params => { :api_key => Ingenia::Api.api_key} ) end end |