{"_id":"@abskmj/onedrive-api","_rev":"2-dfe6f9cf2382304625bffc7abcb3a21b","name":"@abskmj/onedrive-api","description":"OneDrive API Wrapper for Nodejs","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@abskmj/onedrive-api","version":"0.0.1","description":"OneDrive API Wrapper for Nodejs","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha ./test/drive.js --timeout 5000"},"author":{"name":"abskmj@gmail.com"},"license":"MIT","dependencies":{"bluebird":"^3.5.0","request":"^2.81.0"},"devDependencies":{"chai":"^4.1.1","chai-json-schema":"^1.5.0","mocha":"^3.5.0"},"repository":{"type":"git","url":"git+https://github.com/abskmj/onedrive-api.git"},"gitHead":"462bf9c7d29e6f6aba62c91c656af85f142be574","bugs":{"url":"https://github.com/abskmj/onedrive-api/issues"},"homepage":"https://github.com/abskmj/onedrive-api#readme","_id":"@abskmj/onedrive-api@0.0.1","_shasum":"1c3d94804e0ec6bb1eb9829846a96e9bd355b66d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"abskmj","email":"abskmj@gmail.com"},"dist":{"shasum":"1c3d94804e0ec6bb1eb9829846a96e9bd355b66d","tarball":"https://registry.npmjs.org/@abskmj/onedrive-api/-/onedrive-api-0.0.1.tgz","integrity":"sha512-XoEbBMBbFVKx7m9h3ubbHQrrYF5T+OAt4pi5PRtHa1LiqrA0lFXDgm552Hz6CBnSKrWgGn7FSOBtrF2az4q9IQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEj0GQu149iX/lVSt/Kdqq5B5Cgx+L04it6+gp6Y4gR9AiAxBhIAHY79GMQswbnAo/2xbPjLlr13FBnlIdC1rvq2zQ=="}]},"maintainers":[{"name":"abskmj","email":"abskmj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onedrive-api-0.0.1.tgz_1504435211398_0.38324624695815146"}}},"readme":"# OneDrive API Wrapper for Nodejs\nThis is a wrapper for [OneDrive APIs](https://dev.onedrive.com/getting-started.htm) implemented using ES6 classes.\n\nEach set of APIs related to drive, items are implemented inside separate clients. All API calls are made using [Request NPM](https://www.npmjs.com/package/request), therefore all client methods will return a `response` object of `request` module.\n\n# DriveClient\n\n| Method | Description |\n| :--- | :--- |\n| `constructor(accessToken)` | Create an instance of client by passing an valid access token. |\n| `getDefaultDrive(callback)` | Get meta data for the default drive |\n| `getDrive(driveId,callback)` | Get meta data for a drive by its ID |\n| `listDrives(callback)` | Get an array of drives with meta data |\n| `getRootFolderOfDefaultDrive(callback)` | Get meta data of root folder of the default drive | \n| `getRootItemsOfDefaultDrive(callback)` | Get an array of items in root folder of the defaut drive |\n\n\n## Example using Callback\n\n```javascript\nlet Drive = require('../index').Drive;\nlet drive = new Drive(accessToken);\n\ndrive.getDefaultDrive((error, response) => {\n    if(error){\n        return console.error(error);\n    }\n\n    if(response.statusCode === 200){\n        console.log(response.body);\n    }\n    else{\n        console.log(response.statusCode);\n    }\n});\n```\n\n## Example using Promise\n\n```javascript\nlet Drive = require('../index').Drive;\nlet drive = new Drive(accessToken);\n\ndrive.getDefaultDrive().then((response) => {\n    if(response.statusCode === 200){\n        console.log(response.body);\n    }\n    else{\n        console.log(response.statusCode);\n    }\n}, (error) => {\n    console.error(error);\n});\n```","maintainers":[{"name":"abskmj","email":"abskmj@gmail.com"}],"time":{"modified":"2022-06-12T14:15:18.918Z","created":"2017-09-03T10:40:11.944Z","0.0.1":"2017-09-03T10:40:11.944Z"},"homepage":"https://github.com/abskmj/onedrive-api#readme","repository":{"type":"git","url":"git+https://github.com/abskmj/onedrive-api.git"},"author":{"name":"abskmj@gmail.com"},"bugs":{"url":"https://github.com/abskmj/onedrive-api/issues"},"license":"MIT","readmeFilename":"README.md"}