Module: Iterable

Defined in:
lib/iterable.rb,
lib/iterable/email.rb,
lib/iterable/lists.rb,
lib/iterable/users.rb,
lib/iterable/config.rb,
lib/iterable/device.rb,
lib/iterable/events.rb,
lib/iterable/export.rb,
lib/iterable/in_app.rb,
lib/iterable/request.rb,
lib/iterable/catalogs.rb,
lib/iterable/channels.rb,
lib/iterable/commerce.rb,
lib/iterable/metadata.rb,
lib/iterable/response.rb,
lib/iterable/campaigns.rb,
lib/iterable/templates.rb,
lib/iterable/workflows.rb,
lib/iterable/experiments.rb,
lib/iterable/api_resource.rb,
lib/iterable/csv_exporter.rb,
lib/iterable/catalog_items.rb,
lib/iterable/json_exporter.rb,
lib/iterable/message_types.rb,
lib/iterable/metadata_table.rb,
lib/iterable/push_templates.rb,
lib/iterable/email_templates.rb,
lib/iterable/bulk_catalog_items.rb,
lib/iterable/catalog_field_mappings.rb

Overview

Iterable module for API interactions

Defined Under Namespace

Classes: ApiResource, BulkCatalogItems, Campaigns, CatalogFieldMappings, CatalogItems, Catalogs, Channels, Commerce, Config, CsvExporter, Device, Email, EmailTemplates, Events, Experiments, Export, InApp, JsonExporter, Lists, MessageTypes, Metadata, MetadataTable, PushTemplates, Response, Templates, Users, Workflows

Constant Summary collapse

DATE_FORMAT =
'%Y-%m-%d'.freeze

Class Method Summary collapse

Class Method Details

.configIterable::Config

Returns The default config for API endpoints.

Returns:



62
63
64
# File 'lib/iterable.rb', line 62

module_function def config
  @config ||= Config.new
end

.configure(&block) ⇒ Object

Configure a default [Iterable::Config] object to be used when interacting with API endpoints

Examples:

Configuring with token

Iterable.configure do |conf|
  conf.token = 'secret-token'
end


55
56
57
# File 'lib/iterable.rb', line 55

module_function def configure(&block)
  config.tap(&block)
end

.request(conf, path, params = {}) ⇒ Object



67
68
69
# File 'lib/iterable.rb', line 67

module_function def request(conf, path, params = {})
  Request.new conf, path, params
end