Sha256: eeade4f4a8267a53da1fca9e735281700a569bb0c6a2ed574d60045d8aa0704f

Contents?: true

Size: 326 Bytes

Versions: 5

Compression:

Stored size: 326 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

5 entries across 5 versions & 1 rubygems

Version Path
virility-0.4.0 lib/virility/strategies/stumble_upon.rb
virility-0.3.1 lib/virility/strategies/stumble_upon.rb
virility-0.3.0 lib/virility/strategies/stumble_upon.rb
virility-0.2.0 lib/virility/strategies/stumble_upon.rb
virility-0.1.4 lib/virility/strategies/stumble_upon.rb