Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitter-openapi-typescript

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-openapi-typescript

Implementation of Twitter internal API in TypeScript

  • 0.0.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
258
decreased by-6.18%
Maintainers
1
Weekly downloads
 
Created
Source

twitter-openapi-typescript

Setup

npm i twitter-openapi-typescript

Usage

  import { TwitterOpenApi } from "twitter-openapi-typescript";

  const api = new TwitterOpenApi();
  const client = await api.getClient();
  const response = await client.getUserApi().getUserByScreenName({ screenName: 'elonmusk' });
  console.log(response.data.legacy.screenName);
  console.log(`followCount: ${response.data.legacy.friendsCount} followersCount: ${response.data.legacy.followersCount}`);

Node.js

  import fetch from "node-fetch";
  const api = new TwitterOpenApi({ fetchApi: fetch as any });

Login

  const client = await api.getClientFromCookies('<csrf toke here>', '<auth token here>');

List of APIs

You should read the Test case.

https://github.com/fa0311/twitter-openapi-typescript/tree/master/twitter-openapi-typescript/test/api

Keywords

FAQs

Package last updated on 19 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc