Module: Frontapp::Client::Exports
- Included in:
- Frontapp::Client
- Defined in:
- lib/frontapp/client/exports.rb
Instance Method Summary collapse
-
#create_export!(params = {}) ⇒ Object
Allowed attributes: Name Type Description ————————- inbox_id string (optional) ID of the inbox to export the analytics for.
-
#create_export_for_team!(team_id, params = {}) ⇒ Object
Allowed attributes: Name Type Description ————————- inbox_id string (optional) ID of the inbox to export the analytics for.
- #exports(params = {}) ⇒ Object
-
#get_export(export_id) ⇒ Object
Parameters Name Type Description —————————— export_id string ID of the requested export ——————————.
Instance Method Details
#create_export!(params = {}) ⇒ Object
Allowed attributes: Name Type Description
inbox_id string (optional) ID of the inbox to export the analytics for. If omitted, the export will contain all the inboxes. tag_id string (optional) ID the tag to export the analytics for. If omitted, the export will contain all the tags. start number Start time of the data to include in the export. end number End time of the data to include in the export. timezone string (optional) Name of the timezone to format the dates. If omitted, the export will use UTC. should_export_events boolean (optional) Whether to export all the events or only messages. Default to false.
28 29 30 31 32 33 34 35 36 |
# File 'lib/frontapp/client/exports.rb', line 28 def create_export!(params = {}) cleaned = params.permit(:inbox_id, :tag_id, :start, :end, :timezone, :should_export_events) create("exports", cleaned) end |
#create_export_for_team!(team_id, params = {}) ⇒ Object
Allowed attributes: Name Type Description
inbox_id string (optional) ID of the inbox to export the analytics for. If omitted, the export will contain all the inboxes. tag_id string (optional) ID the tag to export the analytics for. If omitted, the export will contain all the tags. start number Start time of the data to include in the export. end number End time of the data to include in the export. timezone string (optional) Name of the timezone to format the dates. If omitted, the export will use UTC. should_export_events boolean (optional) Whether to export all the events or only messages. Default to false.
48 49 50 51 52 53 54 55 56 |
# File 'lib/frontapp/client/exports.rb', line 48 def create_export_for_team!(team_id, params = {}) cleaned = params.permit(:inbox_id, :tag_id, :start, :end, :timezone, :should_export_events) create("teams/#{team_id}/exports", cleaned) end |
#exports(params = {}) ⇒ Object
5 6 7 |
# File 'lib/frontapp/client/exports.rb', line 5 def exports(params = {}) list("exports", params) end |
#get_export(export_id) ⇒ Object
Parameters Name Type Description
export_id string ID of the requested export
14 15 16 |
# File 'lib/frontapp/client/exports.rb', line 14 def get_export(export_id) get("exports/#{export_id}") end |