apple-search-ads

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i apple-search-ads

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

26.5 kB

Total Files

10

Last publish

Collaborators

  • nimsical