API Reference

Python API for Teambox

copyright:
  1. 2011 by Openlabs Technologies & Consulting (P) Limited
license:

BSD, see LICENSE for more details.

class teambox.Activity(base_url=None, username=None, password=None)[source]

An activity is a record of what happened in a Project.

index(project=None, threads=None)[source]

Returns the most recent activities in the project.

Related objects required to reconstruct a Teambox timeline are stored in references.

By default all the activities will be returned, but by providing threads=True as a parameter, comments inside threads won’t be returned.

This is ideal for apps that want to display a compact view of activities (such as the collapsed view on the web version).

show(activity, project=None)[source]

Returns the data for an activity in the project.

class teambox.BaseAPI(base_url=None, username=None, password=None)[source]

Base implementation of the API

api_version

The version of teambox api to connect to

get(resource)[source]

proxy for make_request() which sends a GET to given uri

make_request(resource, data=None, method=None)[source]

Send a request

Tip

Use the method below which proxy this method as a restful interface. See post(), get(), delete() and put()

Parameters:resource – resource path without / in beginning
post(resource, data)[source]

A proxy for make_request() which sends a post to given uri

class teambox.Comment(base_url=None, username=None, password=None)[source]

A comment is the core model for communication in Teambox.

Comments can belong to a Project, a Conversation, or Task.

create(data, conversation=None, task=None, project=None)[source]

Creates a new comment. You can specify the target of the comment using one of the appropriate routes.

For time tracking, simply pass in time taken using the hours parameter. Acceptable values are the same as on the web frontend - e.g. 12h, 1.4, 13m, 2:15.

Routes:

  • projects/:project_id/conversations/:conversation_id/comments
  • projects/:project_id/tasks/:task_id/comments
  • conversations/:conversation_id/comments
  • tasks/:task_id/comments
destroy(comment)[source]

Destroys a comment. You need to be either the owner of the comment, or an administrator of the target project for this to work.

Note

This does not completely implement the paths impemented by teambox

index(task=None, conversation=None, project=None, target_type=None)[source]

Returns the most recent comments in a the target.

Use the optional target_type parameter to filter tasks by their target type, which can be either Conversation or Task. For example, to only view only comments belonging to conversations, you would query

show(comment)[source]

Returns the data for an comment.

Note

This does not completely implement the paths impemented by teambox

update(comment, data)[source]

Updates the content of a comment.

Warning

You can no longer update comments 15 minutes after they have been created.

class teambox.Conversation(base_url=None, username=None, password=None)[source]

Conversation is a group of comments.

It can also act as a thread in the project overview. Comments belong to a Project.

Warning

NOT IMPLEMENTED YET

class teambox.Invitation(base_url=None, username=None, password=None)[source]

An Invitation invites a User to a Project, via email.

Warning

NOT IMPLEMENTED YET

class teambox.Membership(base_url=None, username=None, password=None)[source]

A membership links a User to an Organization.

To add people to an organization, make an Invitation.

destroy(organization, membership)[source]

Destroys a member in the organization.

Tip

You need to be an administrator in the organization for this to work.

index(organization)[source]

Returns the most recent people in the project.

show(organization, membership)[source]

Returns the data for a person in the project

update(organization, membership, role)[source]

Updates a membership in the project.

You need to be an administrator in the organization for this to work.

Roles are as follows:

  • 10 External
  • 20 Participant
  • 30 Admin
class teambox.Organization(base_url=None, username=None, password=None)[source]

Organizations group together Projects and User`s (via :class:`Membership).

create(data)[source]

Creates a new organization

index()[source]

Returns the most recent organizations you own or belong to.

By default external organizations* aren’t included. They can be included by adding external=true as a GET parameter

*External organization: An organization that owns a project the user
is in, but he’s not on the organization.
show(organization)[source]

Returns the data for a given organization

update(organization, data)[source]

Updates an organization

teambox.People

A proxy object for Person as teambox documentation list says People instead of Person

alias of Person

class teambox.Person(base_url=None, username=None, password=None)[source]

A person links a User to a Project.

To add people to a project, make an Invitation.

destroy(project, person)[source]

Destroys a person in the project. You need to be an administrator in the project for this to work.

index(project)[source]

Returns the most recent people in the project.

show(project, person)[source]

Returns the data for a person in the project

update(project, person, role)[source]

Updates a person in the project.

Note

You need to be an administrator in the project for this to work.

Roles are as follows:

  • 0 Observer
  • 1 Commenter
  • 2 Participant
  • 3 Admin
class teambox.Project(base_url=None, username=None, password=None)[source]

Projects contain most of the objects present in Teambox.

create(data, organization=None)[source]

Routes:

  • projects
  • organizations/:organization_id/projects
destroy(project, organization=None)[source]

Destroys a project.

Note

You must be the owner in order to perform this action.

index(organization=None)[source]

Returns the most recent projects you own or belong to.

Tip

You can also filter by organization by passing in organization_id.

show(project, organization=None)[source]

Returns the data for a given project

update(project, data, organization=None)[source]

Updates a project

class teambox.RequestWithMethod(*args, **kwargs)[source]

Implementation of urllib2.Request which also takes a method

class teambox.TaskList(base_url=None, username=None, password=None)[source]

A task list is a collection of Tasks in a Project.

archive(project, task_list)[source]

Archives the task list.

Warning

All tasks belonging to the task list will be updated and resolved.

destroy(task_list, project=None)[source]

Destroys a task list.

index(project=None, archived=None)[source]

Returns the most recent task lists in a project.

Tip

To filter by archived or unarchived lists, pass in the optional archived parameter. To view everything, simply omit the archived parameter.

reorder(project, order)[source]

Reorders the task lists in a project according to the order each task list id is presented in task_list_ids.

Parameters:order – List of task_list ids in the order
show(task_list, project=None)[source]

Returns the data for a task list.

unarchive(project, task_list)[source]

Unarchives the task list.

update(task_list, data, project=None)[source]

Updates the name, start date and end date of a task list.

Previous topic

Welcome to Teambox Client’s documentation!

This Page