Socket
Book a DemoInstallSign in
Socket

twitter-api-client-ts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-api-client-ts

A Twitter api client using email and password.

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

twitter-api-client-ts

A Twitter api client using email and password.

This project is based on twitter-api-client and is bound to TypeScript.

Features

Featurestwitter-api-client-ts
AccountOnly tweeting normal text.
Scraper
Search
GraphQL⭕ All available.(but the api interface was not implemented)

Usage

import { Account } from "twitter-api-client-ts"

async main(){
    const account=new Account("email","username","password")
    await account.login()

    account.tweet("Hello World!")
}

Get a user status by GraphQL

import { Account } from "twitter-api-client-ts";

const account = new Account("email", "username", "password");
await client.login();

const user = await client.gql("GET", "UserTweets", {
  userId: "44196397",
});

const entries = user.data.user.result.timeline_v2.timeline.instructions.filter(
  (x: any) => x.type === "TimelineAddEntries"
)[0].entries;

const result = entries
  .map((e: any) => {
    return e.content?.itemContent?.tweet_results?.result?.legacy;
  })
  .filter((x: any) => x !== undefined)
  .filter((x: any) => x.user_id_str === "44196397");

console.log(result);

FAQs

Package last updated on 28 Jul 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.