Skip to content

lightstream-company/tweetping-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tweetping-connect

Connect to tweetping realtime channel

Usage

import createConnection from 'tweetping-connect';

//setup a connection to stream "n3rd"
const {connect, load, info, permalink} = createConnection('n3rd');

//load wall history
load('wall').then(posts => console.log(posts));

//info on a stream
info().then(stream => console.log(stream.name));

//receive new posts in realtime
const close = connect('wall', data => console.log(data)});

//return permalink for the post with the _id "1337"
console.log(permalink(1337));

//close connection 1 min later
setTimeout(close, 60 * 1000);

About

Connect to tweetping realtime channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published