Skip to content

Commit 7a0b6e9

Browse files
nanddeepnrabwill
authored andcommitted
Adds 'todo task list'. Closes pnp#1901
1 parent a89af63 commit 7a0b6e9

File tree

6 files changed

+532
-1
lines changed

6 files changed

+532
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# todo task list
2+
3+
List tasks from a Microsoft To Do task list
4+
5+
## Usage
6+
7+
```sh
8+
m365 todo task list [options]
9+
```
10+
11+
## Options
12+
13+
`-h, --help`
14+
: output usage information
15+
16+
`--listName [listName]`
17+
: The name of the task list to return tasks from. Specify either `listName` or `listId`, not both
18+
19+
`--listId [listId]`
20+
: The id of the task list to return tasks from. Specify either `listName` or `listId`, not both
21+
22+
`--query [query]`
23+
: JMESPath query string. See [http://jmespath.org/](http://jmespath.org/) for more information and examples
24+
25+
`-o, --output [output]`
26+
: Output type. `json,text`. Default `text`
27+
28+
`--verbose`
29+
: Runs command with verbose logging
30+
31+
`--debug`
32+
: Runs command with debug logging
33+
34+
## Examples
35+
36+
List tasks from Microsoft To Do tasks list with the name _My task list_
37+
38+
```sh
39+
m365 todo task list --listName "My task list"
40+
```
41+
42+
List tasks from Microsoft To Do tasks list with the id AQMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MAAuAAADMN-7V4K8g0q_adetip1DygEAxMBBaLl1lk_dAn8KkjfXKQABF-BAgwAAAA==
43+
44+
```sh
45+
m365 todo task list --listId "AQMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MAAuAAADMN-7V4K8g0q_adetip1DygEAxMBBaLl1lk_dAn8KkjfXKQABF-BAgwAAAA=="
46+
```

docs/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ nav:
487487
- list list: 'cmd/todo/list/list-list.md'
488488
- list remove: 'cmd/todo/list/list-remove.md'
489489
- list set: 'cmd/todo/list/list-set.md'
490+
- task:
491+
- task list: 'cmd/todo/task/task-list.md'
490492
- Yammer (yammer):
491493
- group:
492494
- group list: 'cmd/yammer/group/group-list.md'

src/m365/todo/ToDoTask.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export interface ToDoTask {
2+
title: string,
3+
id: string,
4+
status: string,
5+
createdDateTime: Date,
6+
lastModifiedDateTime: Date
7+
}

src/m365/todo/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ export default {
44
LIST_ADD: `${prefix} list add`,
55
LIST_LIST: `${prefix} list list`,
66
LIST_REMOVE: `${prefix} list remove`,
7-
LIST_SET: `${prefix} list set`
7+
LIST_SET: `${prefix} list set`,
8+
TASK_LIST: `${prefix} task list`
89
};

0 commit comments

Comments
 (0)