jft

jamendo-from-twitter

Extract Jamendo related data from tweets

Showing:

Popularity

Downloads/wk

6

Maintenance

No Maintenance Data Available

Package

Dependencies

4

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

A tool for extracting Jamendo related data from Twitter

Dependencies NPM version

Install

From npm

$ npm install jamendo-from-twitter

From Github

$ git clone https://github.com/vincent/jamendo-from-twitter.git
$ cd jamendo-from-twitter
$ npm install

Run in command line

$ ./harvester.js --help
$ jamendo-from-twitter --help  # if installed globally

Examples

From

I'm listening to explain - attila jelinek on Jamendo http://jamen.do/t/691953

You should get

{ "track_ids": [ "691953" ] }

From

I'm listening to attila on Jamendo http://t.co/tEQoxneNQu

You should get

{ "playlist_ids": [ "a74097" ] }

Run in javascript

// import module
var JamendoFromTwitter = require('jamendo-from-twitter')

// get an harvester
var harvester = new JamendoFromTwitter({
    twitter: twitter_app_credentials_see_config_sample
})

// listen to message events
harvester.on('message', function(message){
    // message.extracted contains jamendo data
    console.log(message.extracted)
})

harvester.on('error', function(error){
    // error object with message property
    console.log(error.message)
})

// start harvesting
harvester.startStream()

// do a search
harvester.executeSearch()

// or write data directly
harvester.write({ text: "I'm listening to attila on Jamendo http://jamen.do/t/691953" }, function(error, data) {
    if (error) {
        console.log(error)
    } else {
        console.log(data)
    }
})

// also with short links, just set the expand_links attribute
harvester.write({ text: "is a fan of attila jelinek http://t.co/9fNJrR4pNI", expand_links: true }, function(error, data) {
    if (error) {
        console.log(error)
    } else {
        console.log(data)
    }
})


Run Tests

$ node tests

Run Grunt (jslint, docs)

$ grunt

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100