Sha256: b1db4687aa2eaa63f8cd4d59d2f50f18c2dbd5fc804f5f5cffaa4d054e6589ae
Contents?: true
Size: 359 Bytes
Versions: 2
Compression:
Stored size: 359 Bytes
Contents
module Virility class StumbleUpon < Context parser( Proc.new do |body, format| MultiJson.decode(body)["result"] end ) def poll @response = self.class.get("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=#{@url}") @results = @response.parsed_response end def count @results["views"] || 0 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
virility-0.0.6 | lib/virility/strategies/stumble_upon.rb |
virility-0.0.5 | lib/virility/strategies/stumble_upon.rb |