-
Notifications
You must be signed in to change notification settings - Fork 184
This gem provides a wrapper around Version 3 of the Pivotal Tracker API
Before accessing any tracker project you need to setup your authentication method. Also you can tell the client to use SSL for all future requests (SSL must be used for authentication to the API)
Description | Call |
---|---|
Authenticate using HTTP Auth |
PivotalTracker::Client.token('myusername', 'secretpassword') |
Manually setting the token |
PivotalTracker::Client.token = "a8374m39d83md0384dwq0" |
Use SSL for all requests |
PivotalTracker::Client.use_ssl = true |
Description | Call | Response |
---|---|---|
Get all projects associated with your account |
PivotalTracker::Project.all |
Array |
Find tracker project 4876867 |
PivotalTracker::Project.find(4876867) |
PivotalTracker::Project |
Description | Call | Response |
---|---|---|
Get all activity for projects associated with this account |
PivotalTracker::Activity.all |
Array |
The requests below all operate on a particular project.
We will assume that @project.is_a?(PivotalTracker::Project)
is true.
Everything below has a #all and #find method, with the exception of Notes.
Description | Call | Response |
---|---|---|
Get all stories |
@project.stories.all |
Array of PivotalTracker::Story objects (limit of 3000 at a time) |
Get story with ID 66347 |
@project.stories.find(66347) |
PivotalTracker::Story |
Get all stories in the icebox |
@project.stories.all(:current_state => 'unscheduled') |
Array of PivotalTracker::Story objects |
Get all bugs and chores |
@project.stories.all(:story_type => ['chore', 'bug']) |
Array of PivotalTracker::Story objects |
Get all features labeled as ‘delayed’ |
@project.stories.all(:labels => 'delayed') |
Array of PivotalTracker::Story objects |
Create a new feature |
@project.stories.create(:story_type => 'feature', :name => 'Finish API') |
PivotalTracker::Story |
You can use any of the supported filters from the PivotalTracker search box, in addition to limit and offset for pagination. The format for these are for single values, :filter_name => 'value'
, and for multiple values, :filter_name => ['value1', 'value2']
.
Description | Call | Response |
---|---|---|
Get project activity |
@project.activities.all |
Array of PivotalTracker::Activity objects |
Get project activity since Dec 31, 2009 |
@project.activities.all(:occurred_since_date => "2009/12/31 00:00:00 UTC") |
Array of PivotalTracker::Activity objects |
Get project activity since version 84 |
@project.activities.all(:newer_than_version => 84) |
Array of PivotalTracker::Activity objects |
Nothing special outside of getting all or finding an individual iteration.
The requests below all operate on a particular project.
We will assume that @story.is_a?(PivotalTracker::Story)
is true.
Description | Call | Response |
---|---|---|
Add a task to a story |
@story.tasks.create(:description => 'talk to client') |
PivotalTracker::Task |
Delete a task |
@story.tasks.find(74685).delete |
|
Mark a task completed |
@story.tasks.find(74685).update(:complete => true) |
PivotalTracker::Task |
Description | Call | Response |
---|---|---|
Add a note/comment to a story |
@story.notes.create(:text => 'this is almost done.') |