Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 1.91 KB

stories.md

File metadata and controls

89 lines (66 loc) · 1.91 KB

Stories

Before that setup the default client, or will inject your own client.

Creating

new_story = { 'comments':[ {'text': 'A comment to start the story'} ],
                'deadline': '2016-12-31T12:30:00Z',
                'estimate': 8,
                'labels': [ {'name': 'High'}, {'name': 'bug' } ],
                'name': "Can't login and get 503",
                'project_id': 4,
                'story_type': 'bug',
                'tasks': [ {'description': 'Monitor server load' } ]}
story = await club_house.stories.create(**new_story)

Create Multiple Stories

many_stories = { "stories": [
    {'name': "Login",
     'project_id': 4,
     'story_type': 'bug'}, 
    {
     'name': "Log Out",
     'project_id': 4,
     'story_type': 'feature'}]}
stories = await club_house.stories.create('bulk',**many_stories)

Updating

id_story = 120
updates = { 
            'name': "Can't login and get 503",
            'project_id': 4,
            'story_type': 'feature'}
story = await club_house.stories.update(id_story, **updates)

Update Multiple Stories

many_stories = { 'story_ids': [125,126], 'project_id': 4,'story_type': 'bug'} 
stories = await club_house.stories.update('bulk',**many_stories)

Get by id

id_story = 120
linked_file = await club_house.stories.get(id_story)

Deleting by id

When None is returned this means it was successfull

id_story = 120
await club_house.stories.delete(id_story)

Delete Multiple Stories

many_stories = { 'story_ids': [125,126]} 
await club_house.stories.delete('bulk', **many_stories)

Listing

Returns a list of all labels

all_linked_files = await club_house.stories()

Story History

id_story = 120
story = await club_house.stories.history(id_story)