Independentsoft
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Get Planner Tasks
The following example shows you how to retrieve all tasks in a planner plan.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.planner.PlannerTask; public class Console { public static void main(String[] args) { try { GraphClient client = new GraphClient(); client.setClientId("63333333-209e-454e-b7bd-55a4d201270f"); client.setTenant("independentsoft.onmicrosoft.com"); client.setUsername("info@independentsoft.onmicrosoft.com"); client.setPassword("password"); String planId = "AAMkAGVm..."; java.util.List
tasks = client.getPlannerTasks(planId); for (PlannerTask task : tasks) { System.out.println("Id: " + task.getId()); System.out.println("Title: " + task.getTitle()); System.out.println("BucketId: " + task.getBucketId()); System.out.println("PercentComplete: " + task.getPercentComplete()); System.out.println("Priority: " + task.getPriority()); System.out.println("DueDateTime: " + task.getDueDateTime()); System.out.println("-------------------------------------------"); } } catch (GraphException e) { System.out.println(e.getCode()); System.out.println(e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*