Sha256: 174ed7ec330967755004f5912d55ae79b0b62328abec441c2158dc5efbc3f9fe

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

module Virility
  class StumbleUpon < Strategy

    parser(
      Proc.new do |body, format|
        MultiJson.decode(body)["result"]
      end
    )
  
    def census
      self.class.get("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=#{@url}")
    end
    
    def count
      results["views"] || 0
    end
  
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
virility-0.1.3 lib/virility/strategies/stumble_upon.rb
virility-0.1.2 lib/virility/strategies/stumble_upon.rb
virility-0.1.1 lib/virility/strategies/stumble_upon.rb