threads-api-wrapper
v1.0.3
Published
A SDK to manage Threads API in Node.js
Downloads
28
Maintainers
Readme
threads-api : 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>;
/**
* 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
| | | --------------------------------------------------------------------------------------------------------------------------- | | Corentin Mors |