Module Rubilicious::Extras::Rubilicious
In: rubilicious.rb  (CVS)

Methods

inbox   inbox_dates   sub   subs   unsub   user_posts  

Public Instance methods

Returns a array of inbox entries, optionally filtered by date.

Raises an exception on error.

Example:

  # print a list of posts and who posted them
  r.inbox.each { |post| puts "#{post['user']},#{post['href']}" }

Returns a hash of dates containing inbox entries.

Raises an exception on error.

Example:

  # print out a list of the 10 busiest inbox dates
  dates = r.inbox_dates
  puts dates.keys.sort { |a, b| dates[b] <=> dates[a] }.slice(0, 10)

Add a subscription, optionally to a specific tag.

Raises an exception on error.

Example:

  # subscribe to 'humor' links from solarce
  r.sub('solarce', 'humor')

Returns a hash of your subscriptions.

Raises an exception on error.

Example:

  # print out a list of subscriptions
  subs = r.subs
  puts "user:tags"
  subs.keys.sort.each do |sub|
    puts "#{sub}:#{subs[sub].join(' ')}"
  end

Removes a subscription, optionally only a specific tag.

Raises an exception on error.

Example:

  # unsubscribe from all links from giblet
  r.unsub('giblet')

Return all of a user’s posts, optionally filtered by tag.

WARNING: This method can generate a large number of requests to Delicious, and could be construed as abuse. Use sparingly, and at your own risk.

Raises an exception on error.

Example:

  # save all posts every by 'delineator' to XBEL format to file
  # "delineator.xbel"
  File.open('delineator.xbel', 'w') do |file|
    file.puts Rubilicious.xbel(r.user_posts('delineator'))
  end

[Validate]