{"id":20936219,"url":"https://github.com/adzerk/adzerk-management-sdk-js","last_synced_at":"2025-05-13T21:31:01.028Z","repository":{"id":39724128,"uuid":"280233001","full_name":"adzerk/adzerk-management-sdk-js","owner":"adzerk","description":"JavaScript SDK for the Kevel Management API","archived":false,"fork":false,"pushed_at":"2025-01-14T13:40:24.000Z","size":1165,"stargazers_count":1,"open_issues_count":7,"forks_count":3,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-29T05:37:00.105Z","etag":null,"topics":["management"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adzerk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-16T18:51:07.000Z","updated_at":"2025-01-14T13:35:36.000Z","dependencies_parsed_at":"2024-09-17T11:23:34.322Z","dependency_job_id":"dc417805-ad75-4b7f-b164-26836a72833f","html_url":"https://github.com/adzerk/adzerk-management-sdk-js","commit_stats":{"total_commits":157,"total_committers":6,"mean_commits":"26.166666666666668","dds":0.197452229299363,"last_synced_commit":"d28be6055b15983fb3ff1bcf3224579e45c2c818"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fadzerk-management-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fadzerk-management-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fadzerk-management-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adzerk%2Fadzerk-management-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adzerk","download_url":"https://codeload.github.com/adzerk/adzerk-management-sdk-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254030899,"owners_count":22002670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["management"],"created_at":"2024-11-18T22:18:24.836Z","updated_at":"2025-05-13T21:30:59.226Z","avatar_url":"https://github.com/adzerk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adzerk JavaScript/Typescript Management SDK\n\nJavaScript Software Development Kit for Adzerk Management APIs.\n\n## Installation\n\n[NPM Package](https://www.npmjs.com/package/@adzerk/management-sdk)\n\n```shell\nnpm install @adzerk/management-sdk\n```\n\nor\n\n```shell\nyarn add @adzerk/management-sdk\n```\n\n## How It Works\n\nAdzerk's Management SDK takes a data-driven approach to working with our API. This means that all of our operations are driven by OpenAPI documentation found at https://github.com/adzerk/adzerk-api-specification. This means that the SDK Client Factory takes a list of specifications during construction. There are several utility methods for building that specification list, the easiest of which is `buildFullSpecificationList`. You then pass that list to `fetchSpecifications` to load and parse the documents:\n\n```js\nlet Adzerk = require(\"@adzerk/management-sdk\");\nlet specificationList = Adzerk.buildFullSpecificationList();\nlet specifications = await Adzerk.fetchSpecifications(specificationList);\nlet client = await Adzerk.buildClient({ apiKey: \"*****\", specifications });\n```\n\nWe also provide the ability to pin to a specific version of the OpenAPI documents as well. This allows a stable set of functionality but may prevent usage of the latest and greatest features. If you want to take advantage of this, you can use the `buildFullSpecificationList` helper method:\n\n```js\nlet Adzerk = require(\"@adzerk/management-sdk\");\nlet specificationList = Adzerk.buildFullSpecificationList({\n  version: \"v1.0.1\",\n});\nlet specifications = await Adzerk.fetchSpecifications(specificationList);\nlet client = await Adzerk.buildClient({ apiKey: \"*****\", specifications });\n```\n\nThis will still download and parse the specifications at runtime. We also provide the ability to load the OpenAPI documents from disk. This will save some time and allow you pin to a specific revision (or allow you to patch them yourselves):\n\n```js\nlet Adzerk = require(\"@adzerk/management-sdk\");\nlet specificationList = Adzerk.buildFullSpecificationList({\n  basePath: \"../path/to/repo \",\n});\nlet specifications = await Adzerk.fetchSpecifications(specificationList);\nlet client = await Adzerk.buildClient({ apiKey: \"*****\", specifications });\n```\n\nWe also provide the ability to specify only the API objects you are interested in. By using this, you'll gain another performance boost as only a handful of documents will be parsed instead of the full set. This method also supports pinning to versions or loading from disk:\n\n```js\nlet Adzerk = require(\"@adzerk/management-sdk\");\nlet specificationList = Adzerk.buildPartialSpecificationList({\n  version: \"v1.0.1\",\n  objects: [\"campaign\", \"flight\", \"ad\"],\n});\nlet specifications = await Adzerk.fetchSpecifications(specificationList);\nlet client = await Adzerk.buildClient({ apiKey: \"*****\", specifications });\n```\n\n## Object, Operation, Parameters Pattern\n\nThere is really only one method you will call on the SDK, and that is the `client.run` method. However, it takes at a minimum an object name (like `advertiser`) and a `camelCased` operation name (like `create`, `list`, or `listForCampaign`). Some operations also take a JavaScript object of parameters.\n\n## Logging\n\nOur logging implementation is meant to be flexible enough to fit into any common NodeJS logging framework.\n\nWhen constructing a client instance, the logger is passed in as an anonymous function with three parameters:\n\n`level`: Any one of `debug`, `info`, `warn`, or `error`.\n\n`message`: The message to log.\n\n`metadata`: Any additional metadata related to the logging call.\n\nIf no `logger` is provided as an argument, the default implementation will be used and write to `stdout`.\n\nThe easiest way to integrate is to write a function that handles translating the data from the Adzerk SDK Logger into whatever logging framework you're using in the rest of your application:\n\n```js\nconst Adzerk = require(\"@adzerk/management-sdk\");\n\nconst logger = (level, message, metadata) =\u003e {\n  console.log(`(${level}) ${message} - ${JSON.stringify(metadata)}`);\n};\n\nlet client = await Adzerk.buildClient({ logger });\n```\n\n## Acquiring API Credentials\n\nGo to [API Keys page](https://app.adzerk.com/#!/api-keys/) find active API keys.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzerk%2Fadzerk-management-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadzerk%2Fadzerk-management-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzerk%2Fadzerk-management-sdk-js/lists"}