All Projects → FeedHive → Twitter Api Client

FeedHive / Twitter Api Client

Licence: mit
A user-friendly Node.js / JavaScript client library for interacting with the Twitter API.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Twitter Api Client

tweetsOLAPing
implementing an end-to-end tweets ETL/Analysis pipeline.
Stars: ✭ 24 (-95.36%)
Mutual labels:  twitter-api, api-client
Twitter
Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Stars: ✭ 755 (+46.03%)
Mutual labels:  api-client, twitter-api
Wptools
Wikipedia tools (for Humans): easily extract data from Wikipedia, Wikidata, and other MediaWikis
Stars: ✭ 371 (-28.24%)
Mutual labels:  api-client
Book Socialmediaminingpython
Companion code for the book "Mastering Social Media Mining with Python"
Stars: ✭ 462 (-10.64%)
Mutual labels:  twitter-api
Td Ameritrade Python Api
Unofficial Python API client library for TD Ameritrade. This library allows for easy access of the Standard API, and allows users to build data pipelines for the Streaming API.
Stars: ✭ 406 (-21.47%)
Mutual labels:  api-client
Codebird Js
A Twitter library in JavaScript.
Stars: ✭ 382 (-26.11%)
Mutual labels:  twitter-api
Bitly
A Ruby wrapper for the bit.ly API
Stars: ✭ 435 (-15.86%)
Mutual labels:  api-client
Tweetbotornot
🤖 R package for detecting Twitter bots via machine learning
Stars: ✭ 355 (-31.33%)
Mutual labels:  twitter-api
Twitter Php
Small and easy PHP library for sending messages to Twitter and receiving statuses.
Stars: ✭ 507 (-1.93%)
Mutual labels:  twitter-api
Pywikibot
🤖 A Python library that interfaces with the MediaWiki API. This is a mirror from gerrit.wikimedia.org. Do not submit any patches here. See https://www.mediawiki.org/wiki/Developer_account for contributing.
Stars: ✭ 399 (-22.82%)
Mutual labels:  api-client
Qiskit Api Py
This repository and the qiskit-api-py package are deprecated, and no longer supported. A Python library for the Quantum Experience API
Stars: ✭ 458 (-11.41%)
Mutual labels:  api-client
Linqtotwitter
LINQ Provider for the Twitter API (C# Twitter Library)
Stars: ✭ 401 (-22.44%)
Mutual labels:  twitter-api
Twitter Sort
🐦 Sort numbers with some help from the Twitter API
Stars: ✭ 384 (-25.73%)
Mutual labels:  twitter-api
Python Redmine
Python Redmine is a library for communicating with a Redmine project management application
Stars: ✭ 440 (-14.89%)
Mutual labels:  api-client
Search Tweets Python
Python client for the Twitter search endpoints (v2/Labs/premium/enterprise). Now supports Twitter API v2 /recent and /all search endpoints.
Stars: ✭ 378 (-26.89%)
Mutual labels:  twitter-api
Datafire
A framework for building integrations and APIs
Stars: ✭ 487 (-5.8%)
Mutual labels:  api-client
Diplomat
A HTTP Ruby API for Consul
Stars: ✭ 358 (-30.75%)
Mutual labels:  api-client
Php Redmine Api
A simple PHP Redmine API client, Object Oriented
Stars: ✭ 392 (-24.18%)
Mutual labels:  api-client
Twitteroauth
The most popular PHP library for use with the Twitter OAuth REST API.
Stars: ✭ 4,134 (+699.61%)
Mutual labels:  twitter-api
Python3 Krakenex
REST Exchange API for Kraken.com, Python 3
Stars: ✭ 523 (+1.16%)
Mutual labels:  api-client

Twitter API Client

Node.js client for Twitter API

NPM Version Build Status

Table of content

Features

☑️ Includes 90% of the official Twitter API endpoints.
☑️ Promise-based! No ugly callbacks.
☑️ Fully typed! Both for query parameters and responses.
☑️ Inbuilt in-memory cache for rate-limit friendly usage.

Getting Started

Get your Twitter credentials

You will need to create a set of Twitter developer credentials from your Twitter Developer account.
If you don't have one already, apply for a developer account here.
It takes about 5 minutes.

Install

npm i twitter-api-client

Usage

import { TwitterClient } from 'twitter-api-client';

const twitterClient = new TwitterClient({
  apiKey: '<YOUR-TWITTER-API-KEY>',
  apiSecret: '<YOUR-TWITTER-API-SECRET>',
  accessToken: '<YOUR-TWITTER-ACCESS-TOKEN>',
  accessTokenSecret: '<YOUR-TWITTER-ACCESS-TOKEN-SECRET>',
});

// Search for a user
const data = await twitterClient.accountsAndUsers.usersSearch({ q: 'twitterDev' });

// Get message event by Id
const data = await twitterClient.directMessages.directMessagesEventsShow({ id: '1234' });

// Get most recent 25 retweets of a tweet
const data = await twitterClient.tweets.statusesRetweetsById({ id: '12345', count: 25 });

// Get local trends
const data = await twitterClient.trends.trendsAvailable();

See all available methods here.

Configuration

twitter-api-client comes with an inbuilt in-memory cache.
The stale data is served by the cache-first principle.

You can configure the caching behavior upon instantiation of the client:

const twitterClient = new TwitterClient({
  apiKey: '<YOUR-TWITTER-API-KEY>',
  apiSecret: '<YOUR-TWITTER-API-SECRET>',
  accessToken: '<YOUR-TWITTER-ACCESS-TOKEN>',
  accessTokenSecret: '<YOUR-TWITTER-ACCESS-TOKEN-SECRET>',
  ttl: 120, // seconds. Defaults to 360
  disableCache: true, // Disables the caching behavior. Defaults to 'false'
  maxByteSize: 32000000, // Maximum (approximated) memory size for cache store. Defaults to 16000000.
});

License

This project is licensed under the MIT License

Get Help

Contribute

Issues

In the case of a bug report, bugfix or a suggestions, please feel very free to open an issue.

Pull request

Pull requests are always welcome, and I'll do my best to do reviews as fast as I can. Please refer to the contribution guide to see how to get started.

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].