项目作者: zhangtasdq

项目描述 :
高级语言: Java
项目地址: git://github.com/zhangtasdq/cordova-plugin-onedrivetool.git
创建时间: 2017-06-11T08:45:12Z
项目社区:https://github.com/zhangtasdq/cordova-plugin-onedrivetool

开源协议:Apache License 2.0

下载


cordova-plugin-onedrivetool

download file from onedrive approot or upload file to onedrive approot
Just a simple encapsulation of onedrive-sdk-android

Example

Check file exist

  1. let OneDriveTool = cordova.plugins.OneDriveTool;
  2. OneDriveTool.isFileExists(fileName, clientId, scope, (fileExistError, isExist) => {
  3. if (fileExistError) {
  4. ...
  5. } else {
  6. ...
  7. }
  8. });

Upload file

  1. let OneDriveTool = cordova.plugins.OneDriveTool;
  2. OneDriveTool.saveFile(fileName, content, clientId, scope, (saveError) => {
  3. if (saveError) {
  4. ...
  5. } else {
  6. ...
  7. }
  8. });

Download File

  1. let OneDriveTool = cordova.plugins.OneDriveTool;
  2. OneDriveTool.downloadFile(fileName, clientId, scope, (downloadError, data) => {
  3. if (downloadError) {
  4. ...
  5. } else {
  6. ...
  7. }
  8. });

Thanks

onedrive-sdk-android