scouter - easily get social data [RubyGems]

I created a RubyGem morizyun/scouter - GitHub.

This gem helps you to get social data of some following services related with URIs:

1
2
3
4
5
6
7
8
9
10
* Buffer
* Facebook
* feedly
* GitHub
* Google+
* Hatena Bookmark
* Linkedin
* Pinterest
* Pocket
* Twitter

Features

1
2
3
4
* allocate a thread per social service
* get social data of multi-URIs per one access to Facebook & Hatena Bookmark
* select some services which you want to know
* support modern major services

Installation

Add this line to your application’s Gemfile:

1
gem 'scouter'

And then execute:

1
gem install scouter

Or install it yourself as:

1
$ gem install http_status_checker

Usage on Command Line

After installing the gem, you can get social data related with URIs on terminal.

1
scouter -u [page url]

Usage on Ruby Program

In Ruby programming, It is possible to collect social data like the following code:

1
2
3
4
5
6
7
8
9
10
11
12
require 'scouter'
results, errors = Scouter.get_count('http://google.com')
results.each do |url, service|
puts url #=> http://google.com
puts service.buffer #=> 129
puts service.facebook #=> 166458
puts service.googleplus #=> 139198
puts service.hatenabookmark #=> 13466
puts service.linkedin #=> 216
puts service.pinterest #=> 1
puts service.twitter #=> 1358112

You can put an array of URIs on argument:

1
2
3
require 'scouter'
results, errors = Scouter.get_count(['http://google.com', 'http://www.yahoo.co.jp'])

In addition, you can get specific services which you selected like the following:

1
2
3
4
5
6
results, errors = SocialCounter.new('http://google.com', [Scouter::Facebook, Scouter::Twitter])
results.each do |url, service|
puts url #=> http://google.com
puts service.facebook #=> 166458
puts service.twitter #=> 1358112
end

Supported Services

Services which the gem support are as follows:

1
2
3
4
5
6
7
8
9
10
* Scouter::Buffer
* Scouter::Facebook #=> total count in Facebook Graph API
* Scouter::Feedly #=> subscriber count in only feed url
* Scouter::Github #=> star count in only github repository url
* Scouter::GooglePlus
* Scouter::HatenaBookmark
* Scouter::Linkedin
* Scouter::Pinterest
* Scouter::Pocket
* Scouter::Twitter