Project

deliruby

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for the delicious.com public rss feeds
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

= 0.6.1
 Project Readme

deliruby¶ ↑

Deliruby is a simple ruby wrapper for the delicious rss feeds (not the API), so you can use that info for your projects without dealing with xml or json.

It uses httparty and does caching with the httparty_icebox 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 © 2010 lfborjas. See LICENSE for details.