npm

@ironsource/mobile-api-lib-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Test And Lint

IronSourceAPI

Installation

This module is installed via npm:

npm install --save @ironsource/mobile-api-lib-js

Simple Example:

const {IronSource,AppPromotionAPI,MonetizeEnums,AppPromotionEnums} = require('@ironsource/mobile-api-lib-js');
const fs = require('fs');


var ironsource = new IronSource();
ironsource.setCredentials('my_user_name','my_secret_key','my_refresh_token');


//Get Monetization Data
let res = await ironsource.MonetizeAPI().getMonetizationData('2019-11-07','2019-11-20',{adUnit:MonetizeEnums.AdUnits.RewardedVideo,metrics:[MonetizeEnums.Metrics.impressions,MonetizeEnums.Metrics.revenue],breakdowns:[MonetizeEnums.Breakdowns.Date]});
console.log(res.toString());

//Get Advertiser Statistics
let result = await ironsource.PromoteAPI().getAdvertiserStatistics('2019-11-11','2019-12-11',
[AppPromotionEnums.Metrics.Impressions],{format:'csv',breakdowns:[AppPromotionEnums.Breakdowns.Day,
AppPromotionEnums.Breakdowns.Campaign,AppPromotionEnums.Breakdowns.Country,AppPromotionEnums.Breakdowns.Title]});

result.pipe(fs.createWriteStream('./adv.csv'));

#IronSource

Authentication

Before starting to use the API make sure to get the credentials from ironSource dashboard. Account Cred

And set the Access Key, Secret Key and Refresh Token:

{IronSource} = require('@ironsource/mobile-api-lib-js');

var ironsource = new IronSource();
ironsource.setCredentials('my_user_name','my_secret_key','my_refresh_token');

Modules

Contributing:

Please follow contribution guide

Dependencies:

Readme

Keywords

none

Package Sidebar

Install

npm i @ironsource/mobile-api-lib-js

Weekly Downloads

3

Version

1.1.1

License

Apache-2.0

Unpacked Size

276 kB

Total Files

25

Last publish

Collaborators

  • levyitay