Fanfou Streaming SDK for Node.js
$ npm install fanfou-streamer
const Streamer = require('fanfou-streamer')
const streamer = new Streamer({
consumerKey: '',
consumerSecret: '',
oauthToken: '',
oauthTokenSecret: ''
})
streamer.start()
streamer.on('message.reply', data => {
console.log(data)
})
streamer.on('message.mention', data => {
console.log(data)
})
For the data
structures of these events respectively please refer to the Fanfou Streaming API docs.
message.delete
message.reply
message.mention
user.updateprofile
friends.create
friends.delete
friends.request
fav.create
fav.delete
dm.create
Start streaming.
Stop streaming.
Example:
streamer.on('message.reply', data => {
console.log(data)
})
- fanfou-sdk - Fanfou SDK for Node.js
- nofan - CLI for Fanfou
- maofan-apn - APN service for Maofan
- fanfou-desktop-notifier - Fanfou notifier for desktop
MIT © LitoMore