@datafire/nativeads

6.0.0 • Public • Published

@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

Output

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

Output

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

Output

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

Output

Definitions

authResponse

  • authResponse object
    • success boolean
    • token string

modelError

  • modelError object
    • errors array
      • items string
    • success boolean

reportsDailyItem

  • reportsDailyItem object
    • clicks string
    • cpc string
    • ctr string
    • date string
    • earnings string
    • impressions string
    • net_ecpm string
    • rpm string

reportsDailyResponse

  • reportsDailyResponse object

reportsWebsiteItem

  • reportsWebsiteItem object
    • clicks string
    • cpc string
    • ctr string
    • date string
    • earnings string
    • impressions string
    • net_ecpm string
    • rpm string

reportsWebsiteResponse

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

reportsWidgetResponse

  • reportsWidgetResponse object

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

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/nativeads

Weekly Downloads

18

Version

6.0.0

License

MIT

Unpacked Size

16.9 kB

Total Files

4

Last publish

Collaborators

  • datafire