0.0.2 • Published 5 years ago

apple-search-ads v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Apple Search Ads SDK

Unofficial Apple Search Ads SDK for Node

Installation

With NPM:

npm install apple-search-ads

or with Yarn

yarn add apple-search-ads

Usage

This module is designed to be easily updatable and match Apple's API paths and built on top of axios.

You'll need the following to get started:

Note that the SDK supports you passing a file path for the certificates, or passing a buffer of them.

Examples

const AppleSearchAds = require('apple-search-ads');

let sdk = new AppleSearchAds({
  certificate: {
    pem: './certs/pemCert.pem', // also accepts a Buffer with the cert
    key: './certs/keyCert.key' // also accept Buffer with the key
  },
  account: 'Account Name',
  version: 'v1' // optional
});

let report = await sdk.reports.campaigns.create({
  startTime: '2018-11-01',
  endTime: '2018-11-08',
  granularity: 'DAILY',
  selector: {
    orderBy: [{"field":"localSpend","sortOrder":"DESCENDING"}]
  }
});

console.log('report.status', report.status)
console.log('report.response', report.data);


let campaigns = await sdk.campaigns({ ... })

console.log('campaigns.status', campaigns.status)
console.log('campaigns.response', campaigns.data)

Support

The following endpoints namespaces are supported:

License

MIT

0.0.2

5 years ago

0.0.1

5 years ago