Method: Chomchom::SocialAnalytics#google_buzz

Defined in:
lib/chomchom/social_analytics.rb

#google_buzzObject



74
75
76
77
78
79
80
81
82
83
# File 'lib/chomchom/social_analytics.rb', line 74

def google_buzz
  begin
    @agent.get("http://www.googleapis.com/buzz/v1/activities/count?alt=json&url=#{@url}")
    google_buzz = JSON.parse(@agent.page.body)['data']['counts'][@url][0]['count']
  #check multiple sites
  #"https://www.googleapis.com/buzz/v1/activities/count?alt=json&url=http://news.ycombinator.com&url=http://www.techcrunch.com&url=http://www.cnn.com"
  rescue
    0
  end
end