1.0.3 • Published 1 year ago

threads-api-wrapper v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago