{"_id":"cloudup-client","_rev":"22-bb143428c663be2ed5a8166148851465","name":"cloudup-client","description":"cloudup api client","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.0":{"name":"cloudup-client","description":"cloudup api client","version":"0.1.0","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.4","debug":"*","batch":"0.4.0","JSONStream":"~0.4.3","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"0.0.1","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","files":["lib/"],"_id":"cloudup-client@0.1.0","dist":{"shasum":"aa76d72d8e33449b38fcf2df424ea358248dabef","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.1.0.tgz","integrity":"sha512-vFPYA7Pb8ITm0EYGdlbyDPyicZ13iVyI/vC2HJYCFliFGl+vyKkwuc8b02REX44ETAoSO+7KyVbuVZOkTPixqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNjs4VQt1EltbTYsukQZJNxe27QaD7DpTF/Pscg/kDuAiAlMxrAl9K+9Kb9CGzgIBi/VxP5iD1m1fcCuKHyl+BDgw=="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.2.0":{"name":"cloudup-client","description":"cloudup api client","version":"0.2.0","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.4","debug":"*","batch":"0.4.0","JSONStream":"~0.4.3","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"0.0.1","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","files":["lib/"],"_id":"cloudup-client@0.2.0","dist":{"shasum":"ec1fea71888fd22456802c7bcf1010caaf22073f","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.2.0.tgz","integrity":"sha512-nvHqZ/IqdmZtRbKhoagIcNLbOHdupVAoCuMXTizKy5COOQlrKZoMyHACnbt5O3QIsqzF4l5lMOag8y32Z/PQRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWPKR1VPhGm/wyRgEe4bLqhOwRzOrWLlsn9Q+E+2PhWQIgW6mHvM65e4mMcWa8d0SbIcWyiL/Wy+bKTePrv64ghAA="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{}},"0.2.1":{"name":"cloudup-client","description":"cloudup api client","version":"0.2.1","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.7","debug":"*","batch":"0.5.0","JSONStream":"0.7.1","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"0.0.1","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0","extend":"~1.2.1"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","_id":"cloudup-client@0.2.1","dist":{"shasum":"1066ef1570bd676b685616047846e2ee1883434d","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.2.1.tgz","integrity":"sha512-nqj4lxBIvvhVKCVAcEaeJHxzM7Zq7o1tp72872xskDKrq25yghUh2nGXbFaGZBrWlHD4bxvxy081h9aLAlckvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEvB4f79HVW+bPaAz8P4WdhK0vnU/gXTx/zttLSwEPkAAiBcBOHAHdi46RrvNPHi+Hc8n9mn2RX4UVdjbahQdW8KUw=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"}],"directories":{}},"0.3.0":{"name":"cloudup-client","description":"cloudup api client","version":"0.3.0","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.7","debug":"*","batch":"0.5.0","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"1.0.0","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0","extend":"~1.2.1"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","_id":"cloudup-client@0.3.0","dist":{"shasum":"54c53c4a355ca449d755989ff61a9bfba8719052","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.3.0.tgz","integrity":"sha512-YiETcri8W8UbFZvVZiLaGjM47C5tovbD/YMuedVWXCpKdTKeEZiTWz22asI8SITN+BjKYRly61hd1OFtcFewMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtCT2H7wFZKDgAp+9OZZ+2rm5ErZzq6/vr2BP1SB85KAiAkmhT3mYvx6fmFV554HjoI2KSLxkOqhVQKBnbidNZK/w=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"directories":{}},"0.3.1":{"name":"cloudup-client","description":"cloudup api client","version":"0.3.1","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.7","debug":"*","batch":"0.5.0","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"1.0.0","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0","extend":"~1.2.1"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","_id":"cloudup-client@0.3.1","dist":{"shasum":"39c251ccdad8d49f2c43c361e9ed5a4198e9b60f","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.3.1.tgz","integrity":"sha512-rn3DFpU4LdPDUPsgAquAAvdKZIBtoA3x+fTunQM4zDHNRBxewXxwQ9Mgo9WTrbQ23x0ufD2T5zEiFwFtwmvLRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3jISkWZTx+cPylE1QZmRb2wkdrZAO02Tn4aXSlwVJXAiANY91RNGSHSorYVDN2kUFVrdXblchp0ILiJvuY9JVYCA=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"0.3.2":{"name":"cloudup-client","description":"cloudup api client","version":"0.3.2","keywords":["cloudup","api","client","files","upload","service"],"dependencies":{"superagent":"0.15.7","debug":"*","batch":"0.5.0","mime":"1.2.11","only":"0.0.2","throttleit":"0.0.2","uid2":"0.0.3","form-data":"~0.1.0","cloudup-ua":"1.0.0","png-size":"~0.1.0","jpeg-size":"0.0.1","head":"~1.0.0","extend":"~1.2.1"},"devDependencies":{"mocha":"*","should":"*","better-assert":"*"},"main":"lib/client","_id":"cloudup-client@0.3.2","dist":{"shasum":"faa2273ad2d070a78977a10fc696469d47d8a335","tarball":"https://registry.npmjs.org/cloudup-client/-/cloudup-client-0.3.2.tgz","integrity":"sha512-TKHhacZULEmQkR0or+QUxlmZ08xwGBjEyunKrTsP120X2M9rCrmWemEnOtCIzhRQTiDGf5g/GCLcMNSgfRzSzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsfCZCMs3Z8/2Vx6RFXZ/N7T4qUfkICNeLrCdTuUb6+AiEAra35GGefO2rJx/SQzT9zfzd/kimgm0/qfPA7J4QBXmI="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]}},"readme":"\n# Cloudup\n\n  Cloudup API client for nodejs.\n\n## Installation\n\n```\n$ npm install --save cloudup-client\n```\n\n## Links\n\n  - [examples](https://github.com/LearnBoost/cloudup-client/tree/master/examples)\n\n## Example\n\n```js\nvar Cloudup = require('cloudup-client');\n\nvar client = Cloudup({\n  url: 'http://localhost:3000',\n  user: 'ewald',\n  pass: 'Dev1'\n});\n\nclient\n.stream({ title: 'Cloudup API' })\n.file('Makefile')\n.file('package.json')\n.file('lib/client.js')\n.file('lib/collection.js')\n.file('lib/error.js')\n.file('lib/item.js')\n.save(function(){\n  console.log('upload complete');\n});\n```\n\n## API\n\n### Cloudup()\n\n  Initialize a new client with the given options:\n  \n   - `user` basic auth username\n   - `pass` basic auth password\n   - `token` auth token\n   - `useragent` user-agent name\n\n#### Cloudup.requestToken(appId:String, fn:Function)\n\n  Request an auth token with the `appId` provided by Cloudup\n  upon app registration. This prevents the need to store a user's\n  username and password.\n\n```js\nvar client = new Cloudup({\n  user: 'tobi',\n  pass: 'Dev1'\n});\n\nclient.requestToken('ah5Oa7F3hT8', function(err, tok){\n  if (err) throw err;\n\n  var client = new Cloudup({ token: tok });\n\n  client.streams(function(err, streams){\n    if (err) throw err;\n    console.log('streams:');\n    streams.forEach(function(stream){\n      console.log('  - %s', stream.title);\n    });\n  });\n});\n```\n\n### Cloudup.user(fn:Function)\n\n  Get authenticated user information:\n\n```js\nclient.user(function(err, user){\n  console.log(user);\n});\n```\n\n#### Cloudup.stream(options:Object|String)\n\n  Create a new stream.\n\n```js\nvar stream = client.stream({ title: 'Photos' });\n```\n\n  Or load an existing stream with its `.id`:\n\n```js\nvar stream = client.stream('cyswccQQZkw');\nstream.load(function(){\n  console.log(stream);\n});\n```\n\n#### Cloudup.streams(fn:Function)\n\n  Get an array of streams.\n\n#### Cloudup.streams(options, fn:Function)\n\n  Get an array of streams with the given `options`:\n\n  - `title` filter by title\n\n### Stream(id:String|options:Object)\n\n  Initialize a new Stream with the given options:\n  \n- `title` optional Stream title string\n  \n```js\n client\n .stream({ title: 'Animals' })\n .file('path/to/maru-1.jpg')\n .file('path/to/maru-2.jpg')\n .link('http://farm5.static.flickr.com/4131/5001570832_c1341f609f.jpg')\n .save(function(err){\n\n })\n```\n\n  Alternatively pass the stream's `id` and invoke `.load()`.\n\n#### Events:\n  \n- `item` (item) when an item is added\n- `save` Stream saved\n- `end` item uploads complete\n\n#### Stream.isNew()\n\n  Check if the stream is new.\n\n#### Stream.set(prop:String|Object, val:String|Function, [fn]:Function)\n\n  Set `prop`'s `val` with optional callback `fn`.\n\n#### Stream.item([options:Object|String)\n\n  Create a new item in this stream.\n  \n```js\nvar item = stream.item({ title: 'Maru the cat' })\n```\n\n  Or load an existing item with its `.id`:\n\n```js\nvar item = stream.item('iyswccQQZkw');\nitem.load(function(){\n  console.log(item);\n});\n```\n\n#### Stream.file(file:String, [options:Object])\n\n  Upload `file` as an item.\n  \n```js\nclient\n.stream({ title: 'Images' })\n.file('maru 1.png', { filename: 'Maru.png', })\n.file('maru 2.png', { title: 'Awesome Maru' })\n.file('maru 3.png')\n```\n\n#### Stream.link(url:String, [options:Object])\n\n  Upload `url` as an item.\n  \n```js\nclient\n.stream({ title: 'Bookmarks' })\n.link('http://ign.com', { title: 'IGN' })\n.link('http://cuteoverload.com')\n.link('http://uglyoverload.com')\n```\n\n#### Stream.toJSON()\n\n  Return JSON representation.\n\n#### Stream.concurrency(n:Number)\n\n  Upload concurrency.\n\n#### Stream.remove([fn]:Function)\n\n  Remove and invoke `fn(err)`.\n\n#### Stream.load(fn:Function)\n\n  Load the stream and invoke `fn(err, stream)`.\n\n#### Stream.save([fn]:Function)\n\n  Save and invoke `fn(err)`\n  \n  Emits \"error\" events with `(err, item)` if an item\n  fails to properly save. The callback of this method\n  is _only_ invoked with an error related to creating\n  the stream itself.\n\n### Item(id:String|options:Object)\n\n  Initialize a new Item with the given options:\n  \n - `title` optional Item title string\n - `filename` optional filename for `.file()`\n\n  Alternatively pass the item's `id` and invoke `.load()`.\n\n#### Item.isNew()\n\n  Check if the stream is new.\n\n#### Item.toJSON()\n\n  Return JSON representation.\n\n#### Item.file(file:String)\n\n  Queue `file` for uploading.\n  \n```js\n var stream = client.stream({ title: 'Animals' })\n var item = stream.item({ title: 'Simon' })\n item.file('path/to/simon.jpg')\n```\n\n#### Item.link(url:String)\n\n  Queue `url` for uploading.\n  \n```js\n var stream = client.stream({ title: 'Bookmarks' })\n var item = stream.item({ title: 'Ign' })\n item.file('http://ign.com')\n```\n\n#### Item.remove([fn]:Function)\n\n  Remove and invoke `fn(err)`.\n\n#### Item.set(prop:String|Object, val:String|Function, [fn]:Function)\n\n  Set `prop`'s `val` with optional callback `fn`.\n\n#### Item.thumb(path:String, fn:Function)\n\n  Queue thumbnail `path` for the next `.save()`, or \n  upload immediately and invoke `fn(err)`. When a callback `fn`\n  is given the item __MUST__ have already been saved.\n\n#### Item.save(fn:Function)\n\n  Create the remote item\n  and upload the associated\n  content, invoking `fn(err)`.\n\n#### Item.thumbSize(size)\n\n  Select a thumb by the given size string:\n\n```js\nvar thumb = item.thumbSize('1200x1200');\nconsole.log(thumb.url);\n```\n\n### User\n\n  Initialize a user.\n\n#### User.avatarSize(size)\n\n  Select an avatar by the given size string:\n\n```js\nclient.user(function(err, user){\n  var img = user.avatarSize('300x300').url;\n});\n```\n","maintainers":[{"email":"vip@matticspace.com","name":"a8c"},{"email":"rauchg@gmail.com","name":"rauchg"},{"email":"nathan@tootallnate.net","name":"tootallnate"},{"email":"tj@vision-media.ca","name":"tjholowaychuk"}],"time":{"modified":"2022-06-13T06:14:01.072Z","created":"2013-09-02T21:29:41.205Z","0.1.0":"2013-09-02T21:29:43.704Z","0.2.0":"2013-09-10T17:48:10.588Z","0.2.1":"2013-10-29T01:45:59.784Z","0.3.0":"2014-01-22T01:10:21.705Z","0.3.1":"2014-01-29T01:17:16.865Z","0.3.2":"2014-09-03T21:14:11.986Z"},"readmeFilename":"Readme.md","keywords":["cloudup","api","client","files","upload","service"]}