borrow_direct 1.1.0 → 1.2.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +6 -0
- data/Gemfile +2 -0
- data/README.md +19 -6
- data/bd_metrics/finditem_measure.rb +8 -1
- data/borrow_direct.gemspec +1 -1
- data/lib/borrow_direct/authentication.rb +16 -8
- data/lib/borrow_direct/defaults.rb +4 -1
- data/lib/borrow_direct/encryption.rb +34 -0
- data/lib/borrow_direct/error.rb +17 -0
- data/lib/borrow_direct/find_item.rb +32 -18
- data/lib/borrow_direct/pickup_location.rb +32 -0
- data/lib/borrow_direct/request.rb +30 -8
- data/lib/borrow_direct/request_item.rb +15 -7
- data/lib/borrow_direct/request_query.rb +18 -4
- data/lib/borrow_direct/version.rb +1 -1
- data/test/authentication_test.rb +40 -12
- data/test/encryption_test.rb +58 -0
- data/test/find_item_test.rb +66 -11
- data/test/request_item_test.rb +65 -8
- data/test/request_query_test.rb +23 -27
- data/test/request_test.rb +40 -27
- data/test/test_helper.rb +10 -1
- data/test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml +11 -23
- data/test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml +12 -23
- data/test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml +12 -24
- data/test/vcr_cassettes/Authentication/get_auth_id/Raises_for_bad_api_key.yml +41 -0
- data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml +12 -23
- data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml +12 -24
- data/test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml +11 -23
- data/test/vcr_cassettes/Authentication/get_auth_id/returns_auth_id_with_API_key_from_defaults.yml +40 -0
- data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/works.yml +11 -23
- data/test/vcr_cassettes/FindItem/_find_item_request/Raises_with_bad_api_key.yml +41 -0
- data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml +47 -18
- data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml +66 -18
- data/test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml +66 -19
- data/test/vcr_cassettes/FindItem/_find_item_request/raises_proper_error_on_bad_AID.yml +40 -0
- data/test/vcr_cassettes/FindItem/_find_item_request/uses_manually_set_auth_id.yml +97 -0
- data/test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml +46 -9
- data/test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml +66 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/_pickup_location_data/returns_array_of_PickupLocations.yml +97 -0
- data/test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml +66 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml +46 -9
- data/test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml +66 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/knows_locally_available_.yml +47 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_BD_returns_PUBFI002.yml +46 -9
- data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_does_not_exist_in_BD.yml +46 -19
- data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_no_libraries_will_lend.yml +275 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_locally_available_item.yml +47 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/requestable_for_requestable_item.yml +66 -18
- data/test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml +66 -18
- data/test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml +47 -22
- data/test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml +47 -22
- data/test/vcr_cassettes/Request/authentication_id/manually_set_one_will_be_used_without_fetch.yml +40 -0
- data/test/vcr_cassettes/Request/authentication_id/starts_out_nil.yml +40 -0
- data/test/vcr_cassettes/Request/authentication_id/takes_with_auth_id.yml +40 -0
- data/test/vcr_cassettes/Request/can_make_a_succesful_request_with_AID.yml +97 -0
- data/test/vcr_cassettes/Request/gets_BD_error_info.yml +49 -12
- data/test/vcr_cassettes/Request/gets_BD_error_info_from_a_bad_AID.yml +77 -0
- data/test/vcr_cassettes/Request/raises_exception_on_timeout_live.yml +40 -0
- data/test/vcr_cassettes/Request/raises_on_bad_path.yml +61 -24
- data/test/vcr_cassettes/Request/raises_on_bad_request_hash.yml +50 -35
- data/test/vcr_cassettes/Request/uses_timeout_for_HttpClient.yml +40 -0
- data/test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml +47 -10
- data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml +21 -33
- data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml +20 -32
- data/test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml +21 -33
- data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI003.yml +77 -0
- data/test/vcr_cassettes/RequestItem/make_request/sets_an_auth_id.yml +77 -0
- data/test/vcr_cassettes/RequestItem/make_request_/raises_for_unrequestable.yml +21 -33
- data/test/vcr_cassettes/RequestItem/make_request_/returns_number_for_succesful_request.yml +20 -32
- data/test/vcr_cassettes/RequestItem/raises_proper_error_on_bad_AID.yml +40 -0
- data/test/vcr_cassettes/RequestItem/raw_RequestItem_sanity_check.yml +134 -0
- data/test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml +21 -33
- data/test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml +20 -32
- data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_String_pickup_location.yml +78 -0
- data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_structured_PickupLocation.yml +77 -0
- data/test/vcr_cassettes/RequestQuery/raises_proper_error_on_bad_AID.yml +40 -0
- data/test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml +117 -325
- data/test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml +30 -325
- data/test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml +117 -328
- data/test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml +148 -425
- metadata +67 -38
- data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml +0 -52
- data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml +0 -40
- data/test/vcr_cassettes/Request/can_make_a_succesful_request.yml +0 -49
- data/test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml +0 -91
- data/test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml +0 -89
- data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml +0 -89
- data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml +0 -90
- data/test/vcr_cassettes/top_level_describe/an_inner_describe/.yml +0 -76
@@ -2,17 +2,17 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://rc.relais-host.com/portal-service/user/authentication
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"ApiKey":"DUMMY_BD_API_KEY","PartnershipId":"BD","UserGroup":"patron","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- ruby borrow_direct gem
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
12
|
Accept:
|
13
|
-
-
|
13
|
+
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Thu, 15 Oct 2015 15:13:21 GMT
|
16
16
|
Content-Type:
|
17
17
|
- application/json
|
18
18
|
Accept-Language:
|
@@ -25,7 +25,44 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- nginx/1.4.1
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Thu, 15 Oct 2015 15:13:23 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '269'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"AuthorizationId":"EcdEhnRgoc5-7UypLM7Z_lL3syU","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:13:23 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=EcdEhnRgoc5-7UypLM7Z_lL3syU
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Thu, 15 Oct 2015 15:13:23 GMT
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Accept-Language:
|
56
|
+
- en
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx/1.4.1
|
64
|
+
Date:
|
65
|
+
- Thu, 15 Oct 2015 15:13:26 GMT
|
29
66
|
Content-Type:
|
30
67
|
- application/json;charset=UTF-8
|
31
68
|
Transfer-Encoding:
|
@@ -33,17 +70,28 @@ http_interactions:
|
|
33
70
|
Connection:
|
34
71
|
- keep-alive
|
35
72
|
body:
|
36
|
-
encoding:
|
37
|
-
string:
|
38
|
-
this item"},"
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"Available":true,"SearchTerm":"isbn=9810743734","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
|
75
|
+
this item"},"PickupLocation":[{"PickupLocationCode":"E","PickupLocationDescription":"*Milton
|
76
|
+
S. Eisenhower Library"},{"PickupLocationCode":"A","PickupLocationDescription":"Arthur
|
77
|
+
Friedheim Library"},{"PickupLocationCode":"B","PickupLocationDescription":"Columbia
|
78
|
+
Center"},{"PickupLocationCode":"C","PickupLocationDescription":"Harbor East"},{"PickupLocationCode":"D","PickupLocationDescription":"Montgomery
|
79
|
+
Library Resource Center"},{"PickupLocationCode":"F","PickupLocationDescription":"JHU
|
80
|
+
Homewood Office (faculty and grad students)"},{"PickupLocationCode":"G","PickupLocationDescription":"Washington
|
81
|
+
Library Resource Center"},{"PickupLocationCode":"H","PickupLocationDescription":"APL
|
82
|
+
- EP STUDENTS - Ed Center"},{"PickupLocationCode":"I","PickupLocationDescription":"APL
|
83
|
+
STAFF - Room 5-17"},{"PickupLocationCode":"J","PickupLocationDescription":"SAIS
|
84
|
+
Library"},{"PickupLocationCode":"K","PickupLocationDescription":"Harrison
|
85
|
+
Medical Library-Bayview"},{"PickupLocationCode":"L","PickupLocationDescription":"Institute
|
86
|
+
of the History of Medicine"},{"PickupLocationCode":"M","PickupLocationDescription":"JHMI
|
87
|
+
Pickup - Hampton House 9th floor"},{"PickupLocationCode":"N","PickupLocationDescription":"JHMI
|
88
|
+
Pickup - BSPH E4643"},{"PickupLocationCode":"O","PickupLocationDescription":"JHMI
|
89
|
+
Pickup - School of Nursing 313"},{"PickupLocationCode":"P","PickupLocationDescription":"JH
|
90
|
+
Medical Campus Office (faculty and staff)"},{"PickupLocationCode":"Q","PickupLocationDescription":"JHMI
|
91
|
+
Pickup - Armstrong 306"},{"PickupLocationCode":"R","PickupLocationDescription":"JHMI
|
92
|
+
Pickup - PCTB 115-116"},{"PickupLocationCode":"S","PickupLocationDescription":"Welch
|
93
|
+
Medical Library"},{"PickupLocationCode":"T","PickupLocationDescription":"Wilmer
|
94
|
+
Friedenwald Library"}]}'
|
47
95
|
http_version:
|
48
|
-
recorded_at:
|
96
|
+
recorded_at: Thu, 15 Oct 2015 15:13:26 GMT
|
49
97
|
recorded_with: VCR 2.9.3
|
data/test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://rc.relais-host.com/portal-service/user/authentication
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"ApiKey":"DUMMY_BD_API_KEY","PartnershipId":"BD","UserGroup":"patron","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- ruby borrow_direct gem
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
12
|
Accept:
|
13
|
-
-
|
13
|
+
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Thu, 15 Oct 2015 15:13:31 GMT
|
16
16
|
Content-Type:
|
17
17
|
- application/json
|
18
18
|
Accept-Language:
|
@@ -25,7 +25,44 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- nginx/1.4.1
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Thu, 15 Oct 2015 15:13:32 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '269'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"AuthorizationId":"-DQx-u7rwsULKWUiXjunCVDQWh4","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:13:32 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=-DQx-u7rwsULKWUiXjunCVDQWh4
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"NO_SUCH_THING"}]}'
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Thu, 15 Oct 2015 15:13:32 GMT
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Accept-Language:
|
56
|
+
- en
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx/1.4.1
|
64
|
+
Date:
|
65
|
+
- Thu, 15 Oct 2015 15:13:53 GMT
|
29
66
|
Content-Type:
|
30
67
|
- application/json;charset=UTF-8
|
31
68
|
Transfer-Encoding:
|
@@ -33,18 +70,28 @@ http_interactions:
|
|
33
70
|
Connection:
|
34
71
|
- keep-alive
|
35
72
|
body:
|
36
|
-
encoding:
|
37
|
-
string:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
Center","Harbor East","
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"Available":true,"SearchTerm":"isbn=NO_SUCH_THING","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
|
75
|
+
this item"},"PickupLocation":[{"PickupLocationCode":"E","PickupLocationDescription":"*Milton
|
76
|
+
S. Eisenhower Library"},{"PickupLocationCode":"A","PickupLocationDescription":"Arthur
|
77
|
+
Friedheim Library"},{"PickupLocationCode":"B","PickupLocationDescription":"Columbia
|
78
|
+
Center"},{"PickupLocationCode":"C","PickupLocationDescription":"Harbor East"},{"PickupLocationCode":"D","PickupLocationDescription":"Montgomery
|
79
|
+
Library Resource Center"},{"PickupLocationCode":"F","PickupLocationDescription":"JHU
|
80
|
+
Homewood Office (faculty and grad students)"},{"PickupLocationCode":"G","PickupLocationDescription":"Washington
|
81
|
+
Library Resource Center"},{"PickupLocationCode":"H","PickupLocationDescription":"APL
|
82
|
+
- EP STUDENTS - Ed Center"},{"PickupLocationCode":"I","PickupLocationDescription":"APL
|
83
|
+
STAFF - Room 5-17"},{"PickupLocationCode":"J","PickupLocationDescription":"SAIS
|
84
|
+
Library"},{"PickupLocationCode":"K","PickupLocationDescription":"Harrison
|
85
|
+
Medical Library-Bayview"},{"PickupLocationCode":"L","PickupLocationDescription":"Institute
|
86
|
+
of the History of Medicine"},{"PickupLocationCode":"M","PickupLocationDescription":"JHMI
|
87
|
+
Pickup - Hampton House 9th floor"},{"PickupLocationCode":"N","PickupLocationDescription":"JHMI
|
88
|
+
Pickup - BSPH E4643"},{"PickupLocationCode":"O","PickupLocationDescription":"JHMI
|
89
|
+
Pickup - School of Nursing 313"},{"PickupLocationCode":"P","PickupLocationDescription":"JH
|
90
|
+
Medical Campus Office (faculty and staff)"},{"PickupLocationCode":"Q","PickupLocationDescription":"JHMI
|
91
|
+
Pickup - Armstrong 306"},{"PickupLocationCode":"R","PickupLocationDescription":"JHMI
|
92
|
+
Pickup - PCTB 115-116"},{"PickupLocationCode":"S","PickupLocationDescription":"Welch
|
93
|
+
Medical Library"},{"PickupLocationCode":"T","PickupLocationDescription":"Wilmer
|
94
|
+
Friedenwald Library"}]}'
|
48
95
|
http_version:
|
49
|
-
recorded_at:
|
96
|
+
recorded_at: Thu, 15 Oct 2015 15:13:53 GMT
|
50
97
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=bad_expired_aid
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Thu, 15 Oct 2015 15:13:53 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Accept-Language:
|
19
|
+
- en
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 401
|
23
|
+
message: Unauthorized
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.4.1
|
27
|
+
Date:
|
28
|
+
- Thu, 15 Oct 2015 15:13:53 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"Problem":{"ErrorCode":"PUBFI003","ErrorMessage":"Invalid aid"}}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:13:53 GMT
|
40
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://rc.relais-host.com/portal-service/user/authentication
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"ApiKey":"DUMMY_BD_API_KEY","PartnershipId":"BD","UserGroup":"patron","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
Date:
|
15
|
+
- Thu, 15 Oct 2015 15:13:26 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Accept-Language:
|
19
|
+
- en
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.4.1
|
27
|
+
Date:
|
28
|
+
- Thu, 15 Oct 2015 15:13:28 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '269'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"AuthorizationId":"zqtFPEoM2u4Pq3qSnbqXmvqE_xs","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:13:28 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=zqtFPEoM2u4Pq3qSnbqXmvqE_xs
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Thu, 15 Oct 2015 15:13:28 GMT
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Accept-Language:
|
56
|
+
- en
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx/1.4.1
|
64
|
+
Date:
|
65
|
+
- Thu, 15 Oct 2015 15:13:31 GMT
|
66
|
+
Content-Type:
|
67
|
+
- application/json;charset=UTF-8
|
68
|
+
Transfer-Encoding:
|
69
|
+
- chunked
|
70
|
+
Connection:
|
71
|
+
- keep-alive
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"Available":true,"SearchTerm":"isbn=9810743734","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
|
75
|
+
this item"},"PickupLocation":[{"PickupLocationCode":"E","PickupLocationDescription":"*Milton
|
76
|
+
S. Eisenhower Library"},{"PickupLocationCode":"A","PickupLocationDescription":"Arthur
|
77
|
+
Friedheim Library"},{"PickupLocationCode":"B","PickupLocationDescription":"Columbia
|
78
|
+
Center"},{"PickupLocationCode":"C","PickupLocationDescription":"Harbor East"},{"PickupLocationCode":"D","PickupLocationDescription":"Montgomery
|
79
|
+
Library Resource Center"},{"PickupLocationCode":"F","PickupLocationDescription":"JHU
|
80
|
+
Homewood Office (faculty and grad students)"},{"PickupLocationCode":"G","PickupLocationDescription":"Washington
|
81
|
+
Library Resource Center"},{"PickupLocationCode":"H","PickupLocationDescription":"APL
|
82
|
+
- EP STUDENTS - Ed Center"},{"PickupLocationCode":"I","PickupLocationDescription":"APL
|
83
|
+
STAFF - Room 5-17"},{"PickupLocationCode":"J","PickupLocationDescription":"SAIS
|
84
|
+
Library"},{"PickupLocationCode":"K","PickupLocationDescription":"Harrison
|
85
|
+
Medical Library-Bayview"},{"PickupLocationCode":"L","PickupLocationDescription":"Institute
|
86
|
+
of the History of Medicine"},{"PickupLocationCode":"M","PickupLocationDescription":"JHMI
|
87
|
+
Pickup - Hampton House 9th floor"},{"PickupLocationCode":"N","PickupLocationDescription":"JHMI
|
88
|
+
Pickup - BSPH E4643"},{"PickupLocationCode":"O","PickupLocationDescription":"JHMI
|
89
|
+
Pickup - School of Nursing 313"},{"PickupLocationCode":"P","PickupLocationDescription":"JH
|
90
|
+
Medical Campus Office (faculty and staff)"},{"PickupLocationCode":"Q","PickupLocationDescription":"JHMI
|
91
|
+
Pickup - Armstrong 306"},{"PickupLocationCode":"R","PickupLocationDescription":"JHMI
|
92
|
+
Pickup - PCTB 115-116"},{"PickupLocationCode":"S","PickupLocationDescription":"Welch
|
93
|
+
Medical Library"},{"PickupLocationCode":"T","PickupLocationDescription":"Wilmer
|
94
|
+
Friedenwald Library"}]}'
|
95
|
+
http_version:
|
96
|
+
recorded_at: Thu, 15 Oct 2015 15:13:31 GMT
|
97
|
+
recorded_with: VCR 2.9.3
|
data/test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml
CHANGED
@@ -2,17 +2,54 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://rc.relais-host.com/portal-service/user/authentication
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"ApiKey":"DUMMY_BD_API_KEY","PartnershipId":"BD","UserGroup":"patron","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- ruby borrow_direct gem
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
12
|
Accept:
|
13
|
-
-
|
13
|
+
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Thu, 15 Oct 2015 15:15:43 GMT
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Accept-Language:
|
19
|
+
- en
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- nginx/1.4.1
|
27
|
+
Date:
|
28
|
+
- Thu, 15 Oct 2015 15:15:44 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '269'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"AuthorizationId":"50ssYkBTTetGViuSr38-JvU8gC4","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:15:44 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=50ssYkBTTetGViuSr38-JvU8gC4
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Thu, 15 Oct 2015 15:15:44 GMT
|
16
53
|
Content-Type:
|
17
54
|
- application/json
|
18
55
|
Accept-Language:
|
@@ -25,7 +62,7 @@ http_interactions:
|
|
25
62
|
Server:
|
26
63
|
- nginx/1.4.1
|
27
64
|
Date:
|
28
|
-
-
|
65
|
+
- Thu, 15 Oct 2015 15:15:47 GMT
|
29
66
|
Content-Type:
|
30
67
|
- application/json;charset=UTF-8
|
31
68
|
Transfer-Encoding:
|
@@ -33,8 +70,8 @@ http_interactions:
|
|
33
70
|
Connection:
|
34
71
|
- keep-alive
|
35
72
|
body:
|
36
|
-
encoding:
|
37
|
-
string:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"Problem":{"ErrorCode":"PUBFI002","ErrorMessage":"No result"}}'
|
38
75
|
http_version:
|
39
|
-
recorded_at:
|
76
|
+
recorded_at: Thu, 15 Oct 2015 15:15:47 GMT
|
40
77
|
recorded_with: VCR 2.9.3
|
@@ -2,17 +2,17 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://rc.relais-host.com/portal-service/user/authentication
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"ApiKey":"DUMMY_BD_API_KEY","PartnershipId":"BD","UserGroup":"patron","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}'
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- ruby borrow_direct gem
|
11
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
12
12
|
Accept:
|
13
|
-
-
|
13
|
+
- "*/*"
|
14
14
|
Date:
|
15
|
-
-
|
15
|
+
- Thu, 15 Oct 2015 15:13:13 GMT
|
16
16
|
Content-Type:
|
17
17
|
- application/json
|
18
18
|
Accept-Language:
|
@@ -25,7 +25,44 @@ http_interactions:
|
|
25
25
|
Server:
|
26
26
|
- nginx/1.4.1
|
27
27
|
Date:
|
28
|
-
-
|
28
|
+
- Thu, 15 Oct 2015 15:13:14 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json;charset=UTF-8
|
31
|
+
Content-Length:
|
32
|
+
- '269'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"AuthorizationId":"NA-6E7xpODh5CH0bOMVYSsStM7o","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Thu, 15 Oct 2015 15:13:14 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://rc.relais-host.com/dws/item/available?aid=NA-6E7xpODh5CH0bOMVYSsStM7o
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"PartnershipId":"BD","ExactSearch":[{"Type":"ISBN","Value":"9810743734"},{"Type":"ISBN","Value":"0745649890"}]}'
|
46
|
+
headers:
|
47
|
+
User-Agent:
|
48
|
+
- ruby borrow_direct gem 1.2.0 (HTTPClient 2.6.0.1) https://github.com/jrochkind/borrow_direct
|
49
|
+
Accept:
|
50
|
+
- "*/*"
|
51
|
+
Date:
|
52
|
+
- Thu, 15 Oct 2015 15:13:14 GMT
|
53
|
+
Content-Type:
|
54
|
+
- application/json
|
55
|
+
Accept-Language:
|
56
|
+
- en
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Server:
|
63
|
+
- nginx/1.4.1
|
64
|
+
Date:
|
65
|
+
- Thu, 15 Oct 2015 15:13:21 GMT
|
29
66
|
Content-Type:
|
30
67
|
- application/json;charset=UTF-8
|
31
68
|
Transfer-Encoding:
|
@@ -33,17 +70,28 @@ http_interactions:
|
|
33
70
|
Connection:
|
34
71
|
- keep-alive
|
35
72
|
body:
|
36
|
-
encoding:
|
37
|
-
string:
|
38
|
-
this item"},"
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"Available":true,"SearchTerm":"isbn=9810743734 or isbn=0745649890","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
|
75
|
+
this item"},"PickupLocation":[{"PickupLocationCode":"E","PickupLocationDescription":"*Milton
|
76
|
+
S. Eisenhower Library"},{"PickupLocationCode":"A","PickupLocationDescription":"Arthur
|
77
|
+
Friedheim Library"},{"PickupLocationCode":"B","PickupLocationDescription":"Columbia
|
78
|
+
Center"},{"PickupLocationCode":"C","PickupLocationDescription":"Harbor East"},{"PickupLocationCode":"D","PickupLocationDescription":"Montgomery
|
79
|
+
Library Resource Center"},{"PickupLocationCode":"F","PickupLocationDescription":"JHU
|
80
|
+
Homewood Office (faculty and grad students)"},{"PickupLocationCode":"G","PickupLocationDescription":"Washington
|
81
|
+
Library Resource Center"},{"PickupLocationCode":"H","PickupLocationDescription":"APL
|
82
|
+
- EP STUDENTS - Ed Center"},{"PickupLocationCode":"I","PickupLocationDescription":"APL
|
83
|
+
STAFF - Room 5-17"},{"PickupLocationCode":"J","PickupLocationDescription":"SAIS
|
84
|
+
Library"},{"PickupLocationCode":"K","PickupLocationDescription":"Harrison
|
85
|
+
Medical Library-Bayview"},{"PickupLocationCode":"L","PickupLocationDescription":"Institute
|
86
|
+
of the History of Medicine"},{"PickupLocationCode":"M","PickupLocationDescription":"JHMI
|
87
|
+
Pickup - Hampton House 9th floor"},{"PickupLocationCode":"N","PickupLocationDescription":"JHMI
|
88
|
+
Pickup - BSPH E4643"},{"PickupLocationCode":"O","PickupLocationDescription":"JHMI
|
89
|
+
Pickup - School of Nursing 313"},{"PickupLocationCode":"P","PickupLocationDescription":"JH
|
90
|
+
Medical Campus Office (faculty and staff)"},{"PickupLocationCode":"Q","PickupLocationDescription":"JHMI
|
91
|
+
Pickup - Armstrong 306"},{"PickupLocationCode":"R","PickupLocationDescription":"JHMI
|
92
|
+
Pickup - PCTB 115-116"},{"PickupLocationCode":"S","PickupLocationDescription":"Welch
|
93
|
+
Medical Library"},{"PickupLocationCode":"T","PickupLocationDescription":"Wilmer
|
94
|
+
Friedenwald Library"}]}'
|
47
95
|
http_version:
|
48
|
-
recorded_at:
|
96
|
+
recorded_at: Thu, 15 Oct 2015 15:13:21 GMT
|
49
97
|
recorded_with: VCR 2.9.3
|