borrow_direct 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +183 -0
  6. data/Rakefile +11 -0
  7. data/bd_metrics/finditem_measure.rb +61 -0
  8. data/bd_metrics/isbn.txt +1088 -0
  9. data/bd_metrics/lccn.txt +1668 -0
  10. data/bd_metrics/oclc.txt +167 -0
  11. data/borrow_direct.gemspec +30 -0
  12. data/lib/borrow_direct/authentication.rb +55 -0
  13. data/lib/borrow_direct/defaults.rb +38 -0
  14. data/lib/borrow_direct/error.rb +17 -0
  15. data/lib/borrow_direct/find_item.rb +149 -0
  16. data/lib/borrow_direct/generate_query.rb +78 -0
  17. data/lib/borrow_direct/request.rb +185 -0
  18. data/lib/borrow_direct/request_item.rb +119 -0
  19. data/lib/borrow_direct/request_query.rb +124 -0
  20. data/lib/borrow_direct/util.rb +18 -0
  21. data/lib/borrow_direct/version.rb +3 -0
  22. data/lib/borrow_direct.rb +19 -0
  23. data/test/authentication_test.rb +79 -0
  24. data/test/find_item_test.rb +159 -0
  25. data/test/generate_query_test.rb +91 -0
  26. data/test/request_item_test.rb +109 -0
  27. data/test/request_query_test.rb +113 -0
  28. data/test/request_test.rb +141 -0
  29. data/test/support/assertions.rb +23 -0
  30. data/test/support/vcr_filter.rb +45 -0
  31. data/test/test_helper.rb +39 -0
  32. data/test/util_test.rb +32 -0
  33. data/test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml +52 -0
  34. data/test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml +52 -0
  35. data/test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml +53 -0
  36. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml +52 -0
  37. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml +53 -0
  38. data/test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml +52 -0
  39. data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml +52 -0
  40. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml +49 -0
  41. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml +49 -0
  42. data/test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml +50 -0
  43. data/test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml +40 -0
  44. data/test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml +49 -0
  45. data/test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml +49 -0
  46. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml +40 -0
  47. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml +40 -0
  48. data/test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml +49 -0
  49. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_BD_returns_PUBFI002.yml +40 -0
  50. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_does_not_exist_in_BD.yml +50 -0
  51. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_no_libraries_will_lend.yml +50 -0
  52. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_locally_available_item.yml +49 -0
  53. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_for_requestable_item.yml +49 -0
  54. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml +49 -0
  55. data/test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml +52 -0
  56. data/test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml +52 -0
  57. data/test/vcr_cassettes/Request/can_make_a_succesful_request.yml +49 -0
  58. data/test/vcr_cassettes/Request/gets_BD_error_info.yml +41 -0
  59. data/test/vcr_cassettes/Request/raises_on_bad_path.yml +53 -0
  60. data/test/vcr_cassettes/Request/raises_on_bad_request_hash.yml +63 -0
  61. data/test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml +41 -0
  62. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml +90 -0
  63. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml +89 -0
  64. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml +91 -0
  65. data/test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml +91 -0
  66. data/test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml +89 -0
  67. data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml +89 -0
  68. data/test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml +91 -0
  69. data/test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml +89 -0
  70. data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml +90 -0
  71. data/test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml +381 -0
  72. data/test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml +381 -0
  73. data/test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml +384 -0
  74. data/test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml +481 -0
  75. data/test/vcr_cassettes/top_level_describe/an_inner_describe/.yml +76 -0
  76. metadata +262 -0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"},{"Type":"ISBN","Value":"0745649890"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:16 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
