tk
twitter-kv
npm i twitter-kv
tk

twitter-kv

🐦 Key-value store over twitter user feeds

by Kira

0.0.3 (see all)TypeScript:Not Found
npm i twitter-kv
Readme

twitter-kv

Short lived key-value store using Twitter user feeds.

Background

Sometimes you'd like to store a simple (key, value) mapping for a short time using a service that's already running and is highly available -- like Twitter.

No access tokens required!

Since HTTP scraping is used under the hood in latest-tweets, only the last couple dozen tweets will be available, making this ideal for use as a transient store.

Usage

var resolve = require('twitter-kv')

resolve('noffle', 'test', function (err, value) {
  if (err) return console.log(err)

  console.log('value:', value)
})

This will look for a recent tweet in my timeline of the format

key = value

If it finds it -- let's say I have a tweet that says foo = bar -- I can expect the following output

value: bar

API

var twitterKv = require('twitter-kv')

resolve(user, key, cb)

Queries the twitter user feed for user, looking for an entry of the form key = value. Calls cb(err, value) with the most recent value for key. Expect key to be null if no value was found.

Install

With npm installed, run

$ npm install twitter-kv

See Also

License

ISC

Downloads/wk

7

GitHub Stars

11

LAST COMMIT

6yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.0.3
latest
6yrs ago
No alternatives found
No tutorials found
Add a tutorial