All Projects → abraham → twitter-d

abraham / twitter-d

Licence: MIT license
TypeScript types for Twitter API objects

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to twitter-d

stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+431.48%)
Mutual labels:  twitter-api, user, tweet
Stranger Things Wall
A wall of addressable LEDs inspired by the Netflix series Stranger Things that displays messages from Twitter.
Stars: ✭ 22 (-59.26%)
Mutual labels:  twitter-api
twitter-like-bot
This app allows you to automate Twitter liking for specific keywords, hashtags, or even full sentences. The bot uses streaming API which means that everything happens in real time.
Stars: ✭ 30 (-44.44%)
Mutual labels:  twitter-api
SMMT
Social Media Mining Toolkit (SMMT) main repository
Stars: ✭ 116 (+114.81%)
Mutual labels:  twitter-api
StockerBot
Twitter Bot to follow financial trends in publicly traded companies
Stars: ✭ 77 (+42.59%)
Mutual labels:  twitter-api
Broadcast
🗣 A write-only Twitter client
Stars: ✭ 36 (-33.33%)
Mutual labels:  twitter-api
node-social-feed-api
Aggregates social media feeds and outputs them to use in an API
Stars: ✭ 20 (-62.96%)
Mutual labels:  twitter-api
Penicillin
Modern powerful Twitter API wrapper for Kotlin Multiplatform. #PureKotlin
Stars: ✭ 91 (+68.52%)
Mutual labels:  twitter-api
trumptweets
Download data on all of Donald Trump's (@RealDonaldTrump) tweets
Stars: ✭ 39 (-27.78%)
Mutual labels:  twitter-api
tweet-to-markdown
A command line tool to convert Tweets to Markdown.
Stars: ✭ 111 (+105.56%)
Mutual labels:  tweet
twifo-cli
🐤 Get user information of a Twitter user.
Stars: ✭ 24 (-55.56%)
Mutual labels:  user
tweet-delete
Self-destructing Tweets so you too can be cool 😎
Stars: ✭ 68 (+25.93%)
Mutual labels:  twitter-api
twitter-stream
A Go wrapper for Twitter's V2 Filtered Stream API
Stars: ✭ 26 (-51.85%)
Mutual labels:  twitter-api
cyberevents
The protocol for EVENTs and TICKETs
Stars: ✭ 16 (-70.37%)
Mutual labels:  status
discord-twitter-webhooks
🤖 Stream tweets to Discord
Stars: ✭ 47 (-12.96%)
Mutual labels:  twitter-api
simple-ransomware
Simple ransomware to troll your friends. Encrypt and Decrypt a Windows computer using a simple xor encryption which is pretty basic!
Stars: ✭ 29 (-46.3%)
Mutual labels:  user
zf3-circlical-user
Turnkey Authentication, Identity, and RBAC for Laminas and Zend Framework 3. Supports Doctrine and Middleware.
Stars: ✭ 35 (-35.19%)
Mutual labels:  user
TinyFlowerBeds
Educational bot that posts a tiny flower bed on Twitter every few hours. Check it out if you're new to Python and open source!
Stars: ✭ 12 (-77.78%)
Mutual labels:  twitter-api
trending-twitter
Simple dashboard for getting currently trending hashtags and topics on Twitter
Stars: ✭ 23 (-57.41%)
Mutual labels:  twitter-api
out
Monitor services in your menu bar
Stars: ✭ 155 (+187.04%)
Mutual labels:  status

twitter.d.ts

Version Status Build Status Dependency Status npm bundle size (minified + gzip)

TypeScript definitions for Twitter API objects.

Carefully constructed with the data from over 400,000 Twitter API status objects. Format will match tweet_mode=extended and include_entities=true parameters set.

Note that the presence of field is not an indication of it being current and accurate part of the documented Twitter API.

Install

npm install --save-dev twitter-d

Usage

The main two interfaces provided are Status and User although there are a number of related interfaces like MediaEntity and AdditionalMediaInfo.

import type { Status as Tweet, User } from 'twitter-d';

function getTweet(): Tweet {
  /* ... */
}
function getUser(): User {
  /* ... */
}

Or if you are using TypeScript 2.9+ you can use import().

function getStatus(): import('twitter-d').Status {
  /* ... */
}

User

In some contexts, using trim_user=true on GET statuses/mentions_timeline, you might get a user object that only includes id and id_str. To test if a User value is a FullUser you can use the isFullUser helper function.

import type { isFullUser, User } from 'twitter-d';

function logUser(user: User) {
  if (isFullUser(user)) {
    console.log(user.name);
  } else {
    throw new Error('User is not type FullUser');
  }
}

Contributing

If you find find an inaccuracy please open an issue and include a status or user ID that demonstrates the difference.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].