swiftype-enterprise 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 13640af8a58d3cb8fef7071820c89d500080ffe6
4
- data.tar.gz: 73479440223ab3e6e351e5b22b070900ac773bec
2
+ SHA256:
3
+ metadata.gz: f4ca1438be2d0d405b2636dee9f8f3246a172363520954ab8f657cea15c437af
4
+ data.tar.gz: 993f393f196d9ebc0205f8ef25a322c5dbc0eca5d3bfc8d3382ef0c303c104f4
5
5
  SHA512:
6
- metadata.gz: 345e4c21103f21b409192b5244c2a91bbc00b8f9f83d326ff82f096fef09dc56857b659ab042e8763cd59b3e80fe592029966632671f573e7d45a8a1842658e4
7
- data.tar.gz: 6d68325da52b1c269835d875530f3ac87ce7755ddc162992b7a52cc57333b10745b791f8a286c79d1bad4e7f3f1d579fcbb58c6b77fb3af1174ce12293c53736
6
+ metadata.gz: 0a9b55da2d0ddd9fb92a28268561f0c645e16702b1c91ace38533d86a85835223e84b1b6f02fed4718402733d3345452fd12a01ccf5826a8bf83887d2693a73e
7
+ data.tar.gz: d61bc6a04940221f82ecb0f5d681c454554398f3a73cd362b0b2ba403795c5090f952c51b23fa0960fd9d290d2ad863035d8185e9bfd71b1a1f042efd6caa992
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Elastic Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,17 +1,31 @@
1
- # Ruby client for the Swiftype Enterprise Api
1
+ <p align="center"><img src="https://github.com/swiftype/swiftype-enterprise-ruby/blob/master/logo-enterprise-search.png?raw=true" alt="Elastic Enterprise Search Logo"></p>
2
2
 
