TodoistApiOptions
type TodoistApiOptions = {
baseUrl?: string;
customFetch?: CustomFetch;
headers?: CustomHeaders;
};
Configuration options for the TodoistApi constructor
Properties
baseUrl?
optional baseUrl: string;
Optional custom API base URL. If not provided, defaults to Todoist's standard API endpoint
customFetch?
optional customFetch: CustomFetch;
Optional custom fetch function for alternative HTTP clients (e.g., Obsidian's requestUrl, React Native fetch)
headers?
optional headers: CustomHeaders;
Optional headers sent with every API request, e.g. { 'Doist-Platform': 'cli' } for client
attribution. Pass a function instead to compute them per request, e.g. a fresh request ID;
it is called once per request and retries reuse its result. Cannot replace Authorization
or X-Request-Id. Not sent on attachment downloads, which redirect to a third-party CDN.