appsflyer-exporter
Exporter for appsflyer reports
Last updated 5 years ago by alexloi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install appsflyer-exporter 
SYNC missed versions from official npm registry.

appsflyer-exporter

Exporter for appsflyer reports (installs & partners)

Introduction

Wrapper around the Appsflyer Pull API, returns streams.

Example

Exporter.config({
    api_token: '',
    app_id: '',
    export_type: 'web',
    // for web -> 'installs_report, partners_report etc.', for 'local' -> local file path
    path: 'installs_report',
    // The format the exporter should return
    format: 'json' (default)
});
var opts = {
    from: '2015/02/02',
    to: '2015/02/03'
};
// export_type: 'web' will return a web stream via request
var webStream = Exporter.get(opts);

// export_type: 'local' (Default)
var localStream = Exporter.get();

// Once the stream is initiated and starts pushing through
localStream.on('data', function(line){
    // The first line sets the exporter headers (.csv first line) and returns line `false`;
    console.log(Exporter.csvHeaders);
    // Every other line is passed through normally
    // If format:'json' (which is the default), you'll get back an
    // Object with CSVHeaders as its keys.
    console.log(line);
});

Testing

The tests require you to setup the following two ENV vars: APPSFLYER_APPID & APPSFLYER_APITOKEN. You can replace manually in exporter.test.js if you prefer.

Run with npm test

Warning

Appsflyer has throttled requests to the Pull API to 1 req. p/hour. However if you need to run tests etc. you can get in touch with them to lift the restrictions:

https://support.appsflyer.com/entries/58773966-API-Policy

License

appsflyer-exporter is released under the MIT license. See LICENSE.txt for the complete text.

Current Tags

  • 0.1.4                                ...           latest (5 years ago)

2 Versions

  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |