Permalink
Browse files

Added token retrieval and current_backlog method. Also bumped version.

  • Loading branch information...
1 parent e308fa2 commit 5b4f3ed4066e2cbeea6308c84cde63d282a1762e @Ignas Ignas committed Sep 15, 2011
Showing with 12 additions and 1 deletion.
  1. +1 −1 setup.py
  2. +11 −0 src/busyflow/pivotal/__init__.py
View
@@ -2,7 +2,7 @@
setup(
name='busyflow.pivotal',
- version='0.1.3',
+ version='0.1.4',
description='Pivotal API client library.',
author='Ignas Mikalajunas',
author_email='ignas@nous.lt',
@@ -116,6 +116,9 @@ def current(self, project_id, limit=None, offset=None):
def backlog(self, project_id, limit=None, offset=None):
return self._get("projects/%s/iterations/backlog" % project_id, limit=limit, offset=offset)
+ def current_backlog(self, project_id, limit=None, offset=None):
+ return self._get("projects/%s/iterations/current_backlog" % project_id, limit=limit, offset=offset)
+
class ActivityEndpoint(Endpoint):
@@ -124,6 +127,13 @@ def all(self, project_id, limit=None, occurred_since_date=None, newer_than_versi
occurred_since_date=occurred_since_date,
newer_than_version=newer_than_version)
+class TokenEndpoint(Endpoint):
+
+ def active(self, username, password):
+ return self._post('tokens/active',
+ username=username,
+ password=password)
+
class StoryEndpoint(Endpoint):
@@ -209,6 +219,7 @@ def __init__(self, token, parse_xml=True, cache=None, timeout=None, proxy_info=N
self.stories = StoryEndpoint(self)
self.activities = ActivityEndpoint(self)
self.iterations = IterationEndpoint(self)
+ self.tokens = TokenEndpoint(self)
def _apicall(self, endpoint, method, **params):
url = '%s%s' % (self.base_url, endpoint)

0 comments on commit 5b4f3ed

Please sign in to comment.