Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mirkovw/adform-upload-tool
Javascript application that handles uploading HTML assets to Adform
https://github.com/mirkovw/adform-upload-tool
Last synced: 28 days ago
JSON representation
Javascript application that handles uploading HTML assets to Adform
- Host: GitHub
- URL: https://github.com/mirkovw/adform-upload-tool
- Owner: mirkovw
- License: mit
- Created: 2021-07-23T07:49:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-16T15:36:14.000Z (over 2 years ago)
- Last Synced: 2024-04-25T09:23:04.996Z (7 months ago)
- Language: JavaScript
- Size: 407 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# adform-upload-tool
Javascript application that handles uploading HTML assets to Adform## Installation
```sh
npm install adform-upload-tool
```## Basic Usage
```js
const AdformUploadTool = require('adform-upload-tool');( async () => {
const adformApi = new AdformUploadTool();
const loginResult = await adformApi.login({
client_id: 'your_client_id',
client_secret: 'your_client_secret'
}); //loginResult.success should be true// Get all clients for this account
const clients = await adformApi.getClients();// Get all campaigns for this account
const campaigns = await adformApi.getCampaigns();// Get all creatives by campaignId
const campaignBanners = await adformApi.getHtmlBanners(12345);
// Upload HTMl asset (zip) to specific advertiserID
const htmlAsset = await adformApi.uploadHtmlAsset({
advertiser: 12345,
filePath: './path/to/banner.zip',
});// Create new HTML banner in specific campaignId and Assign HTMl asset to this
const htmlBanner = await adformApi.createHtmlBanner({
campaignId: 12345,
asset: htmlAsset.data,
clickTagUrl: 'https://www.adform.com', // somehow it doesn't grab this automatically from the manifest.json.
})
// done!
})();
```