Class Rubilicious
In: rubilicious.rb  (CVS)
Parent: Object

Rubilicious - Delicious (del.icio.us/) bindings for Ruby.

You‘ll need to create an account at Delicious (del.icio.us/) in order to use this API.

Simple Examples:

  # load rubilicious
  require 'rubilicious'

  # connect to delicious and get a list of your recent posts
  r = Rubilicious.new('user', 'password')
  r.recent.each do |post|
    puts "#{post['description']}: #{post['href']}"
  end

  # add a new link to delicious
  r.add('http://pablotron.org/', 'Pablotron.org')

  # save recent funny posts to an XBEL file
  File.open('funny_links.xbel', 'w') do |file|
    file.puts Rubilicious.xbel(r.recent('funny'))
  end

Methods

Classes and Modules

Module Rubilicious::Extras
Class Rubilicious::Error
Class Rubilicious::HTTPError
Class Rubilicious::NoSSLError

Constants

VERSION = '0.2.0'
HAVE_SSL = begin require 'net/https'   check for https support (requires OpenSSL)

Attributes

base_uri  [RW] 
use_proxy  [RW] 
user  [R] 

Public Class methods

Convert an array of posts (bookmarks) to an XBEL string.

Note: This method is significantly less taxing on Delicious than Rubilicious#to_xbel, since it acts on an array of posts in memory rather than a series of remote calls like it’s counterpart.

Raises an exception on error.

Example:

  File.open('output.xbel', 'w') do |file|
    # grab all recent posts
    results = r.recent

    # save results to file
    file.puts Rubilicous.xbel(results)
  end

Protected Instance methods

Initialize SSL for a particular HTTP connection

Initialize SSL for this Rubilicious instance.

NOTE: SSL certificate verification is disabled by default. See Rubilicious#initialize for information on enabling SSL certificate verification.

[Validate]