Sha256: 2b22f1d2e4c120725697dacb404ad205833943d498d9ad7618d0b36cd6cbb538

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

module GoogleAjax
  module Feed
    FEED_VERSION = 1.0
    # Arguments: http://code.google.com/apis/ajaxfeeds/documentation/reference.html#_intro_fonje
    def self.get(method, query, args)
      args = { :v => FEED_VERSION }.merge(args)
      GoogleAjax::get(:feed, method, query, args)
    end

    # will return a list of feeds that match the given query
    # Arguments: http://code.google.com/apis/ajaxfeeds/documentation/reference.html#_fonje_find
    def self.find(query, args = {})
      self.get(:find, query, args)
    end

    # downloads this feed from Google's servers
    # Arguments: http://code.google.com/apis/ajaxfeeds/documentation/reference.html#_fonje_load
    def self.load(url, args = {})
      self.get(:load, url, args)
    end

    # will return the associated feed if it exists for a given url    
    # Arguments: http://code.google.com/apis/ajaxfeeds/documentation/reference.html#_intro_fonje
    def self.lookup(url, args = {})
      self.get(:lookup, url, args)
    end    

    class Entry < Base
    end    

    class Feed < Base
      remap :entries => Entry
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
googleajax-0.2.0 lib/googleajax/feed.rb