orcid_client 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/orcid_client/api.rb +20 -0
- data/lib/orcid_client/version.rb +1 -1
- data/spec/api_spec.rb +24 -2
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/delete/should_delete_notification.yml +69 -0
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/get/should_get_notification.yml +68 -0
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/post/should_create_notification.yml +6 -6
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db27debd808936cb1275702074e9640a3123cbd
|
4
|
+
data.tar.gz: 1a018de7169ba3a144cb342bae62b4d46e22cf2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4352820d61cb5e200dcc543a512fc4cc79d9c8473b88cfc95453b729dd8b4490ca0348714e8cb431a5cee21fa3ada83b3d2abf0e2a9795b3b398a5e45ccf0f32
|
7
|
+
data.tar.gz: 3038a79194ca1eae803be0c8708c5c4518ad87ac314651c82c50a579c5e2507a8bbddc78d3e25187f1d70f4866d6e844b248c02168db87b4175956054a1ca23a
|
data/Gemfile.lock
CHANGED
data/lib/orcid_client/api.rb
CHANGED
@@ -72,5 +72,25 @@ module OrcidClient
|
|
72
72
|
response.body["put_code"] = put_code.present? ? put_code.to_i : nil
|
73
73
|
response
|
74
74
|
end
|
75
|
+
|
76
|
+
def delete_notification(options={})
|
77
|
+
return { "errors" => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
|
78
|
+
return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
|
79
|
+
|
80
|
+
orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
|
81
|
+
|
82
|
+
url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/notification-permission/#{put_code}"
|
83
|
+
response = Maremma.delete(url, content_type: 'application/vnd.orcid+xml', bearer: notification_access_token)
|
84
|
+
end
|
85
|
+
|
86
|
+
def get_notification(options={})
|
87
|
+
return { "errors" => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
|
88
|
+
return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
|
89
|
+
|
90
|
+
orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
|
91
|
+
|
92
|
+
url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/notification-permission/#{put_code}"
|
93
|
+
response = Maremma.get(url, content_type: 'application/vnd.orcid+xml', bearer: notification_access_token)
|
94
|
+
end
|
75
95
|
end
|
76
96
|
end
|
data/lib/orcid_client/version.rb
CHANGED
data/spec/api_spec.rb
CHANGED
@@ -49,15 +49,37 @@ describe OrcidClient, vcr: true do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
describe "notifications" do
|
53
|
-
subject { OrcidClient::Notification.new(doi: doi, orcid: orcid, notification_access_token: notification_access_token, subject: "Request to add a work", intro: "This is an intro", sandbox: true) }
|
52
|
+
describe "notifications", :order => :defined do
|
53
|
+
subject { OrcidClient::Notification.new(doi: doi, orcid: orcid, notification_access_token: notification_access_token, put_code: "144941", subject: "Request to add a work", intro: "This is an intro", sandbox: true) }
|
54
54
|
|
55
55
|
describe 'post' do
|
56
|
+
subject { OrcidClient::Notification.new(doi: doi, orcid: orcid, notification_access_token: notification_access_token, subject: "Request to add a work", intro: "This is an intro", sandbox: true) }
|
57
|
+
|
56
58
|
it 'should create notification' do
|
57
59
|
response = subject.create_notification(sandbox: true)
|
58
60
|
expect(response.body["put_code"]).not_to be_blank
|
59
61
|
expect(response.status).to eq(201)
|
60
62
|
end
|
61
63
|
end
|
64
|
+
|
65
|
+
describe 'get' do
|
66
|
+
it 'should get notification' do
|
67
|
+
response = subject.get_notification(sandbox: true)
|
68
|
+
notification = response.body.fetch("data", {}).fetch("notification", {})
|
69
|
+
expect(notification["put_code"]).to eq("144941")
|
70
|
+
expect(notification["items"]["item"]).to eq("item_type"=>"work", "item_name"=>"omniauth-orcid: v.1.1.5", "external_id"=>{"external_id_type"=>"DOI", "external_id_value"=>"10.5281/zenodo.59983"})
|
71
|
+
expect(response.status).to eq(200)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe 'delete' do
|
76
|
+
it 'should delete notification' do
|
77
|
+
response = subject.delete_notification(sandbox: true)
|
78
|
+
notification = response.body.fetch("data", {}).fetch("notification", {})
|
79
|
+
expect(notification["put_code"]).to eq("144941")
|
80
|
+
expect(notification["items"]["item"]).to eq("item_type"=>"work", "item_name"=>"omniauth-orcid: v.1.1.5", "external_id"=>{"external_id_type"=>"DOI", "external_id_value"=>"10.5281/zenodo.59983"})
|
81
|
+
expect(response.status).to eq(200)
|
82
|
+
end
|
83
|
+
end
|
62
84
|
end
|
63
85
|
end
|
data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/delete/should_delete_notification.yml
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://api.sandbox.orcid.org/v2.0_rc3/0000-0001-6528-2027/notification-permission/144941
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Content-Type:
|
13
|
+
- application/vnd.orcid+xml
|
14
|
+
Accept:
|
15
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
16
|
+
Authorization:
|
17
|
+
- Bearer <NOTIFICATION_ACCESS_TOKEN>
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: ''
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx/1.4.6 (Ubuntu)
|
25
|
+
Date:
|
26
|
+
- Sat, 26 Nov 2016 07:25:16 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.orcid+xml; qs=5;charset=UTF-8
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |
|
36
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
37
|
+
<notification:notification put-code="144941" xmlns:internal="http://www.orcid.org/ns/internal" xmlns:funding="http://www.orcid.org/ns/funding" xmlns:preferences="http://www.orcid.org/ns/preferences" xmlns:address="http://www.orcid.org/ns/address" xmlns:education="http://www.orcid.org/ns/education" xmlns:work="http://www.orcid.org/ns/work" xmlns:deprecated="http://www.orcid.org/ns/deprecated" xmlns:other-name="http://www.orcid.org/ns/other-name" xmlns:history="http://www.orcid.org/ns/history" xmlns:employment="http://www.orcid.org/ns/employment" xmlns:error="http://www.orcid.org/ns/error" xmlns:notification="http://www.orcid.org/ns/notification" xmlns:common="http://www.orcid.org/ns/common" xmlns:person="http://www.orcid.org/ns/person" xmlns:activities="http://www.orcid.org/ns/activities" xmlns:record="http://www.orcid.org/ns/record" xmlns:researcher-url="http://www.orcid.org/ns/researcher-url" xmlns:peer-review="http://www.orcid.org/ns/peer-review" xmlns:personal-details="http://www.orcid.org/ns/personal-details" xmlns:keyword="http://www.orcid.org/ns/keyword" xmlns:email="http://www.orcid.org/ns/email" xmlns:external-identifier="http://www.orcid.org/ns/external-identifier">
|
38
|
+
<notification:notification-type>permission</notification:notification-type>
|
39
|
+
<notification:authorization-url>
|
40
|
+
<notification:uri>https://sandbox.orcid.org/oauth/authorize?client_id=<ORCID_CLIENT_ID>&response_type=code&scope=/read-limited%20/activities/update%20/person/update&redirect_uri=http://localhost:8080/users/auth/orcid/callback</notification:uri>
|
41
|
+
<notification:path>/oauth/authorize?client_id=<ORCID_CLIENT_ID>&response_type=code&scope=/read-limited%20/activities/update%20/person/update&redirect_uri=http://localhost:8080/users/auth/orcid/callback</notification:path>
|
42
|
+
<notification:host>sandbox.orcid.org</notification:host>
|
43
|
+
</notification:authorization-url>
|
44
|
+
<notification:notification-subject>Request to add a work</notification:notification-subject>
|
45
|
+
<notification:notification-intro>This is an intro</notification:notification-intro>
|
46
|
+
<notification:items>
|
47
|
+
<notification:item>
|
48
|
+
<notification:item-type>work</notification:item-type>
|
49
|
+
<notification:item-name>omniauth-orcid: v.1.1.5</notification:item-name>
|
50
|
+
<common:external-id>
|
51
|
+
<common:external-id-type>DOI</common:external-id-type>
|
52
|
+
<common:external-id-value>10.5281/zenodo.59983</common:external-id-value>
|
53
|
+
</common:external-id>
|
54
|
+
</notification:item>
|
55
|
+
</notification:items>
|
56
|
+
<common:created-date>2016-11-26T07:24:33.965Z</common:created-date>
|
57
|
+
<common:archived-date>2016-11-26T07:25:16.060Z</common:archived-date>
|
58
|
+
<common:source>
|
59
|
+
<common:source-client-id>
|
60
|
+
<common:uri>http://sandbox.orcid.org/client/<ORCID_CLIENT_ID></common:uri>
|
61
|
+
<common:path><ORCID_CLIENT_ID></common:path>
|
62
|
+
<common:host>sandbox.orcid.org</common:host>
|
63
|
+
</common:source-client-id>
|
64
|
+
<common:source-name>DataCite/ORCID Claim Tool</common:source-name>
|
65
|
+
</common:source>
|
66
|
+
</notification:notification>
|
67
|
+
http_version:
|
68
|
+
recorded_at: Sat, 26 Nov 2016 07:25:16 GMT
|
69
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.orcid.org/v2.0_rc3/0000-0001-6528-2027/notification-permission/144941
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Maremma - https://github.com/datacite/maremma
|
12
|
+
Content-Type:
|
13
|
+
- application/vnd.orcid+xml
|
14
|
+
Accept:
|
15
|
+
- text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
|
16
|
+
Authorization:
|
17
|
+
- Bearer <NOTIFICATION_ACCESS_TOKEN>
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: ''
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx/1.4.6 (Ubuntu)
|
25
|
+
Date:
|
26
|
+
- Sat, 26 Nov 2016 07:25:15 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/vnd.orcid+xml; qs=5;charset=UTF-8
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: |
|
36
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
37
|
+
<notification:notification put-code="144941" xmlns:internal="http://www.orcid.org/ns/internal" xmlns:funding="http://www.orcid.org/ns/funding" xmlns:preferences="http://www.orcid.org/ns/preferences" xmlns:address="http://www.orcid.org/ns/address" xmlns:education="http://www.orcid.org/ns/education" xmlns:work="http://www.orcid.org/ns/work" xmlns:deprecated="http://www.orcid.org/ns/deprecated" xmlns:other-name="http://www.orcid.org/ns/other-name" xmlns:history="http://www.orcid.org/ns/history" xmlns:employment="http://www.orcid.org/ns/employment" xmlns:error="http://www.orcid.org/ns/error" xmlns:notification="http://www.orcid.org/ns/notification" xmlns:common="http://www.orcid.org/ns/common" xmlns:person="http://www.orcid.org/ns/person" xmlns:activities="http://www.orcid.org/ns/activities" xmlns:record="http://www.orcid.org/ns/record" xmlns:researcher-url="http://www.orcid.org/ns/researcher-url" xmlns:peer-review="http://www.orcid.org/ns/peer-review" xmlns:personal-details="http://www.orcid.org/ns/personal-details" xmlns:keyword="http://www.orcid.org/ns/keyword" xmlns:email="http://www.orcid.org/ns/email" xmlns:external-identifier="http://www.orcid.org/ns/external-identifier">
|
38
|
+
<notification:notification-type>permission</notification:notification-type>
|
39
|
+
<notification:authorization-url>
|
40
|
+
<notification:uri>https://sandbox.orcid.org/oauth/authorize?client_id=<ORCID_CLIENT_ID>&response_type=code&scope=/read-limited%20/activities/update%20/person/update&redirect_uri=http://localhost:8080/users/auth/orcid/callback</notification:uri>
|
41
|
+
<notification:path>/oauth/authorize?client_id=<ORCID_CLIENT_ID>&response_type=code&scope=/read-limited%20/activities/update%20/person/update&redirect_uri=http://localhost:8080/users/auth/orcid/callback</notification:path>
|
42
|
+
<notification:host>sandbox.orcid.org</notification:host>
|
43
|
+
</notification:authorization-url>
|
44
|
+
<notification:notification-subject>Request to add a work</notification:notification-subject>
|
45
|
+
<notification:notification-intro>This is an intro</notification:notification-intro>
|
46
|
+
<notification:items>
|
47
|
+
<notification:item>
|
48
|
+
<notification:item-type>work</notification:item-type>
|
49
|
+
<notification:item-name>omniauth-orcid: v.1.1.5</notification:item-name>
|
50
|
+
<common:external-id>
|
51
|
+
<common:external-id-type>DOI</common:external-id-type>
|
52
|
+
<common:external-id-value>10.5281/zenodo.59983</common:external-id-value>
|
53
|
+
</common:external-id>
|
54
|
+
</notification:item>
|
55
|
+
</notification:items>
|
56
|
+
<common:created-date>2016-11-26T07:24:33.965Z</common:created-date>
|
57
|
+
<common:source>
|
58
|
+
<common:source-client-id>
|
59
|
+
<common:uri>http://sandbox.orcid.org/client/<ORCID_CLIENT_ID></common:uri>
|
60
|
+
<common:path><ORCID_CLIENT_ID></common:path>
|
61
|
+
<common:host>sandbox.orcid.org</common:host>
|
62
|
+
</common:source-client-id>
|
63
|
+
<common:source-name>DataCite/ORCID Claim Tool</common:source-name>
|
64
|
+
</common:source>
|
65
|
+
</notification:notification>
|
66
|
+
http_version:
|
67
|
+
recorded_at: Sat, 26 Nov 2016 07:25:15 GMT
|
68
|
+
recorded_with: VCR 3.0.3
|
data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/post/should_create_notification.yml
CHANGED
@@ -19,7 +19,7 @@ http_interactions:
|
|
19
19
|
Server:
|
20
20
|
- openresty/1.11.2.1
|
21
21
|
Date:
|
22
|
-
-
|
22
|
+
- Sat, 26 Nov 2016 07:24:33 GMT
|
23
23
|
Content-Type:
|
24
24
|
- application/json;charset=UTF-8
|
25
25
|
Connection:
|
@@ -30,7 +30,7 @@ http_interactions:
|
|
30
30
|
- GET, POST, OPTIONS
|
31
31
|
body:
|
32
32
|
encoding: UTF-8
|
33
|
-
string: '{"responseHeader":{"status":0,"QTime":
|
33
|
+
string: '{"responseHeader":{"status":0,"QTime":6},"response":{"numFound":1,"start":0,"docs":[{"minted":"2016-08-11T04:47:51Z","datacentre_symbol":"CERN.ZENODO","xml":"PHJlc291cmNlIHhtbG5zPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vZGF0YWNpdGUub3JnL3NjaGVtYS9rZXJuZWwtMyBodHRwOi8vc2NoZW1hLmRhdGFjaXRlLm9yZy9tZXRhL2tlcm5lbC0zL21ldGFkYXRhLnhzZCI+CiAgPGlkZW50aWZpZXIgaWRlbnRpZmllclR5cGU9IkRPSSI+MTAuNTI4MS96ZW5vZG8uNTk5ODM8L2lkZW50aWZpZXI+CiAgPGNyZWF0b3JzPgogICAgPGNyZWF0b3I+CiAgICAgIDxjcmVhdG9yTmFtZT5NYXJ0aW4gRmVubmVyPC9jcmVhdG9yTmFtZT4KICAgICAgPGFmZmlsaWF0aW9uPkRhdGFDaXRlPC9hZmZpbGlhdGlvbj4KICAgIDwvY3JlYXRvcj4KICAgIDxjcmVhdG9yPgogICAgICA8Y3JlYXRvck5hbWU+R3VkbXVuZHVyIEEuIFRob3Jpc3NvbjwvY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0dHBzOi8vZ2l0aHViLmNvbS9lbGVhbm9yYWtoIiZndDtlbGVhbm9yYWtoJmx0Oy9hJmd0Oy4mbHQ7L2xpJmd0OwombHQ7L3VsJmd0OzwvZGVzY3JpcHRpb24+CiAgPC9kZXNjcmlwdGlvbnM+CjwvcmVzb3VyY2U+Cg==","datacentre":"CERN.ZENODO
|
34
34
|
- ZENODO - Research. Shared.","updated":"2016-08-11T04:47:51Z","prefix":"10.5281","doi":"10.5281/ZENODO.59983","relatedIdentifier":["IsSupplementTo:URL:https://github.com/datacite/omniauth-orcid/tree/v.1.1.5","HasPart:URL:https://zenodo.org/record/59983/files/omniauth-orcid-v.1.1.5.zip"],"creator":["Martin
|
35
35
|
Fenner","Gudmundur A. Thorisson","Eleanor Kiefel Haggerty","Anusha Ranganathan"],"publisher":"Zenodo","title":["omniauth-orcid:
|
36
36
|
v.1.1.5"],"description":["<p><a href=\"https://github.com/datacite/omniauth-orcid/releases/tag/v.1.1.5\">onmiauth-orcid
|
@@ -40,7 +40,7 @@ http_interactions:
|
|
40
40
|
|
41
41
|
'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Sat, 26 Nov 2016 07:24:34 GMT
|
44
44
|
- request:
|
45
45
|
method: post
|
46
46
|
uri: https://api.sandbox.orcid.org/v2.0_rc3/0000-0001-6528-2027/notification-permission
|
@@ -85,7 +85,7 @@ http_interactions:
|
|
85
85
|
Server:
|
86
86
|
- nginx/1.4.6 (Ubuntu)
|
87
87
|
Date:
|
88
|
-
-
|
88
|
+
- Sat, 26 Nov 2016 07:24:34 GMT
|
89
89
|
Content-Type:
|
90
90
|
- application/vnd.orcid+xml; qs=5;charset=UTF-8
|
91
91
|
Content-Length:
|
@@ -95,10 +95,10 @@ http_interactions:
|
|
95
95
|
Access-Control-Allow-Origin:
|
96
96
|
- "*"
|
97
97
|
Location:
|
98
|
-
- http://api.sandbox.orcid.org:443/orcid-api-web/v2.0_rc3/0000-0001-6528-2027/notification-permission/
|
98
|
+
- http://api.sandbox.orcid.org:443/orcid-api-web/v2.0_rc3/0000-0001-6528-2027/notification-permission/144941
|
99
99
|
body:
|
100
100
|
encoding: UTF-8
|
101
101
|
string: ''
|
102
102
|
http_version:
|
103
|
-
recorded_at:
|
103
|
+
recorded_at: Sat, 26 Nov 2016 07:24:35 GMT
|
104
104
|
recorded_with: VCR 3.0.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orcid_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: maremma
|
@@ -343,6 +343,8 @@ files:
|
|
343
343
|
- resources/record_2.0_rc3/work-2.0_rc3.xsd
|
344
344
|
- spec/api_spec.rb
|
345
345
|
- spec/fixtures/vcr_cassettes/OrcidClient/get/should_get_works.yml
|
346
|
+
- spec/fixtures/vcr_cassettes/OrcidClient/notifications/delete/should_delete_notification.yml
|
347
|
+
- spec/fixtures/vcr_cassettes/OrcidClient/notifications/get/should_get_notification.yml
|
346
348
|
- spec/fixtures/vcr_cassettes/OrcidClient/notifications/post/should_create_notification.yml
|
347
349
|
- spec/fixtures/vcr_cassettes/OrcidClient/works/delete/should_delete_work.yml
|
348
350
|
- spec/fixtures/vcr_cassettes/OrcidClient/works/get/should_get_works.yml
|