Sha256: 72abe6b5da5f92622260b9ce6094469eabe91c9b06cfb8c2a84c4adb4f46b65c

Contents?: true

Size: 344 Bytes

Versions: 1

Compression:

Stored size: 344 Bytes

Contents

module Virility
  class Delicious < Strategy

    parser(
      Proc.new do |body, format|
        MultiJson.decode(body.scan(/(\{.+\})/).flatten.first)
      end
    )

    def census
      self.class.get("http://feeds.delicious.com/v2/json/urlinfo/data?url=#{@url}")
    end

    def count
      results["total_posts"] || 0
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
virility-0.1.4 lib/virility/strategies/delicious.rb