Class: Iterable::JsonExporter

Inherits:
Export show all
Defined in:
lib/iterable/json_exporter.rb

Overview

Subclass of [Iterable::Export] for JSON exporting of data

Examples:

Creating a JSON Exporter

# With default config
exporter = Iterable::JsonExporter.new Iterable::Export::EMAIL_SEND_TYPE
exporter.export

# With custom config
conf = Iterable::Config.new(token: 'new-token')
exporter = Iterable::JsonExporter.new(Iterable::Export::EMAIL_SEND_TYPE, nil, nil, nil, config)

Constant Summary

Constants inherited from Export

Export::DATA_TYPES, Export::DATE_FORMAT, Export::RANGES

Instance Attribute Summary

Attributes inherited from Export

#campaign_id, #data_type, #omit_fields, #only_fields

Attributes inherited from ApiResource

#conf

Instance Method Summary collapse

Methods inherited from Export

#export, #export_range, #initialize

Methods inherited from ApiResource

#default_config, default_config, #initialize

Constructor Details

This class inherits a constructor from Iterable::Export

Instance Method Details

#formatString

Format to use for exporting

Returns:

  • (String)

    Format of export



19
20
21
# File 'lib/iterable/json_exporter.rb', line 19

def format
  'json'
end