Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Planner/Task docs #2801

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/graph/planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ const updPlan = await graph.planner.plans.getById('planId').update({title: 'New

```

## Get All My Tasks from all plans

Using the tasks() you can get the Tasks across all plans

```TypeScript
import { graphfi } from "@pnp/graph";
import "@pnp/graph/planner";

const graph = graphfi(...);

const planTasks = await graph.me.tasks()

```

## Get Task by Id

Using the planner.tasks.getById() you can get a specific Task.
Expand Down Expand Up @@ -247,3 +261,18 @@ const graph = graphfi(...);
const bucketTasks = await graph.planner.buckets.getById('bucketId').tasks();

```

## Get Plans for a group

Gets all the plans for a group

```TypeScript
import { graphfi } from "@pnp/graph";
import "@pnp/graph/groups";
import "@pnp/graph/planner";

const graph = graphfi(...);

const plans = await graph.groups.getById("b179a282-9f94-4bb5-a395-2a80de5a5a78").plans();

```
Loading