Skip to content
Advertisement

Planner Plan get ID

I’m trying to get all the plans in a group and then their buckets and tasks. I’m using PHP and the Graph SDK

I can get the plans in a group like this:

 $plans = $this->graph->createCollectionRequest('GET', '/groups/'.$groupId.'/planner/plans')->setReturnType(ModelPlannerPlan::class)
            ->execute();

Now I want to get the buckets, but that call requires the plan ID. and the plan ID is a protected member of ModelPlannerPlan::class.

The ModelPlannerPlan->getBuckets() does nothing but return a null.

(getTitle() works by the way, so I’m doing something right.)

I’m obviously misunderstanding something here.

How can I get the buckets:

GET /planner/plans/{plan-id}/buckets 

from an instance of a PlannerPlan?

Advertisement

Answer

You can call ModelPlannerPlan->getId().

getId is public.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement