0.1.1 • Published 7 years ago

spyfy v0.1.1

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
7 years ago

Your Spy for API http and Twitter hashtags (for now) in real time, all in one callback :)


Basic Usage:

var spyfy = require("spyfy");

//See SpyJS version
spyfy.version();

//Http basic
spyfy.watch_http('http://api.woonked.com/wuser/domoteco' | width=100); 

//Twitter API credentials (consumer_key,consumer_secret,access_token_key,access_token_secret)  
tw = spyfy.twitter('YOUR_CONSUMER_KEY','YOUR_CONSUMER_SECRET','YOUR_ACCESS_KEY','YOUR_TOKEN_SECRET')

//TT Twitter
spyfy.hashtalker(tw,'iot')

//Notifications
spyfy.notification(function(payload){
    //console.log('Notification',payload)
    var json = JSON.parse(payload);
    if(json.from == "http_basic")   {
        console.log('Received from http_basic');
        //console.log(payload);
    }
    else if(json.from == 'hashtalker') {
        console.log('Received from hashtalker')
        //console.log(payload);
    }   
})

Run on your browser http://localhost:3000

Spyfy Working

Notes

Twitter Apps | Generate your APIT Twitter credentials.

Contact

@Judlup judlup@gmail.com