-
Notifications
You must be signed in to change notification settings - Fork 1
API_Documentation
-
API_TOKEN :
string
-
Signed-in member's API key
-
WORKSPACE :
string
-
Name of the workspace (workspace URL slug, actually) that the signed-in member is a part of
-
MEMBER_ID :
string
-
Signed-in member's member ID
-
MEMBER_MAP :
Object.<string, Member>
-
Object mapping member ID -> member object. Contains all members
-
STORIES :
Array.<Story>
-
All stories in the workspace
-
SETUP :
Promise.<void>
-
A promise to all global variables being initialized; promise that fulfills when all global vars are initialized. Once all global vars are initialized (without errors), all methods can execute correctly.
-
fetchProjectsAsync() ⇒
Promise.<Array.<Project>>
-
Fetch all projects
-
fetchProjectStoriesAsync(projectId) ⇒
Promise.<Array.<Story>>
-
Fetch all stories in a project
-
fetchStoriesAsync() ⇒
Promise.<Array.<Story>>
-
Fetch all stories in all projects
-
fetchMemberInfoAsync(apiToken) ⇒
Promise.<MemberInfo>
-
Fetch info about a member
-
fetchMembersAsync() ⇒
Promise.<Array.<BasicMember>>
-
Fetch all members in the workspace
-
isComplete(story) ⇒
boolean
-
Check if a story is complete
-
getStories([params]) ⇒
Array.<Story>
-
Get stories - using optional filters - from the set of all stories in the workspace (STORIES).
-
getMyIncompleteStories() ⇒
Array.<Story>
-
Get incomplete stories that are assigned to the signed-in member
-
getAllIncompleteStories() ⇒
Array.<Story>
-
Get all incomplete stories in the workspace
-
getBattleLog() ⇒
Array.<Story>
-
Get stories to show in the battle log - all completed stories sorted by most recently completed.
-
getMemberName(memberId) ⇒
string
-
Get the name of a member
-
getMemberProfile() ⇒
MemberDisplay
-
Get the display info - workspace, name, and display icon - of the signed-in member.
- removeApiToken()
-
Set the value of API_TOKEN to undefined
-
getProgress() ⇒
Progress
-
Get the overall progress of stories, in terms of points completed
- onLogin(apiToken, memberId, workspace)
-
Method to be called during the sign-in process once the member's API token, ID, and workspace are known. Initializes global variables that are known, and triggers the initialization of all other global variables (by calling setup).
-
setup() ⇒
Promise.<void>
-
Get the SETUP promise. If SETUP hasn't been initialized yet, create it. Otherwise, return the existing promise - do not recreate/restart it.
- signout()
-
Signout by removing all items from StorageArea storage.sync
- toggleMemberMenu()
-
Show member profile menu
- selectTab(tabIndex)
-
Apply appropriate styles to selected tab and panel item
- completeStory(story)
-
TODO: Complete story
-
Progress :
Object
-
TYPE DECLARATIONS
Signed-in member's API key
Name of the workspace (workspace URL slug, actually) that the signed-in member is a part of
Signed-in member's member ID
Object mapping member ID -> member object. Contains all members
All stories in the workspace
A promise to all global variables being initialized; promise that fulfills when all global vars are initialized. Once all global vars are initialized (without errors), all methods can execute correctly.
Kind: global variable
See: setup
Fetch all projects
Kind: global function
Returns: Promise.<Array.<Project>>
- A promise to all projects in the workspace
Fetch all stories in a project
Kind: global function
Returns: Promise.<Array.<Story>>
- A promise to all stories in the project
Param | Type | Description |
---|---|---|
projectId | string |
ID of the project |
Fetch all stories in all projects
Kind: global function
Returns: Promise.<Array.<Story>>
- A promise to all stories in the workspace
Fetch info about a member
Kind: global function
Returns: Promise.<MemberInfo>
- A promise to the member info object
Param | Type | Description |
---|---|---|
apiToken | string |
Member's API token |
Fetch all members in the workspace
Kind: global function
Returns: Promise.<Array.<BasicMember>>
- A promise to the array of member objects
Check if a story is complete
Kind: global function
Returns: boolean
- True if the story is complete, false otherwise
Param | Type | Description |
---|---|---|
story | Story |
Story to check |
Get stories - using optional filters - from the set of all stories in the workspace (STORIES).
Kind: global function
Returns: Array.<Story>
- Stories specified by the filters (if any). If no
filters are specified, returns all stories in the
workspace (STORIES). If STORIES is null, returns
null.
Param | Type | Default | Description |
---|---|---|---|
[params] | Object.<string, boolean> |
Optional parameter to specify filter flags. | |
[params.memberOnly] | boolean |
false |
Flag to only include stories assigned to the signed-in member. |
[params.incompleteOnly] | boolean |
false |
Flag to only include stories that are incomplete. |
[params.completeOnly] | boolean |
false |
Flag to only include stories that are complete. |
Get incomplete stories that are assigned to the signed-in member
Kind: global function
Returns: Array.<Story>
- Incomplete stories assigned to the signed-in member.
If STORIES is null, returns null.
See: getStories
Get all incomplete stories in the workspace
Kind: global function
Returns: Array.<Story>
- All incomplete stories in the workspace. If STORIES
is null, returns null.
See: getStories
Get stories to show in the battle log - all completed stories sorted by most recently completed.
Kind: global function
Returns: Array.<Story>
- Stories for battle log. If STORIES is null, returns null
Get the name of a member
Kind: global function
Returns: string
- Name of the specified member
Param | Type | Description |
---|---|---|
memberId | string |
ID of the member to get the name of |
Get the display info - workspace, name, and display icon - of the signed-in member.
Kind: global function
Returns: MemberDisplay
- The display info of the signed-in member
Set the value of API_TOKEN to undefined
getProgress() ⇒ Progress
Get the overall progress of stories, in terms of points completed
Kind: global function
Returns: Progress
- Completed points and total points
Method to be called during the sign-in process once the member's API token, ID, and workspace are known. Initializes global variables that are known, and triggers the initialization of all other global variables (by calling setup).
Kind: global function
See: setup
Param | Type | Description |
---|---|---|
apiToken | string |
API token of the member signing in |
memberId | string |
Member ID of the member signing in |
workspace | string |
Workspace of the member signing in |
Get the SETUP promise. If SETUP hasn't been initialized yet, create it. Otherwise, return the existing promise - do not recreate/restart it.
Kind: global function
Returns: Promise.<void>
- A promise to all global variables being initialized
without error and all methods being ready for
execution.
See: SETUP
Signout by removing all items from StorageArea storage.sync
Show member profile menu
Apply appropriate styles to selected tab and panel item
Kind: global function
Param | Type | Description |
---|---|---|
tabIndex | number |
index of tab |
TODO: Complete story
Kind: global function
Param | Type |
---|---|
story | Story |
TYPE DECLARATIONS
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
id | string |
ID of the project |
completed | boolean |
Whether the story is completed |
completed_at | string |
String representation of the time of completion |
estimate | number |
Story point estimate |
id | string |
ID of the story |
name | string |
Name of the story |
owner_ids | Array.<string> |
Member IDs of members assigned to the story |
id | string |
ID of the member |
profile | Object |
Profile of the member containing personal info |
profile.name | string |
Name of the member |
id | string |
ID of the member |
points | number |
Total story points completed by the member |
profile | Object |
Profile of the member containing personal info |
profile.name | string |
Name of the member |
workspace | string |
Name of the member's workspace |
name | name |
Name of the member |
icon | string |
URL of the member's display icon |
id | string |
ID of the member |
name | string |
Name of the member |
workspace2 | Object |
Info about the member's workspace |
workspace2.url_slug | string |
Member's workspace URL slug |
completed | number |
Number of story points completed |
total | number |
Number of total story points |