Search in sources :

Example 6 with DriveItemCollectionPage

use of com.microsoft.graph.requests.DriveItemCollectionPage in project msgraph-beta-sdk-java by microsoftgraph.

the class UserTests method meDriveItems.

@Test
public void meDriveItems() {
    // GET me/drive/items('<key>')
    final DriveItemCollectionPage driveItemCollectionPage = graphServiceClient.me().drive().items().buildRequest().get();
    assertNotNull(driveItemCollectionPage);
    if (driveItemCollectionPage.getCurrentPage().size() > 0) {
        DriveItem item = graphServiceClient.me().drive().items(driveItemCollectionPage.getCurrentPage().get(0).id).buildRequest().get();
        assertNotNull(item);
    }
}
Also used : DriveItem(com.microsoft.graph.models.DriveItem) DriveItemCollectionPage(com.microsoft.graph.requests.DriveItemCollectionPage) Test(org.junit.jupiter.api.Test)

Aggregations

DriveItemCollectionPage (com.microsoft.graph.requests.DriveItemCollectionPage)6 Test (org.junit.jupiter.api.Test)6 DriveItem (com.microsoft.graph.models.DriveItem)2 DriveCollectionPage (com.microsoft.graph.requests.DriveCollectionPage)2