threads-api-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

threads-api : a NodeJS SDK for Threads API

GitHub package.json version npm npm GitHub

A SDK in Javascript / Typescript for the Threads API

[!WARNING] This project is work in progress and contributions are very welcome!

It is in early development and is not yet ready for production use.

Installation

npm install threads-api-wrapper

Usage

import ThreadsSDK from 'threads-api-wrapper';

const threadsApi = new ThreadsSDK();

const url = threadsApi.getAuthorizationUrl({
    clientId: '<your_client_id>',
    redirectUri: '<your_redirect_uri>',
    scopes: ['<your_scope>'],
});

User

/**
 * Retrieve profile information about a user on Threads.
 * @param params
 * @returns
 */
getUserProfile: (params: GetProfileParams) => Promise<ProfileResponse>;
/**
 * Retrieve a paginated list of all Threads posts created by a user.
 * @param params
 * @returns
 */
getUserThreads: (params: GetThreadsParams) => Promise<UserThreadsResponse>;
/**
 * Check the app user's current publishing rate limit usage.
 * @param params
 * @returns
 */
getUserPublishingLimit: (params: GetPublishingLimitParams) => Promise<PublishingLimitResponse>;

Insights

/**
 * Retrieve insights for a Threads user object.
 * @param params
 * @returns
 */
getUserInsights: (params: GetUserInsightsParams) => Promise<UserInsightsResponse>;
/**
 * Retrieve insights for a Threads media object.
 * @param params
 * @returns
 */
getMediaInsights: (params: GetMediaInsightsParams) => Promise<MediaInsightsResponse>;

Maintainer

twitter/mikescops
Corentin Mors

Package Sidebar

Install

npm i threads-api-wrapper

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

25.3 kB

Total Files

18

Last publish

Collaborators

  • mikescops