@aexol/searchads-js
v0.1.6
Published
searchads api wrapper
Downloads
17
Keywords
Readme
Apple SearchAds api wrapper
About
TODO
Installation
npm install @aexol/searchads-js
Usage
API Reference
Modules
Classes
@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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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 ⇐ Request
- .delete() ⇒ Promise
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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
- .get() ⇒ Promise
- .post(data) ⇒ Promise
- .put(data) ⇒ Promise
- .url() ⇒ String
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. |