https://github.com/goodwaygroup/lib-tradedesk
The TradeDesk API library with Auth, Retry and reflection capabilities when interacting with the API.
https://github.com/goodwaygroup/lib-tradedesk
goodwaygroup thetradedesk thetradedesk-api tradedesk tradedesk-api ttd ttd-api typescript
Last synced: about 2 months ago
JSON representation
The TradeDesk API library with Auth, Retry and reflection capabilities when interacting with the API.
- Host: GitHub
- URL: https://github.com/goodwaygroup/lib-tradedesk
- Owner: GoodwayGroup
- License: mit
- Created: 2020-08-01T16:29:15.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T05:09:55.000Z (8 months ago)
- Last Synced: 2024-10-29T20:23:45.462Z (8 months ago)
- Topics: goodwaygroup, thetradedesk, thetradedesk-api, tradedesk, tradedesk-api, ttd, ttd-api, typescript
- Language: TypeScript
- Homepage: https://goodwaygroup.github.io/lib-tradedesk/
- Size: 541 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# lib-tradedesk
[](https://coveralls.io/github/GoodwayGroup/lib-tradedesk?branch=master) [](https://circleci.com/gh/GoodwayGroup/lib-tradedesk)
## Usage
This plugin will interact with The Trade Desk's API.
View the API's documentation at https://apis.thetradedesk.com/v3/doc
> NOTE: This module uses the [`debug`](https://www.npmjs.com/package/debug) logging tool. Use `DEBUG=tradedesk*` to view debug logging.
```
$ npm install -S @goodwaygroup/lib-tradedesk
```---
```js
const { TradeDesk } = require('@goodwaygroup/lib-tradedesk');const ttd = new TradeDesk({
username: '[email protected]',
password: 'apasswordthatwontwork'
});// Promises
ttd.get('/campaign/query/facets')
.then((res) => res.json())
.then((body) => console.log(body))
.catch((err) => {
console.log(err.stack);
if (err.response) {
return err.response.json().then((body) => console.log(body))
}
});// Async/Await
try {
const res = await ttd.get('/campaign/query/facets');
console.log(await res.json());
} catch (err) {
console.log(err.stack);
if (err.response) {
console.log(await err.response.json())
}
}
```## Configuration Options
> See [Documentation](./docs/api/interfaces/tradedeskoptions.md)
## Full Documentation
> See [Documentation](./docs/api/README.md)
## Running Tests
To run tests, just run the following:
```
npm test
```All commits are tested on [CircleCI](https://circleci.com/gh/GoodwayGroup/workflows/lib-tradedesk)
## Linting
To run `eslint`:
```
npm run lint
```To auto-resolve:
```
npm run lint:fix
```## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use milestones and `npm` version to bump versions. We also employ [git-chglog](https://github.com/git-chglog/git-chglog) to manage the [CHANGELOG.md](CHANGELOG.md). For the versions available, see the [tags on this repository](https://github.com/GoodwayGroup/lib-tradedesk/tags).
To initiate a version change:
```
npm version minor
```## Authors
* **Julian Lannigan** - *Initial work* - [@mrlannigan](https://github.com/mrlannigan)
See also the list of [contributors](https://github.com/GoodwayGroup/lib-tradedesk/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Acknowledgments
## Sponsors
[![goodwaygroup][goodwaygroup]](https://goodwaygroup.com)
[goodwaygroup]: https://s3.amazonaws.com/gw-crs-assets/goodwaygroup/logos/ggLogo_sm.png "Goodway Group"