{"_id":"box-chrome-sdk","_rev":"46-c795d5bbb76c7345a600817b378a1a6a","name":"box-chrome-sdk","description":"A Chrome App SDK for the Box V2 API","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"box-chrome-sdk","version":"0.1.0","description":"A Chrome App SDK for the Box V2 API","main":"Gruntfile.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/box/Chrome-App-SDK.git"},"author":{"name":"Box"},"license":"Apache License 2.0","devDependencies":{"chai":"^1.9.1","grunt":"^0.4.5","grunt-bower-concat":"^0.2.4","grunt-contrib-clean":"^0.5.0","grunt-contrib-concat":"^0.4.0","grunt-contrib-uglify":"^0.5.0","grunt-contrib-watch":"^0.6.1","grunt-eslint":"^0.6.0","grunt-jsdox":"^0.1.5","grunt-karma":"^0.8.3","grunt-wrap":"^0.3.0","karma":"^0.12.16","karma-chai":"^0.1.0","karma-chrome-launcher":"^0.1.4","karma-coverage":"^0.2.7","karma-mocha":"^0.1.4","karma-sinon-chai":"^0.2.0","mocha":"^1.20.1","sinon":"^1.10.2","sinon-chai":"^2.5.0"},"dependencies":{},"gitHead":"3b0511de73486cab22f530a5ee6fee0cb4f0b5c2","bugs":{"url":"https://github.com/box/Chrome-App-SDK/issues"},"homepage":"https://github.com/box/Chrome-App-SDK","_id":"box-chrome-sdk@0.1.0","_shasum":"c1ca0f1bc92e741c014a421d9a0adb4790a29d72","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jeff-meadows","email":"jrmeadows2@gmail.com"},"maintainers":[{"name":"jeff-meadows","email":"jrmeadows2@gmail.com"}],"dist":{"shasum":"c1ca0f1bc92e741c014a421d9a0adb4790a29d72","tarball":"https://registry.npmjs.org/box-chrome-sdk/-/box-chrome-sdk-0.1.0.tgz","integrity":"sha512-6kPbtYKexJL62DJ7wMut5XWyddE86HIFjMZ69S1Q5bTEs4DvvrrJ48gjVr+8+UmO4diqvlU2tcgpIS0SIYsILg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdwiDhLNHXQXFa30TdyZLoxItqEUN1reNb7Es55dTWTQIgK5Wvn59cCxelcNT0HuB4dyqQO4VTu3Buq3t6HZcEGdM="}]}},"0.1.1":{"name":"box-chrome-sdk","version":"0.1.1","description":"A Chrome App SDK for the Box V2 API","main":"Gruntfile.js","directories":{"test":"test"},"scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/box/Chrome-App-SDK.git"},"author":{"name":"Box"},"license":"Apache License 2.0","devDependencies":{"chai":"^1.9.1","grunt":"^0.4.5","grunt-bower-concat":"^0.2.5","grunt-cli":"^0.1.13","grunt-contrib-clean":"^0.5.0","grunt-contrib-concat":"^0.4.0","grunt-contrib-uglify":"^0.5.0","grunt-contrib-watch":"^0.6.1","grunt-eslint":"^0.6.0","grunt-jsdox":"^0.1.5","grunt-karma":"^0.8.3","grunt-mkdir":"^0.1.2","grunt-wrap":"^0.3.0","karma":"^0.12.16","karma-chai":"^0.1.0","karma-chrome-launcher":"^0.1.4","karma-coverage":"^0.2.7","karma-mocha":"^0.1.4","karma-sauce-launcher":"^0.2.10","karma-sinon-chai":"^0.2.0","mocha":"^1.20.1","sinon":"^1.10.2","sinon-chai":"^2.5.0"},"dependencies":{},"gitHead":"9869bf3e45d6f7e62770f8d727791f7fbf5ec4bb","bugs":{"url":"https://github.com/box/Chrome-App-SDK/issues"},"homepage":"https://github.com/box/Chrome-App-SDK","_id":"box-chrome-sdk@0.1.1","_shasum":"ad4650ebf0d163f5fd0ad162f839b1bc821c4a57","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jeff-meadows","email":"jrmeadows2@gmail.com"},"maintainers":[{"name":"jeff-meadows","email":"jrmeadows2@gmail.com"},{"name":"boxoss","email":"oss@box.com"}],"dist":{"shasum":"ad4650ebf0d163f5fd0ad162f839b1bc821c4a57","tarball":"https://registry.npmjs.org/box-chrome-sdk/-/box-chrome-sdk-0.1.1.tgz","integrity":"sha512-XI5xkc2r+YSSQfO6V6sB6XZUQdrTNAQQqkAxqMPwSPbGFU9qNKnOGmF65gFaoob5gmWETo+ucFiYRmIgtgRsOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjKlIwPJdmyVOn5zOxS8akcu2XMBNNRgNZLWjxC5rR4gIgU+QqK8n0z/z1NOBRGZZj3PDv32zh/IoTruQeSZcNK2k="}]}}},"readme":"Chrome-App-SDK\n==============\n\n[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)\n[![Travis build status](https://travis-ci.org/box/Chrome-App-SDK.png?branch=master)](https://travis-ci.org/box/Chrome-App-SDK)\n[![NPM info](https://nodei.co/npm/box-chrome-sdk.png?downloads=true)](https://www.npmjs.com/package/box-chrome-sdk)\n\nBox V2 API SDK for Chrome apps and extensions written in AngularJS. With some effort, it can be used from node.js as well.\n\nInstalling\n----------\n\n####bower\n\n    bower install box-chrome-sdk\n\n####npm\n\n    npm install box-chrome-sdk\n\nQuick Start\n-----------\n\n### Setup\n\n#### Make sure the following permissions are specified in your app's manifest:\n\n    permissions: [\n        \"downloads\",\n        \"identity\",\n        \"storage\",\n        \"https://*.box.com/*\",\n        \"https://*.boxcdn.com/*\",\n        \"https://*.boxcdn.net/*\",\n        \"https://*.boxcloud.com/*\"\n    ]\n\n#### Include SDK and requirements javascript\n\n    <script src=\"box-chrome-sdk.bower_components.min.js\"></script>\n    <script src=\"box-chrome-sdk.min.js\"></script>\n\n#### Configure the SDK with your Box app's client ID and secret\n\n    angular.module('box.conf')\n        .constant('clientSecret', 'uII-----------------------------')\n        .constant('clientId', 'i3p-----------------------------');\n\n####Add a dependency to box.sdk to your angular module####\n\n    angular.module('myModule', ['box.sdk']);\n\n#### Require boxSdk as a dependency in your angular services or directives\n\n    module.directive('myDirective', ['boxSdk', function(boxSdk) {\n\n    }]);\n\n### Making API Calls\n\nMost functions in the SDK return [Rx Observables](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md).\nMastery of reactive programming, however, is not required to use these objects.\n\nTo get at an API result, simply subscribe to the observable and read the result inside the callback.\n\n#### Get a folder object\n\n    boxSdk.getFolder(0).subscribe(function(folder) {\n        console.log(folder.name);\n    });\n\n    // -> All Files\n\n#### Search Box\n\n    boxSdk.search('query text')\n        .subscribe(function(result) {\n            console.log(result.type + ' -> ' + result.name);\n        });\n\n    // -> Folder -> Query 1\n    // -> File -> Results Query\n\n### Device Pinning\n\nSome Box enterprises enforce device pinning, and require that auth requests are accompanied by a device ID. Chrome doesn't support a device specific identifier, and that is by design.\n\nHowever, it should be possible to supply a device ID, either from an application/extension setting supplied by a user, or by Chrome [managed storage](http://www.chromium.org/administrators/).  Passing it with auth requests is as simple as:\n\n    var http = angular.module('box.http'),\n        deviceId = getDeviceIdSomehow();\n\n    http.factory('boxDeviceIdInterceptor',['$q', 'authUrl', function($q, authUrl){\n        return {\n            request: function(config) {\n                if (config.url.indexOf(authUrl) === 0) {\n                    config.data.append('box_device_id', deviceId);\n                }\n                return config;\n            }\n        };\n    }]);\n\n    http.config(['$httpProvider',function($httpProvider) {\n        $httpProvider.interceptors.push('boxDeviceIdInterceptor');\n    }]);\n\n\n### Docs and examples\n\n#### Search Box from OmniBox Example\n\n[Example extension](demo/search_extension/README.md) showing how to use the SDK in an extension's background page.\n\n#### Upload to Box Example\n\n[Example extension](demo/uploader_extension/README.md) showing how to use the SDK in a content script.\n\n#### Box Chrome App Example\n\n[Example packaged app](demo/box_app/README.md) showing how to use the SDK in a packaged app.\n\n#### Node.js Example\n\n[Example login script](demo/node/README.md) showing how to use the SDK in a node.js script.\n\n#### Notifications Example\n\n[Example events script](demo/notifications/README.md) showing how to use the SDK to monitor events.\n\n#### Documentation\n\n[Docs](doc/readme.md)\n\n### Building the SDK\n\nBuilding the SDK requires Grunt.\n*If you are new to Grunt, you will find a lot of answers to your questions in their [getting started guide](http://gruntjs.com/getting-started).\n\nFrom the same directory as Gruntfile.js, type\n\n    npm install\n    bower install\n    grunt\n\n### Running the tests\n\n    grunt test\n\n### Contributing\n\nSee [CONTRIBUTING](blob/master.CONTRIBUTING.md).\n\n## Support\n\nNeed to contact us directly? Email oss@box.com and be sure to include the name of this project in the subject.\n\n## Copyright and License\n\nCopyright 2014 Box, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","maintainers":[{"email":"oss@box.com","name":"boxoss"},{"email":"jrmeadows2@gmail.com","name":"jeff-meadows"}],"time":{"modified":"2022-06-13T05:01:10.155Z","created":"2015-02-06T19:18:10.567Z","0.1.0":"2015-02-06T19:18:10.567Z","0.1.1":"2015-02-11T04:01:03.528Z"},"homepage":"https://github.com/box/Chrome-App-SDK","repository":{"type":"git","url":"https://github.com/box/Chrome-App-SDK.git"},"author":{"name":"Box"},"bugs":{"url":"https://github.com/box/Chrome-App-SDK/issues"},"license":"Apache License 2.0","readmeFilename":"README.md"}