| 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
| VERSION | = | '0.2.0' | ||
| HAVE_SSL | = | begin require 'net/https' | check for https support (requires OpenSSL) |
| base_uri | [RW] | |
| use_proxy | [RW] | |
| user | [R] |
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
Initialize SSL for this Rubilicious instance.
NOTE: SSL certificate verification is disabled by default. See Rubilicious#initialize for information on enabling SSL certificate verification.