Search in sources :

Example 1 with DriveItemCollectionPage

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

the class SharePointTests method testNonDefaultLibrary.

@Test
public void testNonDefaultLibrary() {
    DriveCollectionPage drives = testBase.graphClient.sites(testSite.id).drives().buildRequest().get();
    DriveItemCollectionPage driveItems = testBase.graphClient.sites(testSite.id).drives(drives.getCurrentPage().get(0).id).root().children().buildRequest().get();
    assertNotNull(driveItems);
}
Also used : DriveCollectionPage(com.microsoft.graph.requests.DriveCollectionPage) DriveItemCollectionPage(com.microsoft.graph.requests.DriveItemCollectionPage) Test(org.junit.jupiter.api.Test)

Example 2 with DriveItemCollectionPage

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

the class UserTests method meDriveTest.

@Test
public void meDriveTest() {
    // GET me/drive/root/children
    final DriveItemCollectionPage driveItemCollectionPage = graphServiceClient.me().drive().root().children().buildRequest().get();
    assertNotNull(driveItemCollectionPage);
}
Also used : DriveItemCollectionPage(com.microsoft.graph.requests.DriveItemCollectionPage) Test(org.junit.jupiter.api.Test)

Example 3 with DriveItemCollectionPage

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

the class SharePointTests method testNonDefaultLibrary.

@Test
public void testNonDefaultLibrary() {
    DriveCollectionPage drives = testBase.graphClient.sites(testSite.id).drives().buildRequest().get();
    DriveItemCollectionPage driveItems = testBase.graphClient.sites(testSite.id).drives(drives.getCurrentPage().get(0).id).root().children().buildRequest().get();
    assertNotNull(driveItems);
}
Also used : DriveCollectionPage(com.microsoft.graph.requests.DriveCollectionPage) DriveItemCollectionPage(com.microsoft.graph.requests.DriveItemCollectionPage) Test(org.junit.jupiter.api.Test)

Example 4 with DriveItemCollectionPage

use of com.microsoft.graph.requests.DriveItemCollectionPage in project msgraph-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)

Example 5 with DriveItemCollectionPage

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

the class UserTests method meDriveTest.

@Test
public void meDriveTest() {
    // GET me/drive/root/children
    final DriveItemCollectionPage driveItemCollectionPage = graphServiceClient.me().drive().root().children().buildRequest().get();
    assertNotNull(driveItemCollectionPage);
}
Also used : 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