3
- ## Installation
3
+ <a href="https://github.com/swiftype/swiftype-enterprise-ruby/releases"><img src="https://img.shields.io/github/release/swiftype/swiftype-enterprise-ruby/all.svg?style=flat-square" alt="GitHub release" /></a></p>
4
+
5
+ > A first-party Ruby client for [Elastic Enterprise Search](https://www.elastic.co/solutions/enterprise-search).
6
+
7
+ ## Contents
8
+
9
+ + [Getting started](#getting-started-)
10
+ + [Usage](#usage)
11
+ + [FAQ](#faq-)
12
+ + [Contribute](#contribute-)
13
+ + [License](#license-)
14
+
15
+ ***
16
+
17
+ ## Getting started 🐣
4
18
 
5
19
  To install the gem, execute:
6
20
 
7
- gem install swiftype-enterprise
21
+ ```bash
22
+ gem install swiftype-enterprise
23
+ ```
8
24
 
9
25
  Or place `gem 'swiftype-enterprise', '~> 1.0.0` in your `Gemfile` and run `bundle install`.
10
26
 
11
27
  ## Usage
12
28
 
13
- ### Setup
14
-
15
29
  Create a new instance of the Swiftype Enterprise Client with your access token:
16
30
 
17
31
  SwiftypeEnterprise.access_token = '' # your access token
@@ -19,20 +33,18 @@ Create a new instance of the Swiftype Enterprise Client with your access token:
19
33
 
20
34
  ### Indexing Documents
21
35
 
22
- This example shows how to use the index_documents method, which blocks until all documents have either completed or failed indexing.
23
- If not all of the documents have completed or failed indexing within 10 seconds, an Error is raised.
24
- See the async_index_documents method below for an example on how to index documents without blocking.
36
+ This example shows how to use the index_documents method:
25
37
 
26
- content_source_key = '' // your content source key
38
+ content_source_key = '' # your content source key
27
39
  documents = [
28
40
  {
29
- 'external_id'=>'INscMGmhmX4',
41
+ 'external_id' => 'INscMGmhmX4',
30
42
  'url' => 'http://www.youtube.com/watch?v=v1uyQZNg2vE',
31
43
  'title' => 'The Original Grumpy Cat',
32
44
  'body' => 'this is a test'
33
45
  },
34
46
  {
35
- 'external_id'=>'JNDFojsd02',
47
+ 'external_id' => 'JNDFojsd02',
36
48
  'url' => 'http://www.youtube.com/watch?v=tsdfhk2j',
37
49
  'title' => 'Another Grumpy Cat',
38
50
  'body' => 'this is also a test'
@@ -41,14 +53,14 @@ See the async_index_documents method below for an example on how to index docume
41
53
 
42
54
  begin
43
55
  document_receipts = swiftype.index_documents(content_source_key, documents)
44
- # handle document receipts
56
+ # handle results
45
57
  rescue SwiftypeEnterprise::ClientException => e
46
58
  # handle error
47
59
  end
48
60
 
49
61
  ### Destroying Documents
50
62
 
51
- content_source_key = '' // your content source key
63
+ content_source_key = '' # your content source key
52
64
  document_external_ids = ['INscMGmhmX4', 'JNDFojsd02']
53
65
 
54
66
  begin
@@ -58,54 +70,29 @@ See the async_index_documents method below for an example on how to index docume
58
70
  # handle error
59
71
  end
60
72
 
61
- ### Asynchronous Indexing
62
-
63
- This example shows how to index documents without blocking.
64
- When using this method, you are responsible for checking the indexing result for each document by using the document_receipts method below.
65
-
66
- content_source_key = '' // your content source key
67
- documents = [
68
- {
69
- 'external_id'=>'INscMGmhmX4',
70
- 'url' => 'http://www.youtube.com/watch?v=v1uyQZNg2vE',
71
- 'title' => 'The Original Grumpy Cat',
72
- 'body' => 'this is a test'
73
- },
74
- {
75
- 'external_id'=>'JNDFojsd02',
76
- 'url' => 'http://www.youtube.com/watch?v=tsdfhk2j',
77
- 'title' => 'Another Grumpy Cat',
78
- 'body' => 'this is also a test'
79
- }
80
- ]
73
+ ## Running tests
81
74
 
82
- begin
83
- document_receipt_ids = swiftype.async_index_documents(content_source_key, documents)
84
- # handle document receipt IDs
85
- rescue SwiftypeEnterprise::ClientException => e
86
- # handle error
87
- end
75
+ Run tests via rspec:
88
76
 
77
+ ```bash
78
+ $ ENDPOINT=http://localhost:3002/api/v1 bundle exec rspec
79
+ ```
89
80
 
90
- ### Checking Document Receipts
81
+ ## FAQ 🔮
91
82
 
92
- Works in conjunction with the asyncIndexDocuments method above.
83
+ ### Where do I report issues with the client?
93
84
 
94
- content_source_key = '' // your content source key
95
- document_receipt_ids = ['5955d6fafd28400169baf97e', '5955d6fafd28400169baf980'] // from calling async_index_documents
85
+ If something is not working as expected, please open an [issue](https://github.com/swiftype/swiftype-enterprise-ruby/issues/new).
96
86
 
97
- begin
98
- document_receipts = swiftype.document_receipts(document_receipt_ids)
99
- # handle document receipts
100
- rescue SwiftypeEnterprise::ClientException => e
101
- # handle error
102
- end
87
+ ## Contribute 🚀
103
88
 
89
+ We welcome contributors to the project. Before you begin, a couple notes...
104
90
 
105
- ## Running Tests
91
+ + Before opening a pull request, please create an issue to [discuss the scope of your proposal](https://github.com/swiftype/swiftype-enterprise-ruby/issues).
92
+ + Please write simple code and concise documentation, when appropriate.
106
93
 
107
- rspec
94
+ ## License 📗
108
95
 
109
- ## Contributions
96
+ [MIT](https://github.com/swiftype/swiftype-enterprise-ruby/blob/master/LICENSE) © [Elastic](https://github.com/elastic)
110
97
 
111
- To contribute code to this gem, please fork the repository and submit a pull request.
98
+ Thank you to all the [contributors](https://github.com/swiftype/swiftype-enterprise-ruby/graphs/contributors)!
@@ -21,7 +21,7 @@ module SwiftypeEnterprise
21
21
  # @option options [Numeric] :overall_timeout overall timeout for requests in seconds (default: 15s)
22
22
  # @option options [Numeric] :open_timeout the number of seconds Net::HTTP (default: 15s)
23
23
  # will wait while opening a connection before raising a Timeout::Error
24
- def initialize(options={})
24
+ def initialize(options = {})
25
25
  @options = options
26
26
  end
27
27
 
@@ -54,52 +54,19 @@ module SwiftypeEnterprise
54
54
  ].map!(&:freeze).to_set.freeze
55
55
  CORE_TOP_LEVEL_KEYS = (REQUIRED_TOP_LEVEL_KEYS + OPTIONAL_TOP_LEVEL_KEYS).freeze
56
56
 
57
- # Retrieve Document Receipts from the API by ID for the {asynchronous API}[https://app.swiftype.com/ent/docs/custom_sources]
58
- #
59
- # @param [Array<String>] receipt_ids an Array of Document Receipt IDs
60
- #
61
- # @return [Array<Hash>] an Array of Document Receipt hashes
62
- def document_receipts(receipt_ids)
63
- get('ent/document_receipts/bulk_show.json', :ids => receipt_ids.join(','))
64
- end
65
-
66
- # Index a batch of documents synchronously using the {Content Source API}[https://app.swiftype.com/ent/docs/custom_sources].
57
+ # Index a batch of documents using the {Content Source API}[https://app.swiftype.com/ent/docs/custom_sources].
67
58
  #
68
59
  # @param [String] content_source_key the unique Content Source key as found in your Content Sources dashboard
69
60
  # @param [Array] documents an Array of Document Hashes
70
- # @option options [Numeric] :timeout (10) Number of seconds to wait before raising an exception
71
61
  #
72
- # @return [Array<Hash>] an Array of processed Document Receipt hashes
62
+ # @return [Array<Hash>] an Array of Document indexing Results
73
63
  #
74
64
  # @raise [SwiftypeEnterprise::InvalidDocument] when a single document is missing required fields or contains unsupported fields
75
- # @raise [Timeout::Error] when timeout expires waiting for receipts
76
- def index_documents(content_source_key, documents, options = {})
65
+ # @raise [Timeout::Error] when timeout expires waiting for results
66
+ def index_documents(content_source_key, documents)
77
67
  documents = Array(documents).map! { |document| validate_and_normalize_document(document) }
78
68
 
79
- res = async_create_or_update_documents(content_source_key, documents)
80
- receipt_ids = res['document_receipts'].map { |a| a['id'] }
81
-
82
- poll(options) do
83
- receipts = document_receipts(receipt_ids)
84
- flag = receipts.all? { |a| a['status'] != 'pending' }
85
- flag ? receipts : false
86
- end
87
- end
88
-
89
- # Index a batch of documents asynchronously using the {Content Source API}[https://app.swiftype.com/ent/docs/custom_sources].
90
- #
91
- # @param [String] content_source_key the unique Content Source key as found in your Content Sources dashboard
92
- # @param [Array] documents an Array of Document Hashes
93
- # @param [Hash] options additional options
94
- #
95
- # @return [Array<String>] an Array of Document Receipt IDs pending completion
96
- #
97
- # @raise [SwiftypeEnterprise::InvalidDocument] when a single document is missing required fields or contains unsupported fields
98
- def async_index_documents(content_source_key, documents, options = {})
99
- documents = Array(documents).map! { |document| validate_and_normalize_document(document) }
100
-
101
- res = async_create_or_update_documents(content_source_key, documents)
102
- res['document_receipts'].map { |a| a['id'] }
69
+ async_create_or_update_documents(content_source_key, documents)
103
70
  end
104
71
 
105
72
  # Destroy a batch of documents given a list of external IDs
@@ -107,12 +74,15 @@ module SwiftypeEnterprise
107
74
  # @param [Array<String>] document_ids an Array of Document External IDs
108
75
  #
109
76
  # @return [Array<Hash>] an Array of Document destroy result hashes
77
+ #
78
+ # @raise [Timeout::Error] when timeout expires waiting for results
110
79
  def destroy_documents(content_source_key, document_ids)
111
80
  document_ids = Array(document_ids)
112
81
  post("ent/sources/#{content_source_key}/documents/bulk_destroy.json", document_ids)
113
82
  end
114
83
 
115
84
  private
85
+
116
86
  def async_create_or_update_documents(content_source_key, documents)
117
87
  post("ent/sources/#{content_source_key}/documents/bulk_create.json", documents)
118
88
  end
@@ -21,29 +21,6 @@ module SwiftypeEnterprise
21
21
  request(:delete, path, params)
22
22
  end
23
23
 
24
- # Poll a block with backoff until a timeout is reached.
25
- #
26
- # @param [Hash] options optional arguments
27
- # @option options [Numeric] :timeout (10) Number of seconds to wait before timing out
28
- #
29
- # @yieldreturn a truthy value to return from poll
30
- # @yieldreturn [false] to continue polling.
31
- #
32
- # @return the truthy value returned from the block.
33
- #
34
- # @raise [Timeout::Error] when the timeout expires
35
- def poll(options={})
36
- timeout = options[:timeout] || 10
37
- delay = 0.05
38
- Timeout.timeout(timeout) do
39
- while true
40
- res = yield
41
- return res if res
42
- sleep delay *= 2
43
- end
44
- end
45
- end
46
-
47
24
  # Construct and send a request to the API.
48
25
  #
49
26
  # @raise [Timeout::Error] when the timeout expires
@@ -1,3 +1,3 @@
1
1
  module SwiftypeEnterprise
2
- VERSION = '1.0.1'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -30,70 +30,11 @@ describe SwiftypeEnterprise::Client do
30
30
  'body' => 'this is also a test'}]
31
31
  end
32
32
 
33
- context '#document_receipts' do
34
- before :each do
35
- def get_receipt_ids
36
- receipt_ids = nil
37
- VCR.use_cassette(:async_create_or_update_document_success) do
38
- receipt_ids = client.async_index_documents(content_source_key, documents)
39
- end
40
- receipt_ids
41
- end
42
- end
43
-
44
- it 'returns array of hashes one for each receipt' do
45
- VCR.use_cassette(:document_receipts_multiple) do
46
- receipt_ids = get_receipt_ids
47
- response = client.document_receipts(receipt_ids)
48
- expect(response.size).to eq(2)
49
- expect(response.first.keys).to match_array(["id", "external_id", "links", "status", "errors"])
50
- end
51
- end
52
- end
53
-
54
33
  context '#index_documents' do
55
- it 'returns document_receipts when successful' do
56
- VCR.use_cassette(:async_create_or_update_document_success) do
57
- VCR.use_cassette(:document_receipts_multiple_complete) do
58
- response = client.index_documents(content_source_key, documents)
59
- expect(response.map(&:keys).map(&:sort)).to eq([["errors", "external_id", "id", "links", "status"], ["errors", "external_id", "id", "links", "status"]])
60
- expect(response.map { |a| a["status"] }).to eq(["complete", "complete"])
61
- end
62
- end
63
- end
64
-
65
- it 'should timeout if the process takes longer than the timeout option passed' do
66
- allow(client).to receive(:document_receipts) { sleep 0.05 }
67
-
34
+ it 'returns results when successful' do
68
35
  VCR.use_cassette(:async_create_or_update_document_success) do
69
- expect do
70
- client.index_documents(content_source_key, documents, :timeout => 0.01)
71
- end.to raise_error(Timeout::Error)
72
- end
73
- end
74
-
75
- it 'should validate required document fields' do
76
- documents = [{'external_id'=>'INscMGmhmX4', 'url' => 'http://www.youtube.com/watch?v=v1uyQZNg2vE'}]
77
- expect do
78
- client.index_documents(content_source_key, documents)
79
- end.to raise_error(SwiftypeEnterprise::InvalidDocument, 'missing required fields (title, body)')
80
- end
81
-
82
- it 'should reject non-core document fields' do
83
- documents.first['a_new_field'] = 'some value'
84
- expect {
85
- client.index_documents(content_source_key, documents)
86
- }.to raise_error(SwiftypeEnterprise::InvalidDocument, 'unsupported fields supplied (a_new_field), supported fields are (external_id, url, title, body, created_at, updated_at, type)')
87
- end
88
- end
89
-
90
- context '#async_index_documents' do
91
- it 'returns receipt IDs when successful' do
92
- VCR.use_cassette(:async_create_or_update_document_success) do
93
- VCR.use_cassette(:document_receipts_multiple_complete) do
94
- response = client.async_index_documents(content_source_key, documents)
36
+ response = client.index_documents(content_source_key, documents)
95
37
  expect(response.size).to eq(2)
96
- end
97
38
  end
98
39
  end
99
40
  end
@@ -47,7 +47,7 @@ http_interactions:
47
47
  - thin 1.5.0 codename Knife
48
48
  body:
49
49
  encoding: UTF-8
50
- string: '{"batch_link":"http://localhost:3002/api/v1/ent/document_receipts/bulk_show?ids=595d27492139de865a19820e%2C595d27492139de865a198210","document_receipts":[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]}'
51
- http_version:
50
+ string: '[{"id":null,"external_id":"1234","errors":[]},{"id":null,"external_id":"1235","errors":[]}]'
51
+ http_version:
52
52
  recorded_at: Wed, 05 Jul 2017 17:52:09 GMT
53
53
  recorded_with: VCR 3.0.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swiftype-enterprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quin Hoxie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-06 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -76,6 +76,7 @@ files:
76
76
  - ".gitignore"
77
77
  - ".travis.yml"
78
78
  - Gemfile
79
+ - LICENSE
79
80
  - LICENSE.txt
80
81
  - README.md
81
82
  - Rakefile
@@ -87,12 +88,11 @@ files:
87
88
  - lib/swiftype-enterprise/request.rb
88
89
  - lib/swiftype-enterprise/utils.rb
89
90
  - lib/swiftype-enterprise/version.rb
91
+ - logo-enterprise-search.png
90
92
  - spec/client_spec.rb
91
93
  - spec/configuration_spec.rb
92
94
  - spec/fixtures/vcr/async_create_or_update_document_success.yml
93
95
  - spec/fixtures/vcr/destroy_documents_success.yml
94
- - spec/fixtures/vcr/document_receipts_multiple.yml
95
- - spec/fixtures/vcr/document_receipts_multiple_complete.yml
96
96
  - spec/spec_helper.rb
97
97
  - swiftype-enterprise.gemspec
98
98
  homepage: https://swiftype.com
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  requirements: []
116
116
  rubyforge_project:
117
- rubygems_version: 2.6.11
117
+ rubygems_version: 2.7.6
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Official gem for accessing the Swiftype Enterprise API
@@ -123,6 +123,4 @@ test_files:
123
123
  - spec/configuration_spec.rb
124
124
  - spec/fixtures/vcr/async_create_or_update_document_success.yml
125
125
  - spec/fixtures/vcr/destroy_documents_success.yml
126
- - spec/fixtures/vcr/document_receipts_multiple.yml
127
- - spec/fixtures/vcr/document_receipts_multiple_complete.yml
128
126
  - spec/spec_helper.rb
@@ -1,53 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - SwiftypeEnterprise-Ruby/1.0.0
16
- Content-Type:
17
- - application/json
18
- Authorization:
19
- - Bearer cGUN-vBokevBhhzyA669
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- X-Frame-Options:
26
- - SAMEORIGIN
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- X-Content-Type-Options:
30
- - nosniff
31
- Content-Type:
32
- - application/json; charset=utf-8
33
- Etag:
34
- - W/"36a13162024b5c94fb2119b3184343d9"
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- Set-Cookie:
38
- - _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTkzNTQyODIzMTc0YTRjZDViYjZlYjA0OWMzY2U1ZjBlBjsAVA%3D%3D--e1d100ba4dab5934527ac0ff12a0ac5daf5156df;
39
- path=/; expires=Mon, 05 Jul 2027 17:52:09 -0000; HttpOnly
40
- X-Request-Id:
41
- - a8fada16-131d-4a45-bc5c-72e0218a17df
42
- X-Runtime:
43
- - '0.131438'
44
- Connection:
45
- - close
46
- Server:
47
- - thin 1.5.0 codename Knife
48
- body:
49
- encoding: UTF-8
50
- string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
51
- http_version:
52
- recorded_at: Wed, 05 Jul 2017 17:52:09 GMT
53
- recorded_with: VCR 3.0.3
@@ -1,153 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - SwiftypeEnterprise-Ruby/1.0.0
16
- Content-Type:
17
- - application/json
18
- Authorization:
19
- - Bearer cGUN-vBokevBhhzyA669
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- X-Frame-Options:
26
- - SAMEORIGIN
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- X-Content-Type-Options:
30
- - nosniff
31
- Content-Type:
32
- - application/json; charset=utf-8
33
- Etag:
34
- - W/"36a13162024b5c94fb2119b3184343d9"
35
- Cache-Control:
36
- - max-age=0, private, must-revalidate
37
- Set-Cookie:
38
- - _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWFiNmUxNjI2YTMyMzViNGEwNjRlZGRkYWIxMTRmMDZkBjsAVA%3D%3D--500b4e7e09c7aa8cd43a00231aa876e1eeb97817;
39
- path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
40
- X-Request-Id:
41
- - 929764cb-27b1-4e72-89f8-336ecef668f3
42
- X-Runtime:
43
- - '0.195985'
44
- Connection:
45
- - close
46
- Server:
47
- - thin 1.5.0 codename Knife
48
- body:
49
- encoding: UTF-8
50
- string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
51
- http_version:
52
- recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
53
- - request:
54
- method: get
55
- uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
56
- body:
57
- encoding: US-ASCII
58
- string: ''
59
- headers:
60
- Accept-Encoding:
61
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
62
- Accept:
63
- - "*/*"
64
- User-Agent:
65
- - SwiftypeEnterprise-Ruby/1.0.0
66
- Content-Type:
67
- - application/json
68
- Authorization:
69
- - Bearer cGUN-vBokevBhhzyA669
70
- response:
71
- status:
72
- code: 200
73
- message: OK
74
- headers:
75
- X-Frame-Options:
76
- - SAMEORIGIN
77
- X-Xss-Protection:
78
- - 1; mode=block
79
- X-Content-Type-Options:
80
- - nosniff
81
- Content-Type:
82
- - application/json; charset=utf-8
83
- Etag:
84
- - W/"36a13162024b5c94fb2119b3184343d9"
85
- Cache-Control:
86
- - max-age=0, private, must-revalidate
87
- Set-Cookie:
88
- - _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTkyMWYxZmY1YmUyYmFkMTZmZWY5ZjViNDQzZjY1ZTYzBjsAVA%3D%3D--07ecadd344a6bff7cac53924f2021d0ea9950cf8;
89
- path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
90
- X-Request-Id:
91
- - 806c4572-464b-413f-8a72-68d2bf9c0419
92
- X-Runtime:
93
- - '0.124933'
94
- Connection:
95
- - close
96
- Server:
97
- - thin 1.5.0 codename Knife
98
- body:
99
- encoding: UTF-8
100
- string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
101
- http_version:
102
- recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
103
- - request:
104
- method: get
105
- uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
106
- body:
107
- encoding: US-ASCII
108
- string: ''
109
- headers:
110
- Accept-Encoding:
111
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
112
- Accept:
113
- - "*/*"
114
- User-Agent:
115
- - SwiftypeEnterprise-Ruby/1.0.0
116
- Content-Type:
117
- - application/json
118
- Authorization:
119
- - Bearer cGUN-vBokevBhhzyA669
120
- response:
121
- status:
122
- code: 200
123
- message: OK
124
- headers:
125
- X-Frame-Options:
126
- - SAMEORIGIN
127
- X-Xss-Protection:
128
- - 1; mode=block
129
- X-Content-Type-Options:
130
- - nosniff
131
- Content-Type:
132
- - application/json; charset=utf-8
133
- Etag:
134
- - W/"a66e0556584fc4e277f2cf614f413938"
135
- Cache-Control:
136
- - max-age=0, private, must-revalidate
137
- Set-Cookie:
138
- - _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTE2N2IzMDY4NjY3NWFkMDYyNWM4OGI3OTQ2MDRkNTgxBjsAVA%3D%3D--1110c02d4c67762f709f53e3556a75abdb11c408;
139
- path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
140
- X-Request-Id:
141
- - 9858a835-0799-421e-a860-0b261f685a61
142
- X-Runtime:
143
- - '0.452000'
144
- Connection:
145
- - close
146
- Server:
147
- - thin 1.5.0 codename Knife
148
- body:
149
- encoding: UTF-8
150
- string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"complete","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"complete","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
151
- http_version:
152
- recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
153
- recorded_with: VCR 3.0.3