public
Description: A simple wrapper around the Unfuddle XML API
Homepage: http://viget.com/extend
Clone URL: git://github.com/vigetlabs/unfuzzle.git
reagent (author)
Thu Jul 02 06:17:16 -0700 2009
commit  212521ebe6393455c567150159be73144d46b10d
tree    f7265ebc08580afdade456c5f2e1c6f382c35ac2
parent  ca1de3ef965e82bd2628a61afb75dbf64b66e784
name age message
file .gitignore Loading commit data...
file README.rdoc
file Rakefile
directory lib/
directory test/
file unfuzzle.gemspec
README.rdoc

Unfuzzle

Description

The Unfuzzle gem provides an interface to the Unfuddle JSON API

Installation

    sudo gem install vigetlabs-unfuzzle --source=http://gems.github.com

Usage

To get started, you’ll need your Unfuddle subdomain and a valid username / password combination:

    require 'unfuzzle'

    Unfuzzle.subdomain = 'viget'
    Unfuzzle.username  = 'bopbip'
    Unfuzzle.password  = 'bleep'

Once that is configured, you can start accessing data from the API.

Projects

Pulling back a list of projects is simple. Based on the currently logged-in user, you can see which ones he has access to:

    projects = Unfuzzle.projects # => [#<Unfuzzle::Project:0x11e9280 ...> , ...]

If you don’t want all projects, you can find one by its slug (or short name):

    Unfuzzle.project('salty') # => #<Unfuzzle::Project:0x11e9280 ...>

Or by ID:

    Unfuzzle.project(1) # => #<Unfuzzle::Project:0x11e9280 ...>

There are a few attributes available for a project:

    project = Unfuzzle.projects.first
    project.id                              # => 123
    project.slug                            # => "salty"
    project.name                            # => "Salty Co."
    project.archived?                       # => false
    project.created_at.strftime('%Y-%m-%d') # => "2008-07-28"

To see a list of additional attributes, take a look at the documentation for Project.

Milestones

Each project can have milestones. You can access these from a single project:

    project.milestones # => [#<Unfuzzle::Milestone:0x10bdca8 ...>, ...]

Milestones have attributes:

    milestone = project.milestones.first
    milestone.id                          # => 1
    milestone.name                        # => "Milestone #1"
    milestone.due_on.strftime('%m/%d/%Y') # => "07/30/2008"

A full list is available in the Milestone documentation.

Tickets

Tickets exist for a project:

    ticket = project.tickets.first
    ticket.title        # => "Ticket #23"
    ticket.number       # => 23
    ticket.description  # => "Yo dawg, I hear you like tickets in your project ..."
    ticket.status       # => "closed"

And can also be associated to a milestone for the project:

    ticket = project.milestones.first.tickets.first
    ticket.title        # => "Ticket #1"
    ticket.number       # => 1
    ticket.description  # => "Wash my car"
    ticket.status       # => "closed"

See the Ticket documentation for more information.

License

Copyright © 2009 Patrick Reagan of Viget Labs (patrick.reagan@viget.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.