Module: Unfuzzle
- Defined in:
- lib/unfuzzle/lib/unfuzzle.rb,
lib/unfuzzle/lib/unfuzzle/person.rb,
lib/unfuzzle/lib/unfuzzle/ticket.rb,
lib/unfuzzle/lib/unfuzzle/comment.rb,
lib/unfuzzle/lib/unfuzzle/project.rb,
lib/unfuzzle/lib/unfuzzle/request.rb,
lib/unfuzzle/lib/unfuzzle/version.rb,
lib/unfuzzle/lib/unfuzzle/priority.rb,
lib/unfuzzle/lib/unfuzzle/response.rb,
lib/unfuzzle/lib/unfuzzle/severity.rb,
lib/unfuzzle/lib/unfuzzle/component.rb,
lib/unfuzzle/lib/unfuzzle/milestone.rb,
lib/unfuzzle/lib/unfuzzle/time_entry.rb,
lib/unfuzzle/lib/unfuzzle/ticket_report.rb,
lib/unfuzzle/test/unit/unfuzzle/ticket_test.rb,
lib/unfuzzle/test/unit/unfuzzle/project_test.rb,
lib/unfuzzle/test/unit/unfuzzle/request_test.rb,
lib/unfuzzle/test/unit/unfuzzle/priority_test.rb,
lib/unfuzzle/test/unit/unfuzzle/response_test.rb,
lib/unfuzzle/test/unit/unfuzzle/severity_test.rb,
lib/unfuzzle/test/unit/unfuzzle/component_test.rb,
lib/unfuzzle/test/unit/unfuzzle/milestone_test.rb
Overview
Unfuzzle: A simple wrapper around the Unfuddle JSON API
Quick Start
To get started, you need to set the subdomain and a valid username / password combination:
require 'rubygems'
require 'unfuzzle'
Unfuzzle.subdomain = 'viget'
Unfuzzle.username = 'bopbip'
Unfuzzle.password = 'bleep'
From there, you can start accessing a list of projects:
>> Unfuzzle.projects
=> [#<Unfuzzle::Project:0x5f5c44 @id=1, @name="BlipCo", ...>, ... ]
Or a specific project by its ‘short name’:
>> Unfuzzle.project('sample')
=> #<Unfuzzle::Project:0x123f888 @id=2, @name="Sample Project", ... >
For more usage documentation, see README.doc.
Defined Under Namespace
Modules: Version Classes: Comment, Component, ComponentTest, Milestone, MilestoneTest, Person, Priority, PriorityTest, Project, ProjectTest, Request, RequestTest, Response, ResponseTest, Severity, SeverityTest, Ticket, TicketReport, TicketTest, TimeEntry, TimeEntryGroup
Class Method Summary collapse
-
.password ⇒ Object
:nodoc:.
-
.password=(password) ⇒ Object
Set the password for the supplied username.
-
.project(id_or_slug) ⇒ Object
Retrieve a project for the current user by its ID or slug.
-
.projects ⇒ Object
Get a list of all projects for this user.
-
.subdomain ⇒ Object
:nodoc:.
-
.subdomain=(subdomain) ⇒ Object
Set the subdomain for all requests.
-
.use_ssl ⇒ Object
:nodoc:.
-
.use_ssl=(value) ⇒ Object
Use SSL: yes or no.
-
.username ⇒ Object
:nodoc:.
-
.username=(username) ⇒ Object
Set the username for all requests.
Class Method Details
.password ⇒ Object
:nodoc:
79 80 81 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 79 def self.password # :nodoc: @password end |
.password=(password) ⇒ Object
Set the password for the supplied username
52 53 54 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 52 def self.password=(password) @password = password end |
.project(id_or_slug) ⇒ Object
Retrieve a project for the current user by its ID or slug
62 63 64 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 62 def self.project(id_or_slug) id_or_slug.is_a?(String) ? Project.find_by_slug(id_or_slug) : Project.find_by_id(id_or_slug) end |
.projects ⇒ Object
Get a list of all projects for this user
67 68 69 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 67 def self.projects Project.all end |
.subdomain ⇒ Object
:nodoc:
71 72 73 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 71 def self.subdomain # :nodoc: @subdomain end |
.subdomain=(subdomain) ⇒ Object
Set the subdomain for all requests
41 42 43 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 41 def self.subdomain=(subdomain) @subdomain = subdomain end |
.use_ssl ⇒ Object
:nodoc:
83 84 85 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 83 def self.use_ssl # :nodoc: @use_ssl end |
.use_ssl=(value) ⇒ Object
Use SSL: yes or no
57 58 59 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 57 def self.use_ssl=(value) @use_ssl = value end |
.username ⇒ Object
:nodoc:
75 76 77 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 75 def self.username # :nodoc: @username end |
.username=(username) ⇒ Object
Set the username for all requests. Data retrieved from the API will be scoped to the data that this user has access to.
47 48 49 |
# File 'lib/unfuzzle/lib/unfuzzle.rb', line 47 def self.username=(username) @username = username end |