Sha256: ccb0aa9f46bb7af22770e25ea199da9432a7506b158a211ca966826d425295cd
Contents?: true
Size: 485 Bytes
Versions: 1
Compression:
Stored size: 485 Bytes
Contents
require 'httparty' module Feediscovery class Feed attr_reader :href, :title, :rel, :type def initialize(params = {}) @href = params["href"] @title = params["title"] @rel = params["rel"] @type = params["type"] end end include HTTParty base_uri 'http://feediscovery.appspot.com/' default_params :output => 'json' format :json def self.extract(url) get('/', :query => {:url => url}).map() {|f| Feed.new(f)} end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feediscovery-1.0.0 | lib/feediscovery.rb |