1/26/2012

[Twitter Unofficial API] Getting the tweet's number of favorites, RTs and replies

I was updating an internal tool we use at brin.gr while suddenly I needed a way to find the number of times a specific tweet has been favorited. The Search API results didn't include this information even with include_entities set to true.

I knew there was an API for that since the official web & mobile app are able to show this. So after a little network monitoring I finally found the endpoint:

https://api.twitter.com/i/statuses/[tweet.id]/activity/summary.json
Note: the request must be done via OAuth. Sample payload:
{
   "favoriters":[113682166],
   "favoriters_count":"1",
   "repliers":[],
   "repliers_count":"0",
   "retweeters_count":"1",
   "retweeters":[113682166]
}
12/15/2011

Forever-WebUI, Node-AMQP-dsl & Node-AMQP-tool

I released three library/tool/cli this last months: Forever-WebUI, Node-amqp-dslNode-amqp-tool.

Let's start with Forever-WebUI. I use forever at Brin.gr for managing node processes but I've always found the workflow slow when wanting to restart multiple scripts. So I developed a web interface that lists all running scripts and allow the user to browse logs, restart or stop scripts.

npm install forever-webui && node node_modules/forever-webui/app.js
Note: if someone here knows how to update a backbone collection's view without having to remove the entire list and adding again one by one each view feel free to enlight me ;)

Next Node-AMQP-dslNode-AMQP-tool: Brin.gr rely heavily on RabbitMQ and as usual when using the same tool everyday the little annoying things quickly become a nightmare. So AMQP-dsl is a fluent interface for node-AMQP (more examples on Github) ...


And AMQP-tool is a simple CLI to easily import & export AMQP queue. For example, exporting 5000 messages from a queue into a file is easy as:

amqp-tool --host rabbitmq.local -u user -p azerty -q queuetest --count 5000 --export > dump.json
»
 
 
Made with on a hot august night.