Class: Iterable::Catalogs
- Inherits:
-
ApiResource
- Object
- ApiResource
- Iterable::Catalogs
- Defined in:
- lib/iterable/catalogs.rb
Overview
Interact with /catalogs/catalogName API endpoints **currently in Beta only**
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#create ⇒ Iterable::Response
Create a catalog.
-
#delete ⇒ Iterable::Response
Delete a catalog.
-
#initialize(name, conf = nil) ⇒ Iterable::Catalog
constructor
Initialize Catalogs with a catalog name **currently in Beta only**.
-
#names(params = {}) ⇒ Iterable::Response
Get a list of all catalog names.
Methods inherited from ApiResource
default_config, #default_config
Constructor Details
#initialize(name, conf = nil) ⇒ Iterable::Catalog
Initialize Catalogs with a catalog name **currently in Beta only**
25 26 27 28 |
# File 'lib/iterable/catalogs.rb', line 25 def initialize(name, conf = nil) @name = name super conf end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/iterable/catalogs.rb', line 16 def name @name end |
Instance Method Details
#create ⇒ Iterable::Response
Create a catalog
35 36 37 |
# File 'lib/iterable/catalogs.rb', line 35 def create Iterable.request(conf, base_path).post end |
#delete ⇒ Iterable::Response
Delete a catalog
44 45 46 |
# File 'lib/iterable/catalogs.rb', line 44 def delete Iterable.request(conf, base_path).delete end |
#names(params = {}) ⇒ Iterable::Response
Get a list of all catalog names
53 54 55 |
# File 'lib/iterable/catalogs.rb', line 53 def names(params = {}) Iterable.request(conf, '/catalogs', params).get end |