{"_id":"23andme","_rev":"9-30909b82659e9618ddbe5f282baa62ea","name":"23andme","description":"JavaScript wrapper for the 23andMe API.","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.0":{"name":"23andme","version":"0.0.0","description":"a api wrapper of api.23andme.com","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/turingou/23andme.git"},"keywords":["23andme","gene","dna"],"author":{"name":"turing"},"license":"MIT","bugs":{"url":"https://github.com/turingou/23andme/issues"},"_id":"23andme@0.0.0","dist":{"shasum":"782a4130db8325151105b7fef4373ea2265be839","tarball":"https://registry.npmjs.org/23andme/-/23andme-0.0.0.tgz","integrity":"sha512-yzn82DTgD1RqC4dpiJhuW+/KPLZ90ap8YR8syvG/TsOpLkS/glvll9EoTCJwO0w2YFzqCFt1nlQxwdOzEeLjmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxRhlg2JWzmYZIMpH+Zp1ctndn6Qm1TVRoFG1fC1orPAiEA3GsDNK/BZulGfGrRvyTOj5FsB1/Ji95/Hrs3a/4M/s0="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"turing","email":"o.u.turing@gmail.com"},"maintainers":[{"name":"turing","email":"o.u.turing@gmail.com"}]},"1.0.0":{"name":"23andme","version":"1.0.0","description":"23andMe API wrapper.","author":{"name":"Luke Horvat"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/lukehorvat/23andme.git"},"bugs":{"url":"https://github.com/lukehorvat/23andme/issues"},"main":"./dist/index.js","scripts":{"build":"rimraf dist && babel lib -d dist","prepublish":"npm run build"},"dependencies":{},"devDependencies":{"babel-cli":"6.7.5","babel-preset-es2015":"6.6.0","rimraf":"2.5.2"},"keywords":["23andme","api","node","wrapper","client"],"babel":{"presets":["es2015"]},"gitHead":"074a540030429574ad0fbcb4bf5ce122cbb807de","homepage":"https://github.com/lukehorvat/23andme#readme","_id":"23andme@1.0.0","_shasum":"bfb5835366d376858b2ce30e0be7d0153907a13d","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.6.0","_npmUser":{"name":"lukehorvat","email":"lukehorvat@gmail.com"},"dist":{"shasum":"bfb5835366d376858b2ce30e0be7d0153907a13d","tarball":"https://registry.npmjs.org/23andme/-/23andme-1.0.0.tgz","integrity":"sha512-2jNYnHnNOhTYDJaZpukx1x2HK4d4blkyLTCZtJxrzI3jJdNqi7JK3PfCYp2l+Re8Hd3Yo1GqSECJ6ZOVlDP4ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEhGfTiQ+Vc6ecJAJ23s873KD0aIR8OJEkrzS5WI/zZAiACqnFCVoVZO+oUrMrk6owpxf1qHvnPsCWwPSkVkG8hgA=="}]},"maintainers":[{"name":"lukehorvat","email":"lukehorvat@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/23andme-1.0.0.tgz_1460715473269_0.6743133985437453"}},"1.0.1":{"name":"23andme","version":"1.0.1","description":"23andMe API wrapper.","author":{"name":"Luke Horvat"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/lukehorvat/23andme.git"},"bugs":{"url":"https://github.com/lukehorvat/23andme/issues"},"main":"./dist/index.js","scripts":{"build":"rimraf dist && babel lib -d dist","prepublish":"npm run build"},"dependencies":{"form-data":"1.0.0-rc4","got":"6.3.0"},"devDependencies":{"babel-cli":"6.7.5","babel-preset-es2015":"6.6.0","rimraf":"2.5.2"},"keywords":["23andme","api","node","wrapper","client"],"babel":{"presets":["es2015"]},"gitHead":"90faa51780cb7a838c22965fd5448311a3ff88e6","homepage":"https://github.com/lukehorvat/23andme#readme","_id":"23andme@1.0.1","_shasum":"9180969f1f7b3ec46e09f6eb426d11cbd3d983ce","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.6.0","_npmUser":{"name":"lukehorvat","email":"lukehorvat@gmail.com"},"dist":{"shasum":"9180969f1f7b3ec46e09f6eb426d11cbd3d983ce","tarball":"https://registry.npmjs.org/23andme/-/23andme-1.0.1.tgz","integrity":"sha512-r34/FmZYQ9NNVPUh5pR4UaLpi87TrMIo8H/AWiPThLRMdfhGJsbCYQFCkXvB+DzCSSXW+shPQX58bvRYp9JpBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzg7hiX5Tb1E45j8J6hxPofcnXqRuWlHJHfI2adDJbCAiEA5W0xDqwyzezF0WfWfJAdSTmrgzOQ23j/+NMWo4UEmec="}]},"maintainers":[{"name":"lukehorvat","email":"lukehorvat@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/23andme-1.0.1.tgz_1460782947397_0.10228817421011627"}},"1.1.0":{"name":"23andme","version":"1.1.0","description":"JavaScript wrapper for the 23andMe API.","author":{"name":"Luke Horvat"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/lukehorvat/23andme.git"},"bugs":{"url":"https://github.com/lukehorvat/23andme/issues"},"main":"./dist/index.js","scripts":{"build":"rimraf dist && babel lib -d dist","prepublish":"npm run build"},"dependencies":{"form-data":"1.0.0-rc4","got":"6.3.0"},"devDependencies":{"babel-cli":"6.7.5","babel-preset-es2015":"6.6.0","rimraf":"2.5.2"},"keywords":["23andme","api","node","node.js","wrapper","client","biology","genomics","genome","dna"],"babel":{"presets":["es2015"]},"gitHead":"2a8519c3d969a3afaa61c490d2fe6de5231c0c70","homepage":"https://github.com/lukehorvat/23andme#readme","_id":"23andme@1.1.0","_shasum":"65e00f3e5128be7974fd6ebca65ccbf21c925d32","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.6.0","_npmUser":{"name":"lukehorvat","email":"lukehorvat@gmail.com"},"dist":{"shasum":"65e00f3e5128be7974fd6ebca65ccbf21c925d32","tarball":"https://registry.npmjs.org/23andme/-/23andme-1.1.0.tgz","integrity":"sha512-HYUVkK2C8ObX2rxXQzubnwP25ScR/lIM8fB5N+YgN+GNjCDRNmpEcqR6bpejyHk+e0mo7ag3D4h57NnH5LlTew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsWoradt/oUaQNlMtM1zBFMhj+5LszvNBN6QfCN+hi/AiA2NVYLnb4k1juYmHG7zzS9yTI5N3LEBldOFPWCtdmHHA=="}]},"maintainers":[{"name":"lukehorvat","email":"lukehorvat@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/23andme-1.1.0.tgz_1460981322943_0.3258835142478347"}}},"readme":"# 23andme [![NPM version](http://img.shields.io/npm/v/23andme.svg?style=flat-square)](https://www.npmjs.org/package/23andme)\n\nJavaScript wrapper for the [23andMe API](https://api.23andme.com).\n\n## Installation\n\nInstall the package with NPM:\n\n```bash\n$ npm install 23andme\n```\n\n## Usage\n\nMinimal example:\n\n```javascript\nimport API from \"23andme\";\n\nlet clientId = \"fake_client_id\";\nlet clientSecret = \"fake_client_secret\";\nlet redirectUri = \"http://localhost:9000/receive_code\";\nlet scope = [\"ancestry\"];\nlet api = new API(clientId, clientSecret, redirectUri, scope);\n\nfunction receiveCode(code) {\n  api.auth(code)\n  .then(() => api.ancestry())\n  .then(ancestry => console.log(ancestry))\n  .catch(err => console.error(err));\n}\n```\n\nAs can be seen, the package exposes an API wrapper class that can be instantiated. This class has the following methods:\n\n* `constructor(clientId, clientSecret, redirectUri, scope)`\n  * Creates an instance of the class.\n* `auth(code)`\n  * Authenticates with the 23andMe API by exchanging an authorization code for an authorization token.\n  * Returns a Promise of the authorization token.\n  * Call this method first before you make any API requests!\n* `user()`\n  * Retrieves data from the API's `/user` endpoint.\n  * Returns a Promise of the endpoint's response data.\n* `names()`\n  * Retrieves data from the API's `/names` endpoint.\n  * Returns a Promise of the endpoint's response data.\n* `haplogroups()`\n  * Retrieves data from the API's `/haplogroups` endpoint.\n  * Returns a Promise of the endpoint's response data.\n* `ancestry()`\n  * Retrieves data from the API's `/ancestry` endpoint.\n  * Returns a Promise of the endpoint's response data.\n* `familyMembers()`\n  * Retrieves data from the API's `/family_members` endpoint.\n  * Returns a Promise of the endpoint's response data.\n* `relatives()`\n  * Retrieves data from the API's `/relatives` endpoint.\n  * Returns a Promise of the endpoint's response data.\n\nAnd the following properties:\n\n* `authUri`\n  * The URI to redirect the user's Web browser to in order for them to login to 23andMe and be granted an authorization code. (When 23andMe sends the authorization code to your server, pass it to the `auth()` method!)\n* `baseUri`\n  * The base URI of the 23andMe API.\n* `token`\n  * The authorization token granted when `auth()` was called.\n\n## Disclaimer\n\nThe package is not officially affiliated with 23andMe in any way. Use at own risk.\n","maintainers":[{"name":"lukehorvat","email":"lukehorvat@gmail.com"}],"time":{"modified":"2022-06-12T14:06:40.978Z","created":"2013-09-05T19:11:16.344Z","0.0.0":"2013-09-05T19:11:22.083Z","1.0.0":"2016-04-15T10:17:56.706Z","1.0.1":"2016-04-16T05:02:27.902Z","1.1.0":"2016-04-18T12:08:43.366Z"},"author":{"name":"Luke Horvat"},"repository":{"type":"git","url":"git+https://github.com/lukehorvat/23andme.git"},"keywords":["23andme","api","node","node.js","wrapper","client","biology","genomics","genome","dna"],"bugs":{"url":"https://github.com/lukehorvat/23andme/issues"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/lukehorvat/23andme#readme"}