Example #1
0
def get_story(guid, project_id, story_id):
    if not story_id:
        raise Exception("You must specify a story id")

    d = _get_data(guid, STORY_URL, (project_id, story_id),
                  'projects/{0}/stories/{1}.xml')
    return parse(d)
Example #2
0
def get_activities(guid, story_id):
    if not story_id:
        raise Exception("You must specify a story id")

    page = 0
    while True:
        data = _get_data(guid, ACTIVITIES_URL, (story_id, page), "stories/{0}/activities_{1}.xml")
        page += 1
        if num_subitems(data) < 100 or has_story_creation(data):
            break
        elif page > 10:
            raise Exception("Probably broken parsing - we're at page %d", page)

    return parse(data)
Example #3
0
def get_activities(guid, story_id):
    if not story_id:
        raise Exception("You must specify a story id")

    page = 0
    while True:
        data = _get_data(guid, ACTIVITIES_URL, (story_id, page),
                         'stories/{0}/activities_{1}.xml')
        page += 1
        if num_subitems(data) < 100 or has_story_creation(data):
            break
        elif page > 10:
            raise Exception("Probably broken parsing - we're at page %d", page)

    return parse(data)
Example #4
0
def get_stories(guid, project_id):
    xml = _get_data(guid, STORIES_URL, (project_id, ),
                    'projects/{0}/stories.xml')
    return parse(xml)
Example #5
0
def get_projects(guid):
    xml = _get_data(guid, PROJECTS_URL, (), 'projects.xml')
    return parse(xml)
Example #6
0
def get_story(guid, project_id, story_id):
    if not story_id:
        raise Exception("You must specify a story id")

    d = _get_data(guid, STORY_URL, (project_id, story_id), "projects/{0}/stories/{1}.xml")
    return parse(d)
Example #7
0
def get_stories(guid, project_id):
    xml = _get_data(guid, STORIES_URL, (project_id,), "projects/{0}/stories.xml")
    return parse(xml)
Example #8
0
def get_projects(guid):
    xml = _get_data(guid, PROJECTS_URL, (), "projects.xml")
    return parse(xml)