+ - Tue, 21 Oct 2014 17:06:18 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734 or isbn=0745649890","AuthorizationId":"zuCyss9gL_oND9MEkcVkKzyjEfw","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
+ this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:06:18 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:37 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
+ - Tue, 21 Oct 2014 17:06:39 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734","AuthorizationId":"aeP0laB8h0nfSzjJkU8I0yjtZAc","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
+ this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:06:39 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:34 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:06:37 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Error":{"ErrorNumber":"PUBFI002","ErrorMessage":"No result"}}'
38
+ http_version:
39
+ recorded_at: Tue, 21 Oct 2014 17:06:37 GMT
40
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:41 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:06:43 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Error":{"ErrorNumber":"PUBFI002","ErrorMessage":"No result"}}'
38
+ http_version:
39
+ recorded_at: Tue, 21 Oct 2014 17:06:43 GMT
40
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:44 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
+ - Tue, 21 Oct 2014 17:06:46 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734","AuthorizationId":"9MHVHgH9AbSojfpau0nDRWUjhek","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
+ this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:06:46 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:43 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:06:44 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Error":{"ErrorNumber":"PUBFI002","ErrorMessage":"No result"}}'
38
+ http_version:
39
+ recorded_at: Tue, 21 Oct 2014 17:06:44 GMT
40
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"NO_SUCH_THING"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:46 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
+ - Tue, 21 Oct 2014 17:06:58 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":false,"SearchTerm":"isbn=NO_SUCH_THING","AuthorizationId":"7gkJbwWAwB6zYb3JVvX0BQbPiKc","RequestLink":{"ButtonLink":"http://findit.library.jhu.edu/resolve?genre=book","ButtonLabel":"Request","RequestMessage":"Borrow
38
+ Direct cannot fill this request at this time. Please request through Interlibrary
39
+ Loan."},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
40
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
41
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
42
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
43
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
44
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
45
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
46
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
47
+ Medical Library","Wilmer Friedenwald Library"]}}}'
48
+ http_version:
49
+ recorded_at: Tue, 21 Oct 2014 17:06:58 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"1441190090"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:39 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
+ - Tue, 21 Oct 2014 17:06:41 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":false,"SearchTerm":"isbn=1441190090","AuthorizationId":"5vwRvyoSAhh7-mlzzbyD6KPHo9c","RequestLink":{"ButtonLink":"http://findit.library.jhu.edu/resolve?genre=book","ButtonLabel":"Request","RequestMessage":"Borrow
38
+ Direct cannot fill this request at this time. Please request through Interlibrary
39
+ Loan."},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
40
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
41
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
42
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
43
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
44
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
45
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
46
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
47
+ Medical Library","Wilmer Friedenwald Library"]}}}'
48
+ http_version:
49
+ recorded_at: Tue, 21 Oct 2014 17:06:41 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"0745649890"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:58 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
+ - Tue, 21 Oct 2014 17:07:00 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=0745649890","AuthorizationId":"ZRjcyvCAvMV7hbuXkUJmSjlGeQI","RequestLink":{"RequestMessage":"This
38
+ item is available locally"},"PickupLocations":{"PickupLocation":["*Milton
39
+ S. Eisenhower Library","APL - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur
40
+ Friedheim Library","Columbia Center","Harbor East","Harrison Medical Library-Bayview","Institute
41
+ of the History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:07:00 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:32 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
+ - Tue, 21 Oct 2014 17:06:34 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734","AuthorizationId":"6k7DO5-7e8a_vKqvhXus9fIxJ0c","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
+ this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:06:34 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/dws/item/available
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"},{"Type":"ISBN","Value":"NO_SUCH_ISBN"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:06:20 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
+ - Tue, 21 Oct 2014 17:06:32 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734 or isbn=NO_SUCH_ISBN","AuthorizationId":"fWb-ouqp7RERABCCXRe039543l4","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
+ this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
+ - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
+ Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
+ History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
+ Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
+ House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
+ 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
+ Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
+ Medical Library","Wilmer Friedenwald Library"]}}}'
47
+ http_version:
48
+ recorded_at: Tue, 21 Oct 2014 17:06:32 GMT
49
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:36 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
+ - Tue, 21 Oct 2014 17:05:38 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"Zbi7kyfXi5b0bkCYSFTKhcxEjLg","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:38 GMT
52
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:38 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
+ - Tue, 21 Oct 2014 17:05:39 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"BwckkvqF2ZdlDuCoXusKB1AuACc","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:39 GMT
52
+ recorded_with: VCR 2.9.3