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**
26 27 28 29 |
# File 'lib/iterable/catalogs.rb', line 26 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
36 37 38 |
# File 'lib/iterable/catalogs.rb', line 36 def create Iterable.request(conf, base_path).post end |
#delete ⇒ Iterable::Response
Delete a catalog
45 46 47 |
# File 'lib/iterable/catalogs.rb', line 45 def delete Iterable.request(conf, base_path).delete end |
#names(params = {}) ⇒ Iterable::Response
Get a list of all catalog names
54 55 56 |
# File 'lib/iterable/catalogs.rb', line 54 def names(params = {}) Iterable.request(conf, '/catalogs', params).get end |