Project

thecount

0.0
No commit activity in last 3 years
No release in over 3 years
Provides a simple interface for counting and reporting arbitrary things on the web
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

TheCount Gem

Provides a simple interface for counting and reporting arbitrary things on the web

Mascot

Installation

gem install thecount

Sample Usage

# Setup a counting request
data = TheCount::count do |config|
  # What do we want to count
  config[:strategies] = [ TheCount::Twitter, TheCount::Facebook, TheCount::LinkedIn, TheCount::Google::Plus ]

  # Where do we want to count it
  config[:args] = { :url => "http://techcrunch.com/2011/06/16/rebecca-black-friday-video-no-longer-available-on-youtube/" }
end

# Print out all the values
p "#{data[TheCount::Twitter].service_name} -> #{data[TheCount::Twitter].value}"
p "#{data[TheCount::Facebook].service_name} -> #{data[TheCount::Facebook].value}"
p "#{data[TheCount::LinkedIn].service_name} -> #{data[TheCount::LinkedIn].value}"
p "#{data[TheCount::Google::Plus].service_name} -> #{data[TheCount::Google::Plus].value}"

# (at the time of this example)
# twitter -> 900
# facebook -> 3000
# linkedin -> 444
# google -> 44

Supported Services

  • TheCount::Twitter (Twitter Link Shares)
  • TheCount::Facebook (Facebook Likes)
  • TheCount::Facebook::Comments (Facebook Comment threads)
  • TheCount::LinkedIn (LinkedIn Shares)
  • TheCount::Google::Buzz (Google Buzzes)
  • TheCount::Google::Plus (Google Pluses)
  • TheCount::Digg (Digg diggs)

Tests

To run the test suite run

rake test

Notes

This library essentially makes calls to the otherwise jsonp endpoint to the respective service. I've also purposely gone through the client api's like this to avoid the need to auth.