Independentsoft
Professional software libraries for developers
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Get Planner task
The following example shows you how to get a Planner task by its ID.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.planner.PlannerTask; public class Sample { 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"); PlannerTask task = client.getPlannerTask("oIx3zN8zuUe1h4el8F6XHZQADC26"); System.out.println("Id = " + task.getId()); System.out.println("Title = " + task.getTitle()); System.out.println("PlanId = " + task.getPlanId()); System.out.println("BucketId = " + task.getBucketId()); System.out.println("PercentComplete = " + task.getPercentComplete()); System.out.println("Priority = " + task.getPriority()); System.out.println("StartDateTime = " + task.getStartDateTime()); System.out.println("DueDateTime = " + task.getDueDateTime()); System.out.println("HasDescription = " + task.getHasDescription()); System.out.println("ChecklistItemCount = " + task.getChecklistItemCount()); System.out.println("ActiveChecklistItemCount = " + task.getActiveChecklistItemCount()); } catch (GraphException e) { System.out.println("Error: " + e.getCode()); System.out.println("Message: " + e.getMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*