@datafire/nativeads
v6.0.0
Published
DataFire integration for Native Ads Publisher API
Downloads
12
Readme
@datafire/nativeads
Client library for Native Ads Publisher API
Installation and Usage
npm install --save @datafire/nativeads
let nativeads = require('@datafire/nativeads').create();
.then(data => {
console.log(data);
});
Description
This is a Native Ads Publisher API it provides same functionality as Native Ads Publisher Account GUI.
Actions
auth.default.login.post
Returns Native Ads Publisher API token
nativeads.auth.default.login.post({
"username": "",
"password": ""
}, context)
Input
- input
object
- username required
string
: Native Ads Publisher username - password required
string
: Native Ads Publisher password
- username required
Output
- output authResponse
publisher.reports.daily.get
Returns publisher statistics split by date
nativeads.publisher.reports.daily.get({
"token": "",
"startDate": "",
"endDate": "",
"limit": 0,
"page": 0
}, context)
Input
- input
object
- token required
string
: Native Ads Publisher API authentication token - startDate required
string
: start date in format YYYY-MM-DD - endDate required
string
: end date in format YYYY-MM-DD - limit required
integer
: maximum number of results per page - page required
integer
: page number
- token required
Output
- output reportsDailyResponse
publisher.reports.website.get
Returns publisher statistics split by website
nativeads.publisher.reports.website.get({
"token": "",
"startDate": "",
"endDate": "",
"limit": 0,
"page": 0
}, context)
Input
- input
object
- token required
string
: Native Ads Publisher API authentication token - startDate required
string
: start date in format YYYY-MM-DD - endDate required
string
: end date in format YYYY-MM-DD - limit required
integer
: maximum number of results per page - page required
integer
: page number
- token required
Output
- output reportsWebsiteResponse
publisher.reports.widget.get
Returns publisher statistics split by widget
nativeads.publisher.reports.widget.get({
"token": "",
"startDate": "",
"endDate": "",
"limit": 0,
"page": 0
}, context)
Input
- input
object
- token required
string
: Native Ads Publisher API authentication token - startDate required
string
: start date in format YYYY-MM-DD - endDate required
string
: end date in format YYYY-MM-DD - limit required
integer
: maximum number of results per page - page required
integer
: page number
- token required
Output
- output reportsWidgetResponse
Definitions
authResponse
- authResponse
object
- success
boolean
- token
string
- success
modelError
- modelError
object
- errors
array
- items
string
- items
- success
boolean
- errors
reportsDailyItem
- reportsDailyItem
object
- clicks
string
- cpc
string
- ctr
string
- date
string
- earnings
string
- impressions
string
- net_ecpm
string
- rpm
string
- clicks
reportsDailyResponse
- reportsDailyResponse
object
- items
array
- items reportsDailyItem
- success
boolean
- total_count
integer
- totals totals
- items
reportsWebsiteItem
- reportsWebsiteItem
object
- clicks
string
- cpc
string
- ctr
string
- date
string
- earnings
string
- impressions
string
- net_ecpm
string
- rpm
string
- clicks
reportsWebsiteResponse
- reportsWebsiteResponse
object
- items
array
- items reportsWebsiteItem
- success
boolean
- total_count
integer
- totals totals
- items
reportsWidgetItem
- reportsWidgetItem
object
- campaign
string
: widget name - campaign_id
string
: widget id - clicks
string
- cpc
string
- ctr
string
- earnings
string
- impressions
string
- net_ecpm
string
- rpm
string
- campaign
reportsWidgetResponse
- reportsWidgetResponse
object
- items
array
- items reportsWidgetItem
- success
boolean
- total_count
integer
- totals totals
- items
totals
- totals
object
- total_clicks
string
- total_cpc
string
- total_ctr
string
- total_earnings
string
- total_impressions
string
- total_net_ecpm
string
- total_rpm
string
- total_clicks