npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mikmik1011/threads-api-wrapper

v1.0.5

Published

An updated fork of Mikescops's SDK to manage Threads API in Node.js

Downloads

15

Readme

threads-api-wrapper : 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>;

/**
 * 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

| twitter/mikescops | threads/mikmik_1011 | | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | Corentin Mors | Misa Stefanovic |