{"_id":"thingiverse-js","_rev":"67-fe5f99a8c60c5dd0c86582ce1596e198","name":"thingiverse-js","description":"Easy Thingiverse API requests for Node.js","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"thingiverse-js","version":"0.0.0","keywords":["thingiverse","api","makerbot","got"],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"license":"MIT","_id":"thingiverse-js@0.0.0","maintainers":[{"name":"gsw","email":"talk@gsw.nyc"}],"homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"dist":{"shasum":"0ddd8f0e59e37fa42d3227ed142f66a8552c0546","tarball":"https://registry.npmjs.org/thingiverse-js/-/thingiverse-js-0.0.0.tgz","integrity":"sha512-1eFX92eHctFqtL1EnJcc2oJBIDEwGko1OhdtNUAVUopjopZru/GHreOYTw1218olajoPAv7lIIuwR/L4tg6hBQ==","signatures":[{"sig":"MEQCIH34fVwDnUoLJj0GpmZm3MqINfccjYApQSUl2UDaGYKqAiBOnfigBr3XVddmSS49Dtjbv0RIhlDOo6wEF8DyLU/5rA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib/"],"_shasum":"0ddd8f0e59e37fa42d3227ed142f66a8552c0546","gitHead":"85604e97900351391309b43dea803983ee786de1","scripts":{"test":"mocha","prepublish":"npm test","preversion":"npm test"},"_npmUser":{"name":"gsw","email":"talk@gsw.nyc"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"_npmVersion":"4.3.0","description":"Easy Thingiverse API requests for Node.js","directories":{},"_nodeVersion":"7.5.0","dependencies":{"got":"^6.7.1","lodash":"^4.17.4"},"devDependencies":{"chai":"^3.4.1","nock":"^9.0.9","mocha":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/thingiverse-js-0.0.0.tgz_1488394197072_0.7459754759911448","host":"packages-12-west.internal.npmjs.com"}},"0.0.1":{"name":"thingiverse-js","version":"0.0.1","keywords":["thingiverse","api","makerbot","got"],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"license":"MIT","_id":"thingiverse-js@0.0.1","maintainers":[{"name":"gsw","email":"talk@gsw.nyc"},{"name":"makerbot","email":"greg.walden+mb@makerbot.com"}],"homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"dist":{"shasum":"f2cf750230f6c78b018ec678ecee915cd89de019","tarball":"https://registry.npmjs.org/thingiverse-js/-/thingiverse-js-0.0.1.tgz","integrity":"sha512-i/YEM7mqJlJh6aMqy46Qs085M6uvJxFva+vBGGgOFzWrspnKLMUfT7SGyegapBJMYxfYQKecnb2dW7vL0+gnXQ==","signatures":[{"sig":"MEUCICw4clkytof/hY5AmOnYa+onxYNJ40bsUgo15zFwczqiAiEA3o8F1GOUEiD70JeUmEfInWdRMROid68nzQlsWD9y1P8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib/"],"_shasum":"f2cf750230f6c78b018ec678ecee915cd89de019","gitHead":"e612446e169f1270a62d1c1761e6445a7eb57274","scripts":{"test":"mocha","prepublish":"npm test","preversion":"npm test"},"_npmUser":{"name":"gsw","email":"talk@gsw.nyc"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"_npmVersion":"4.3.0","description":"Easy Thingiverse API requests for Node.js","directories":{},"_nodeVersion":"7.5.0","dependencies":{"got":"^6.7.1","lodash":"^4.17.4"},"devDependencies":{"chai":"^3.4.1","nock":"^9.0.9","mocha":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/thingiverse-js-0.0.1.tgz_1488401760039_0.8236949334386736","host":"packages-18-east.internal.npmjs.com"}},"0.1.0":{"name":"thingiverse-js","version":"0.1.0","keywords":["thingiverse","api","makerbot","got"],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"license":"MIT","_id":"thingiverse-js@0.1.0","maintainers":[{"name":"gsw","email":"talk@gsw.nyc"},{"name":"makerbot","email":"greg.walden+mb@makerbot.com"}],"homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"dist":{"shasum":"56f7423fb43106b1dbe8cabaf70fcfc7dd4e25a0","tarball":"https://registry.npmjs.org/thingiverse-js/-/thingiverse-js-0.1.0.tgz","integrity":"sha512-sKR35V7FbYyclPR2wau1lGXsknzybkz0AGXjFyBWEIiPrtvQklKnozP9y8IW05LzF2KSPOZ4V05O9iTtxUNC7A==","signatures":[{"sig":"MEUCIQD8spIaACdEvqIs5SBRsZ+hCVqkuvWo/1fB1G7NeEub+gIgGIkeyH56/lzAwRNsadVPRAIJPfTdiLIDDkih7+e6NDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib/"],"_shasum":"56f7423fb43106b1dbe8cabaf70fcfc7dd4e25a0","gitHead":"41209bf94f78c57a3776fc72123d835f0d7305a2","scripts":{"test":"mocha","prepublish":"npm test","preversion":"npm test"},"_npmUser":{"name":"gsw","email":"talk@gsw.nyc"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"_npmVersion":"4.3.0","description":"Easy Thingiverse API requests for Node.js","directories":{},"_nodeVersion":"7.5.0","dependencies":{"got":"^6.7.1","lodash":"^4.17.4","form-data":"^2.1.2"},"devDependencies":{"chai":"^3.4.1","nock":"^9.0.9","mocha":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/thingiverse-js-0.1.0.tgz_1488477905849_0.5397408846765757","host":"packages-12-west.internal.npmjs.com"}},"1.0.0":{"name":"thingiverse-js","version":"1.0.0","keywords":["thingiverse","api","makerbot","got"],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"license":"MIT","_id":"thingiverse-js@1.0.0","maintainers":[{"name":"makerbot","email":"greg.walden+mb@makerbot.com"},{"name":"gsw","email":"talk@gsw.nyc"}],"homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"dist":{"shasum":"336946c899fc78ee1dba8ab41dc5f4dd5fc9b788","tarball":"https://registry.npmjs.org/thingiverse-js/-/thingiverse-js-1.0.0.tgz","integrity":"sha512-9qRNreJkuuyNgwkMjK7wZeT8uOfn1X5SK/4fCRnyRz9aMRDDFpLyoUvhW0MdFklsrztEooukGQSmnfdM94hWlA==","signatures":[{"sig":"MEQCIE9oID6rOcQhzTCjNNIxTPtsg2bNaqsXm9hkKqD1rTrtAiAZGisLXh2VoSLZVKp4Q9qgQX8quLe2iT8GO8Q5+xJ5ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","files":["lib/"],"_shasum":"336946c899fc78ee1dba8ab41dc5f4dd5fc9b788","gitHead":"019e72791bbbe281d02292425db526ab0197209c","scripts":{"test":"mocha","prepublish":"npm test","preversion":"npm test"},"_npmUser":{"name":"makerbot","email":"greg.walden+mb@makerbot.com"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"_npmVersion":"4.2.0","description":"Easy Thingiverse API requests for Node.js","directories":{},"_nodeVersion":"7.10.1","dependencies":{"got":"^7.1.0","lodash":"^4.17.4","form-data":"^2.1.2"},"devDependencies":{"chai":"^3.4.1","nock":"^9.0.9","mocha":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/thingiverse-js-1.0.0.tgz_1504890984842_0.7215869298670441","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"thingiverse-js","version":"1.0.1","keywords":["thingiverse","api","makerbot","got"],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"license":"MIT","_id":"thingiverse-js@1.0.1","maintainers":[{"name":"gsw","email":"talk@gsw.nyc"},{"name":"makerbot","email":"greg.walden+mb@makerbot.com"}],"homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"dist":{"shasum":"1c6caa83bdcc34fdf2a8ad748890ab95db45bff4","tarball":"https://registry.npmjs.org/thingiverse-js/-/thingiverse-js-1.0.1.tgz","fileCount":4,"integrity":"sha512-fbcRx234hlo795IeRz8Gf2g2oCSc17ZkKo2OZflC9mDkaO21VUJCONhZTka7qttY0FX8EsbdQkJDPrwkyIYAIw==","signatures":[{"sig":"MEYCIQDCldLck3Z+k5e41Ic98tJGnTjMRE/sC2Sj4J8ICuL9JwIhAMD5ToYTLTJ+NVurO5r+yAUilI604thRvPNPnqy8992Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8092},"main":"lib/index.js","files":["lib/"],"gitHead":"8d456175810a38fb97393f67f8869456643954fc","scripts":{"test":"mocha","prepublish":"npm test","preversion":"npm test"},"_npmUser":{"name":"makerbot","email":"greg.walden+mb@makerbot.com"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"_npmVersion":"5.6.0","description":"Easy Thingiverse API requests for Node.js","directories":{},"_nodeVersion":"8.9.4","dependencies":{"got":"^8.3.0","lodash":"^4.17.4","form-data":"^2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.4.1","nock":"^9.0.9","mocha":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/thingiverse-js_1.0.1_1521495596939_0.03270465354784058","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-03-01T18:49:58.904Z","modified":"2024-05-30T12:04:53.793Z","0.0.0":"2017-03-01T18:49:58.904Z","0.0.1":"2017-03-01T20:56:00.585Z","0.1.0":"2017-03-02T18:05:07.811Z","1.0.0":"2017-09-08T17:16:25.737Z","1.0.1":"2018-03-19T21:39:57.053Z"},"maintainers":[{"email":"craig.king@ultimaker.com","name":"craig-ultimaker"},{"email":"devops+npmjs@makerbot.com","name":"mbdevops"},{"email":"talk@gsw.nyc","name":"gsw"}],"author":{"name":"Greg Walden","email":"greg.walden@makerbot.com"},"repository":{"url":"git+ssh://git@github.com/makerbot/thingiverse-js.git","type":"git"},"keywords":["thingiverse","api","makerbot","got"],"license":"MIT","homepage":"https://github.com/makerbot/thingiverse-js#readme","bugs":{"url":"https://github.com/makerbot/thingiverse-js/issues"},"readme":"[![npm version](https://badge.fury.io/js/thingiverse-js.svg)](https://badge.fury.io/js/thingiverse-js)\n[![Build status](https://travis-ci.org/makerbot/thingiverse-js.svg?branch=master)](https://travis-ci.org/makerbot/thingiverse-js)\n[![Dependencies](https://david-dm.org/makerbot/thingiverse-js.svg)](https://david-dm.org/makerbot/thingiverse-js)\n\n## Use\n\nThis library is a wrapper over the excellent [got](https://github.com/sindresorhus/got) HTTP request library.\nWe've added some Thingiverse-specific conveniences, but all features of _got_ will work here. Please review their\n[documentation](https://github.com/sindresorhus/got#readme).\n\n```sh\nnpm install thingiverse-js\n```\n```js\nconst thingiverse = require('thingiverse-js');\nconst token = 'abcdefgh12345';\n\nthingiverse('users/me', { token }).then(res => {\n  console.log('My location is \"%s\" on Thingiverse', res.body.location);\n  return thingiverse.patch(`users/${res.body.name}`, {\n    token,\n    body: { location: 'New Caprica' }\n  });\n}).then(res => {\n  console.log('Now my location is \"%s\" on Thingiverse', res.body.location);\n}).catch(err => {\n  console.log(err);\n  console.log(thingiverse.getError(err.response));\n});\n```\n\n### API\n\nIn addition to the standard [got](https://github.com/sindresorhus/got) methods, we've added\nsome conveniences.\n\n#### thingiverse(path, opts)\n\nReturns a Promise for the API request. This Promise is the return value from a _got_ request.\n\n##### path\n\nShould be a string containing the endpoint you're calling (`/users/me` for example). The leading slash is optional.\n\n##### opts\n\nShould be an object containing, at least, the OAuth access token set to the property `token`. Other _got_ options may be added.\n\n#### thingiverse.getAuthorizeUrl(opts)\n\nReturns a string containing the URL that will allow your users to authorize your application.\n\n##### opts\n\nType: `object`, `string`\n\nAs an object, this parameter must contain your `client_id` in the form `{ query: { client_id: 'abcdef123' } }`. Other _got_ options may be added.\nAs a string, simply pass your `client_id`.\n\n#### thingiverse.getError(response)\n\nReturns a string containing the error that occurred in your API request, or `null` if none is found.\n\n##### response\n\nType: `object`\n\nShould be the response object returned from an API request (usually, `err.response`).\n\n#### thingiverse.getAccessToken(opts)\n\nBuilds a request for exchanging an OAuth authorization code for an access token. Returns a Promise.\n\n##### opts\n\nType: `object`\n\nAt a minimum, this object must contain your `client_id`, `client_secret`, and the `code`\nreturned after a user authorizes your application. Use the form:\n```js\n{\n  body: {\n    client_id: 'abcdef123',\n    client_secret: 'tuvwxzy789',\n    code: 'mnopqrs456'\n  }\n}\n```\n","readmeFilename":"README.md"}