1.0.3 • Published 10 months ago

twitter-api-client-ts v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

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);
1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago