Sha256: b8d4a73aec18e24d043154e21e0cde86a891f0787690e52316ec510a477eb505

Contents?: true

Size: 322 Bytes

Versions: 2

Compression:

Stored size: 322 Bytes

Contents

module Virility
	class Delicious < Context
	
		def poll
			@response = self.class.get("http://feeds.delicious.com/v2/json/urlinfo/data?url=#{@url}")
			@results = @response.parsed_response.empty? ? {"total_posts" => 0} : @response.parsed_response.first
		end
		
		def count
			@results["total_posts"] || 0
		end
	
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
virility-0.0.6 lib/virility/strategies/delicious.rb
virility-0.0.5 lib/virility/strategies/delicious.rb