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(Model\PlannerPlan::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 Model\PlannerPlan::class.
The Model\PlannerPlan->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?
CodePudding user response:
You can call Model\PlannerPlan->getId()
.
getId is public
.