Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JGraph
>
Tutorial
> Get lists in a site
The following example shows you how to get the collection of lists for a site.
import com.independentsoft.graph.GraphClient; import com.independentsoft.graph.GraphException; import com.independentsoft.graph.sites.List; 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"); java.util.List
lists = client.getLists("independentsoft.sharepoint.com,33333333-c666-4b40-bcd4-d771fb97ae69,73b98e9e-5749-407a-82b1-31d82fb30539"); for (List list : lists) { System.out.println("Id: " + list.getId()); System.out.println("Name: " + list.getName()); System.out.println("DisplayName: " + list.getDisplayName()); System.out.println("CreatedTime: " + list.getCreatedTime()); System.out.println("WebUrl: " + list.getWebUrl()); 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*