@mikmik1011/threads-api-wrapper
v1.0.5
Published
An updated fork of Mikescops's SDK to manage Threads API in Node.js
Downloads
11
Maintainers
Readme
threads-api-wrapper : a NodeJS SDK for Threads API
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>;
/**
* Retrieve a paginated list of all Threads replies created by a user.
* @param params
* @returns
*/
getUserReplies: (params: GetThreadsParams) => Promise<UserRepliesResponse>;
/**
* Check the app user's current publishing rate limit usage.
* @param params
* @returns
*/
getUserPublishingLimit: (params: GetPublishingLimitParams) => Promise<PublishingLimitResponse>;
Post
/**
* Retrieve information about a media object or a thread on Threads.
* @param params
* @returns
*/
getMediaObject: (params: GetMediaParams): => Promise<ThreadData>;
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>;
Maintainers
| | | | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | Corentin Mors | Misa Stefanovic |