johnyerhot / rdigg Goto Github PK
View Code? Open in Web Editor NEWDigg API wrapper in a Rails plugin.
Home Page: http://rdigg.yerhot.org
License: MIT License
Digg API wrapper in a Rails plugin.
Home Page: http://rdigg.yerhot.org
License: MIT License
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.