@aexol/searchads-js

searchads api wrapper

Usage no npm install needed!

<script type="module">
  import aexolSearchadsJs from 'https://cdn.skypack.dev/@aexol/searchads-js';
</script>

README

Apple SearchAds api wrapper

About

TODO

Installation

npm install @aexol/searchads-js

Usage

API Reference

Modules

@aexol/searchads-js

SearchAds API

Classes

AclQueryRequest

Queries on acl endpoint in SearchAds API.

AdGroupQueryRequest

Make request on adgroups/${id} endpoint.

AdGroupsQueryRequest

Make request on adgroups endpoint.

Api
CampaignQueryRequest

Make request on campaigns/${id} endpoint.

CampaignsQueryRequest

Make request on campaigns endpoint.

FindQueryRequest

Make request on find endpoint.

Request

Request to SearchAds API.

QueryBase

Base query with request.

@aexol/searchads-js

SearchAds API

Example

import Api from '@aexol/searchads-js'
import fs from 'fs'

const auth = {
  pem: fs.readFileSync('cert.pem'),
  key: fs.readFileSync('cert.key'),
  orgId: 1
}
const api = new Api(auth)
api.campaigns.get().then(console.log).catch(e => console.log(e.message))

AclQuery ⇐ Request

Queries on acl endpoint in SearchAds API.

Kind: global class
Extends: Request

aclQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of AclQuery

aclQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of AclQuery

aclQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of AclQuery

Param Type Description
data any post payload

aclQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of AclQuery

Param Type Description
data any put payload

aclQuery.url() ⇒ String

Get endpoint url

Kind: instance method of AclQuery

AdGroupQuery ⇐ Request

Make request on adgroups/${id} endpoint.

Kind: global class
Extends: Request

adGroupQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of AdGroupQuery

adGroupQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of AdGroupQuery

adGroupQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of AdGroupQuery

Param Type Description
data any post payload

adGroupQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of AdGroupQuery

Param Type Description
data any put payload

adGroupQuery.url() ⇒ String

Get endpoint url

Kind: instance method of AdGroupQuery

AdGroupsQuery ⇐ Request

Make request on adgroups endpoint.

Kind: global class
Extends: Request
Properties

Name Type Description
find FindQuery Get find for adgroups.
[id] AdGroup Get adgroup by id.

adGroupsQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of AdGroupsQuery

adGroupsQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of AdGroupsQuery

adGroupsQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of AdGroupsQuery

Param Type Description
data any post payload

adGroupsQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of AdGroupsQuery

Param Type Description
data any put payload

adGroupsQuery.url() ⇒ String

Get endpoint url

Kind: instance method of AdGroupsQuery

Api

Kind: global class
Properties

Name Type Description
campaigns CampaignsQuery Instance of {CampaignsQuery} for this api obejct.
acl AclQuery Instance of {AclQuery} for this api object.

new Api(auth)

SearchAds API.

Param Description
auth SearchAds API auth certificates.

CampaignQuery ⇐ Request

Make request on campaigns/${id} endpoint.

Kind: global class
Extends: Request
Properties

Name Type Description
adgroups AdGroups Get adgroups for campaign

campaignQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of CampaignQuery

campaignQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of CampaignQuery

campaignQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of CampaignQuery

Param Type Description
data any post payload

campaignQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of CampaignQuery

Param Type Description
data any put payload

campaignQuery.url() ⇒ String

Get endpoint url

Kind: instance method of CampaignQuery

CampaignsQuery ⇐ Request

Make request on campaigns endpoint.

Kind: global class
Extends: Request
Properties

Name Type Description
find FindQuery Get find for campaigns
[id] Campaign Get campaign by id.

campaignsQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of CampaignsQuery

campaignsQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of CampaignsQuery

campaignsQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of CampaignsQuery

Param Type Description
data any post payload

campaignsQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of CampaignsQuery

Param Type Description
data any put payload

campaignsQuery.url() ⇒ String

Get endpoint url

Kind: instance method of CampaignsQuery

FindQuery ⇐ Request

Make request on find endpoint.

Kind: global class
Extends: Request

findQuery.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of FindQuery

findQuery.get() ⇒ Promise

Get on endpoint.

Kind: instance method of FindQuery

findQuery.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of FindQuery

Param Type Description
data any post payload

findQuery.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of FindQuery

Param Type Description
data any put payload

findQuery.url() ⇒ String

Get endpoint url

Kind: instance method of FindQuery

Request

Request to SearchAds API.

Kind: global class
Properties

Name Type Description
endpoint String Search ads api endpoint.
auth ICertAuth Search ads api auth.
headers Headers Search ads api request headers.

request.delete() ⇒ Promise

Delete on endpoint.

Kind: instance method of Request

request.get() ⇒ Promise

Get on endpoint.

Kind: instance method of Request

request.post(data) ⇒ Promise

Post on endpoint.

Kind: instance method of Request

Param Type Description
data any post payload

request.put(data) ⇒ Promise

Put on endpoint.

Kind: instance method of Request

Param Type Description
data any put payload

request.url() ⇒ String

Get endpoint url

Kind: instance method of Request

QueryBase

Base query with request.

Kind: global class

queryBase.request

Kind: instance property of QueryBase
Properties

Name Type Description
request Request returns object for this endpoint.