Skip to content

Commit

Permalink
Merge pull request #2801 from bcameron1231/v3-Planner
Browse files Browse the repository at this point in the history
Update Planner/Task docs
  • Loading branch information
bcameron1231 authored Oct 13, 2023
2 parents f796602 + 3d67e71 commit c888003
Showing 1 changed file with 29 additions and 0 deletions.
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();

```

0 comments on commit c888003

Please sign in to comment.