twenty3andme 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/twenty3andme/client.rb +3 -1
- data/twenty3andme.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -46,7 +46,7 @@ Now requests can be made with the stored token:
|
|
46
46
|
|
47
47
|
== Use without Rails
|
48
48
|
|
49
|
-
First, Authorize and receive the code from 23andme: https://api.23andme.com/authorize/?redirect_uri=http://localhost:5000/receive_code/&response_type=code&client_id=a8a1f21d3417b70de786daea7e9ce2a8&scope=
|
49
|
+
First, Authorize and receive the code from 23andme: https://api.23andme.com/authorize/?redirect_uri=http://localhost:5000/receive_code/&response_type=code&client_id=a8a1f21d3417b70de786daea7e9ce2a8&scope=names basic haplogroups relatives genome
|
50
50
|
|
51
51
|
c = Twenty3AndMe::Client.new
|
52
52
|
c.request_token('client_id', 'client_secret', 'code_from_above', 'http://localhost:5000/receive_code/', ['ancestry', 'basic', 'rs4778241'])
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/twenty3andme/client.rb
CHANGED
@@ -14,7 +14,9 @@ module Twenty3AndMe
|
|
14
14
|
options = { :headers => {"Authorization" => "Bearer #{@token}"} }
|
15
15
|
fullpath = URI.escape(VERSION + path)
|
16
16
|
resp = self.class.get(fullpath, options).parsed_response
|
17
|
-
|
17
|
+
if resp.class == Hash
|
18
|
+
raise APIRequestError, resp['error_description'] if resp['error']
|
19
|
+
end
|
18
20
|
resp
|
19
21
|
end
|
20
22
|
|
data/twenty3andme.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twenty3andme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
segments:
|
184
184
|
- 0
|
185
|
-
hash:
|
185
|
+
hash: -2529211607134615514
|
186
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
187
|
none: false
|
188
188
|
requirements:
|