nuxeo/onedrive-java-client

Name: onedrive-java-client

Owner: Nuxeo

Description: Java client for OneDrive & OneDrive for Business

Created: 2016-02-04 14:10:24.0

Updated: 2018-03-20 20:53:58.0

Pushed: 2016-08-24 14:55:54.0

Homepage:

Size: 59

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Java Client Library for OneDrive & OneDrive for Business REST APIs

The OneDrive & OneDrive for Business Java Client is a Java client library for REST API. It is designed to work with both OneDrive & OneDrive for Business and to have light dependencies.

Build Status

Building

mvn clean install

Getting Started
Maven

To import the client as maven dependency, declare it as follow for latest release :

endency>
roupId>org.nuxeo.onedrive</groupId>
rtifactId>onedrive-java-client</artifactId>
ersion>1.0</version>
pendency>

If you want to use the on development version, declare :

endency>
roupId>org.nuxeo.onedrive</groupId>
rtifactId>onedrive-java-client</artifactId>
ersion>1.1-SNAPSHOT</version>
pendency>

Artifact is available in nuxeo repositories :

OneDrive

To use the client with OneDrive you first need to create a OneDriveBasicApi to use it after with items of client :

riveAPI api = new OneDriveBasicAPI("YOUR_ACCESS_TOKEN");
OneDrive for Business

To use the client with OneDrive for Business you need to create a OneDriveBusinessAPI to use it after with items of client :

riveAPI api = new OneDriveBusinessAPI("YOUR_RESOURCE_URL", "YOUR_ACCESS_TOKEN");

YOUR_RESOURCE_URL corresponds to your sharepoint resource url provided by microsoft, for example : https://nuxeofr-my.sharepoint.com.

First calls

Now you have your api object you can request the APIs, for example to get the root folder run :

riveFolder root = OneDriveFolder.getRoot(api);

Or just get a folder or file item :

riveFolder folder = new OneDriveFolder(api, "FOLDER_ID");
riveFile file = new OneDriveFile(api, "FILE_ID");

Then retrieve the metadata :

riveFolder.Metadata folderMetadata = folder.getMetadata();
riveFile.Metadata fileMetadata = item.getMetadata();
Features
Limitations

Currently the OneDrive Java Client doesn't provide OAuth support to obtain or refresh an access token. You might obtain one before using the client.

Licensing

Apache License, Version 2.0

About Nuxeo

Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at www.nuxeo.com.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.