public
Description: Digg API wrapper in a Rails plugin.
Homepage: http://rdigg.yerhot.org
Clone URL: git://github.com/johnyerhot/rdigg.git
rdigg /
name age message
file MIT-LICENSE Loading commit data...
file README
file Rakefile
file init.rb
directory lib/ Fri Aug 29 07:13:47 -0700 2008 removed clear cache [johnyerhot]
directory tasks/ Wed Aug 27 11:07:26 -0700 2008 added rake task 'rdigg_setup' which creates a f... [johnyerhot]
directory test/
rdigg
=====

Digg API wrapper in a Rails plugin.  

Currently living at 
  git://github.com/johnyerhot/rdigg.git
  
Setup
=====

Create a Rdigg config YAML file in your applications config directory
  rake rdigg_setup
  
Be sure to replace api_key with your application's uri. 

API Keys
=======
Digg needs you to use an API key.  This should be your application's URI.
You can change the API Key by changing @api_key (see above) to your key.

More information available at
  http://apidoc.digg.com/ApplicationKeys
  
Arguments
=========
Digg's API lets you specify many arguments to filter the requested data.  Depending on what you are requesting, the 
arguments can differ.  Eventually, I'll document exactly which arguments work with each method.

Arguments get supplied as a symbol. For example:
  digg.stories.find(:count => 3)
  
If the method requires a parameter, that should be supplied first. For example:
  digg.user.find_submissions("kevinrose", :count => 3)
  

The common arguments that work on the majority of methods include:
  * :count => 5 # only returns 5 results
  * :offset => 30 # skips the first 30 results
  * :sort => object_type-asc, or object_type-desc # how to sort the results.  Substitute object_type for the object type 
  you're searching for.
  
You really should go over Digg's API wiki to see exactly what arguments and how they should be supplied.

Example
=======

  digg = Rdigg.new
  stories = digg.user.find_submissions("kevinrose", :count => 3)  # => returns an array containing the results in a 
  hash.
    stories.first[:story] # => story text


Digg returns a lot of attributes relating to what you're looking for.  Each of these are stored in the returned hash.

  stories.first[:diggs] # => number of diggs the story has.


Copyright (c) 2008 John Yerhot, released under the MIT license