= deliruby
Deliruby is a simple ruby wrapper for the {delicious rss feeds}[http://www.delicious.com/help/json] (not the {API}[http://www.delicious.com/help/api]), so you can use that info for your projects without dealing with xml or json.
It uses {httparty}[http://github.com/jnunemaker/httparty] and does caching with the {httparty_icebox}[http://gist.github.com/209605] for extra code readability!
==Installation
Easy as pi, just run
sudo gem install deliruby
==Usage
The module Deliruby has two classes defined: +Bookmarks+ and +PublicInfo+
===Bookmarks
Every method returns an array of instances of the class DeliciousBookmark, which has a +to_hash+ method for your
convenience. If any of the attributes wasn't found in the feed, it's set to a sensible default (+""+ for strings, +[]+ for arrays and +nil+ for the published date).
require 'deliruby'
#all methods return the same kind of data
Deliruby::Bookmarks.popular.each do |bookmark|
puts "#{bookmark.creator} marked #{bookmark.url} with the tags #{bookmark.url} on #{bookmark.date.to_s}"
end
===PublicInfo
Every method returns either an array, an array of hashes or a hash:
[alerts] An array for the system alerts for delicious
[userinfo] A hash of the public user info (bookmark count, network members and network fans)
[tags] An array of hashes for every tag associated with the number of times it has been used by a user
[network] An array of hashes with the username and profile of every user in the specified user network
[network_fans] An array of hashes with the username and profile of every fan in the specified user network
[urlinfo] The summary information for a url: a hash with the md5 hash, link, title, times bookmarked and top tags applied
It tries to return sensible data: empty arrays or hashes if nothing is returned. In some cases, though, it might raise an exception of delicious responds with a 4** or 5** HTTP status code.
== Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a
future version unintentionally.
- Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
== Copyright
Copyright (c) 2010 lfborjas. See LICENSE for details.