@quantum-forge/tik-tok-business-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.4-alpha-0.0.1 • Public • Published

TikTok Business API SDK for Deno

Modern TypeScript SDK for the TikTok Business API with strict type checking and Deno support.

Installation

Deno

import { ApiClient } from "https://deno.land/x/tiktok_business_api_sdk/mod";

Or specify a version:

import { ApiClient } from "https://deno.land/x/tiktok_business_api_sdk@0.1.0/mod";

Usage

import { ApiClient, AdApi } from "https://deno.land/x/tiktok_business_api_sdk/mod";

// Get singleton instance
const client = ApiClient.instance;

// Configure the client
client.basePath = 'https://business-api.tiktok.com';
client.timeout = 30000;

// Set up OAuth2 authentication
client.authentications['oauth2'] = {
  type: 'oauth2',
  accessToken: 'YOUR_ACCESS_TOKEN'
};

// Create API instance
const adApi = new AdApi();

// Make API calls
try {
  const response = await adApi.getAd({
    advertiser_id: '123456',
    ad_id: '789012'
  });
  console.log(response);
} catch (error) {
  console.error('Error:', error);
}

Features

  • Full TypeScript support with strict typing
  • Native Deno integration
  • ESM modules
  • Promise-based async/await API
  • Comprehensive error handling
  • Built-in TypeScript definitions
  • No external dependencies

API Coverage

The SDK provides access to all TikTok Business API endpoints:

  • Ad Management
  • Campaign Management
  • Audience Management
  • Creative Management
  • Report Generation
  • And more...

Development

Requirements

  • Deno 1.38.0 or higher

Running Tests

deno test --allow-net

Building

deno bundle mod.ts dist/mod.js

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create new Pull Request

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @quantum-forge/tik-tok-business-sdk

Weekly Downloads

4

Version

0.0.4-alpha-0.0.1

License

MIT

Unpacked Size

8.18 MB

Total Files

559

Last publish

Collaborators

  • evolvingriley