TeachableClient
Defined in: index.ts:24
The root client for interacting with the Teachable API. Instantiating this class automatically sets up all versioned sub-clients.
Example
Section titled “Example”import { TeachableClient } from './src';
// Standard usageconst client = new TeachableClient('your-api-key');
// Debug mode — logs all requests and responses to the consoleconst client = new TeachableClient('your-api-key', true);const users = await client.v1.users.getList(); // will log the requestConstructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TeachableClient(
apiKey,enableDebug?):TeachableClient
Defined in: index.ts:37
Creates a new TeachableClient instance and initializes the v1 sub-client.
Parameters
Section titled “Parameters”apiKey
Section titled “apiKey”string
Your Teachable API key, used to authenticate all requests.
enableDebug?
Section titled “enableDebug?”boolean = false
If true, enables debug mode for all sub-clients. Defaults to false.
Returns
Section titled “Returns”TeachableClient
Properties
Section titled “Properties”v1:
TeachableV1
Defined in: index.ts:30
Provides access to all Teachable v1 API resources, including users, transactions, and courses.