Mirrored is a wrapper for the mirrored del.icio.us and ma.gnolia apis.

Installation

$ sudo gem install mirrored

Usage

Establish A Connection

# to magnolia
Mirrored::Base.establish_connection(:magnolia, 'jnunemaker', 'password')

# or to delicious
Mirrored::Base.establish_connection(:delicious, 'jnunemaker', 'password')

# then use any of the examples below

Last Update

Mirrored::Update.last # => ruby time object equal to last update

Posts

# => posts
Mirrored::Post.find(:get)

# => posts tagged ruby
Mirrored::Post.find(:get, :tag => 'ruby')

# => posts tagged ruby on oct. 5, 2007
Mirrored::Post.find(:get, :tag => 'ruby', :dt => '2007-10-05')

# => posts with url http://addictedtonew
Mirrored::Post.find(:get, :url => 'http://addictedtonew')

# => all posts (use sparingly according to delicious and magnolia)
Mirrored::Post.find(:all)

# => all posts for tag ruby (use sparingly according to delicious and magnolia)
Mirrored::Post.find(:all, :tag => 'ruby')

# most recent posts
Mirrored::Post.find(:recent)

# => most recent posts for tag ruby
Mirrored::Post.find(:recent, :tag => 'ruby')

# => 5 most recent posts for tag ruby
Mirrored::Post.find(:recent, :tag => 'ruby', :count => '5')
		

Tags

# gets list of all tags and the number of times you've used them
Mirrored::Tag.find(:get)

# Rename a tag
Mirrored::Tag.rename('microsoft', 'suckfest')

Dates

# => finds all dates you have posted with counts for each day
Mirrored::Date.find(:all)

# => finds all dates you have posted something tagged ruby with counts for each day
Mirrored::Date.find(:all, :tag => 'ruby')