1.0.11 • Published 9 years ago

tune-reporting v1.0.11

Weekly downloads
4
License
MIT
Repository
-
Last release
9 years ago

Table of Contents

Overview

The TUNE Reporting SDKs addressed in this posting are for creating hosted applications which require handling requests to TUNE Advertiser Report services with utility focus is upon Advertiser Reporting endpoints.

Even though the the breadth of the Service goes beyond just reports, it is these reporting endpoints that our customers primarily access.

The second goal of the SDKs is to assure that our customers’ developers are using best practices in gathering reports in the most optimal way.

Available TUNE Reporting SDKs

Supported programming languages for TUNE Reporting SDKs are:

TUNE SDKs for Mobile Apps

The TUNE Reporting SDKs should absolutely not be included within Mobile Apps.

All information pertaining to TUNE SDKs for Mobile Apps are found here.

Developers Community

SDK Installation

This section detail what is required to use this SDK and how to install it for usage.

Installation Prerequisites

Environment

These are the basic requirements to use this SDK:

* node >= 0.10.*
* npm >= 1.4.*

Generate API Key

To use SDK to access Advertiser Reporting endpoints of TUNE Advertiser Report, it requires a MobileAppTracking API Key: Generate API Key.

Installation Choices

You can install tune-reporting-node via npm or by downloading the source from github.

Via npm:

It is available on npm: tune-reporting

Install as follows

    $ npm install tune-reporting

Via ZIP file:

Click here to download the source code (.zip) for tune-reporting.

    $ git clone git@github.com:MobileAppTracking/tune-reporting-node
    $ cd tune-reporting-node
    $ npm install .

TUNE Reporting SDK Configuration

SDK Configuration file

The TUNE Reporting SDK configuration is set within file ./config.js.

And the appropriate environment settings:

config
├── development.json
├── production.json
└── test.json

With generated API_KEY from TUNE MobileAppTracking Platform account, replace UNDEFINED.

; TUNE MobileAppTracking Platform generated API Key. Replace UNDEFINED.
tune.reporting.auth_key=UNDEFINED
; TUNE Reporting Authentication Type: api_key OR session_token.
tune.reporting.auth_type=api_key
; Validate use TUNE Service fields used within action parameters.
tune.reporting.verify_fields_boolean=false
; TUNE reporting export status sleep (seconds).
tune.reporting.status.sleep=10
; TUNE reporting export fetch timeout (seconds).
tune.reporting.status.timeout=240
; TUNE reporting export fetch verbose output.
tune.reporting.status.verbose=false
SDK Configuration module

The TUNE Reporting SDK reads configuration through module ./config.js with the current environment SDK configuration file.

  var
    authKey = config.get('tune.reporting.auth_key'),
    authType = config.get('tune.reporting.auth_type');

By default, configuration is assumed using api_key authentication type.

To override 'api_key' authentication type:

    config.set('tune.reporting.auth_key', apiKey);
    config.set('tune.reporting.auth_type', 'api_key');

To override authentication type using session_token:

    config.set('tune.reporting.auth_key', sessionToken);
    config.set('tune.reporting.auth_type', 'session_token');

If you wish to generate your own session_token, class SessionAuthentication is provided:

  var
    apiKey = config.get('tune.reporting.auth_key'),
    sessionAuthenticate = new SessionAuthenticate();

    sessionAuthenticate.getSessionToken(apiKey, function (error, response) {
      if (error) {
        return next(error);
      }

      console.log(' Status: "success"');
      sessionToken = response.getData();
      console.log(' session_token:');
      console.log(sessionToken);
      return next();
    });

and you're good to go!

SDK Generated Documentation

SDK code is well commented and to see full documentation of its source using the provided Makefile commands that initiate code documentation generators.

Node.jsdoc

The following will generate YUIdoc from Node.js codebase:

This code documentation generation may require npm installation of YUIdoc.

The utility focus of the SDKs is upon the Advertiser Reporting API endpoints. Even though the the breadth of the Management API goes beyond just reports, it is these endpoints that our customers primarily access. The second goal of the SDKs is to assure that our customers' developers are using best practices in gathering reports in the most optimal way.

The endpoints interfaced by TUNE API SDKs provide access in gathering four types of reports:

Advertiser Reporting classes that perform Log Reports are:

Actuals report endpoint include: /advertiser/stats/: Reports' class AdvertiserReportActuals

Advertiser Reporting class that perform Actuals Reports is:

Advertiser Reporting class that perform Cohort Reports is:

Advertiser Reporting class that perform Retention Reports are:

Exporting Advertiser Reports

Currently, there are two different ways of handling advertiser report exports. Both approaches require (A) an action to request that a report be exported and (B) another action to request the report status (if ready to be exported), and if ready, then provide a URL to download the completed report.

Logs and Actuals reports all request an export using action find_export_queue.json, which returns a job_id. You then pass the job_id onto another endpoint Export::download.json, which performs the status checking and report URL retrieval.

Cohort and AdvertiserReportCohortRetention reports all request an export using action export.json, which also returns a job_id. You then pass the job_id onto another action status.json, which performs the status checking and report URL retrieval.

License

MIT License

Reporting Issues

Report issues using the Github Issue Tracker or Email sdk@tune.com.

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.9.3

9 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.1.20

9 years ago

0.1.19

9 years ago

0.1.18

9 years ago

0.1.17

9 years ago

0.1.16

9 years ago

0.1.15

9 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago