quintype 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +22 -20
- data/lib/quintype/api.rb +12 -0
- data/lib/quintype/api/entity.rb +17 -0
- data/quintype.gemspec +1 -1
- data/spec/api/entity_spec.rb +28 -0
- data/spec/fixtures/vcr_cassettes/api_entity_all.yml +73 -0
- data/spec/fixtures/vcr_cassettes/api_entity_all_limits.yml +53 -0
- data/spec/fixtures/vcr_cassettes/api_entity_id.yml +53 -0
- data/spec/fixtures/vcr_cassettes/api_entity_subentity.yml +51 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbb5df3453f12910b827006ef5e862ec4317bc5c
|
4
|
+
data.tar.gz: 2fa1d71f455e0599f1016b253a94fb40ae09c138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35e60d7c726574ba3edc439750e00b23822a62a3c22fa32e100cd16ddea80c61812005a34e3ba6a75b4b392b984bce86f4c6f0e253fbad876b390895a5ac8513
|
7
|
+
data.tar.gz: 9bc2724ec10c6ed06caf4a162d57f684509367c5c438ad5bbc05fa9ea70e8a717dc3227738ec1b600b6f8916cff614f75be4c953db8924e0115615a80761cc07
|
data/.rspec
CHANGED
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem 'rspec', '~> 3.
|
6
|
+
gem 'rspec', '~> 3.7.0'
|
7
7
|
end
|
8
8
|
|
9
9
|
group :development, :test do
|
@@ -12,6 +12,6 @@ group :development, :test do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
group :test do
|
15
|
-
gem 'vcr'
|
16
|
-
gem 'webmock'
|
15
|
+
gem 'vcr', '~> 3.0.3'
|
16
|
+
gem 'webmock', '~> 3.1.1'
|
17
17
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
quintype (0.0.
|
4
|
+
quintype (0.0.14)
|
5
5
|
activesupport (~> 4.2)
|
6
6
|
faraday (~> 0.9)
|
7
7
|
|
@@ -13,16 +13,17 @@ GEM
|
|
13
13
|
minitest (~> 5.1)
|
14
14
|
thread_safe (~> 0.3, >= 0.3.4)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
-
addressable (2.
|
16
|
+
addressable (2.5.2)
|
17
|
+
public_suffix (>= 2.0.2, < 4.0)
|
17
18
|
byebug (8.2.2)
|
18
19
|
coderay (1.1.1)
|
19
20
|
concurrent-ruby (1.0.5)
|
20
21
|
crack (0.4.3)
|
21
22
|
safe_yaml (~> 1.0.0)
|
22
|
-
diff-lcs (1.
|
23
|
+
diff-lcs (1.3)
|
23
24
|
faraday (0.13.1)
|
24
25
|
multipart-post (>= 1.2, < 3)
|
25
|
-
hashdiff (0.3.
|
26
|
+
hashdiff (0.3.7)
|
26
27
|
i18n (0.9.0)
|
27
28
|
concurrent-ruby (~> 1.0)
|
28
29
|
method_source (0.8.2)
|
@@ -32,26 +33,27 @@ GEM
|
|
32
33
|
coderay (~> 1.1.0)
|
33
34
|
method_source (~> 0.8.1)
|
34
35
|
slop (~> 3.4)
|
35
|
-
|
36
|
-
|
37
|
-
rspec-
|
38
|
-
rspec-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
public_suffix (3.0.1)
|
37
|
+
rspec (3.7.0)
|
38
|
+
rspec-core (~> 3.7.0)
|
39
|
+
rspec-expectations (~> 3.7.0)
|
40
|
+
rspec-mocks (~> 3.7.0)
|
41
|
+
rspec-core (3.7.0)
|
42
|
+
rspec-support (~> 3.7.0)
|
43
|
+
rspec-expectations (3.7.0)
|
42
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-mocks (3.
|
45
|
+
rspec-support (~> 3.7.0)
|
46
|
+
rspec-mocks (3.7.0)
|
45
47
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.
|
47
|
-
rspec-support (3.
|
48
|
+
rspec-support (~> 3.7.0)
|
49
|
+
rspec-support (3.7.0)
|
48
50
|
safe_yaml (1.0.4)
|
49
51
|
slop (3.6.0)
|
50
52
|
thread_safe (0.3.6)
|
51
53
|
tzinfo (1.2.4)
|
52
54
|
thread_safe (~> 0.1)
|
53
|
-
vcr (3.0.
|
54
|
-
webmock (1.
|
55
|
+
vcr (3.0.3)
|
56
|
+
webmock (3.1.1)
|
55
57
|
addressable (>= 2.3.6)
|
56
58
|
crack (>= 0.3.2)
|
57
59
|
hashdiff
|
@@ -63,9 +65,9 @@ DEPENDENCIES
|
|
63
65
|
byebug
|
64
66
|
pry
|
65
67
|
quintype!
|
66
|
-
rspec (~> 3.
|
67
|
-
vcr
|
68
|
-
webmock
|
68
|
+
rspec (~> 3.7.0)
|
69
|
+
vcr (~> 3.0.3)
|
70
|
+
webmock (~> 3.1.1)
|
69
71
|
|
70
72
|
BUNDLED WITH
|
71
73
|
1.15.4
|
data/lib/quintype/api.rb
CHANGED
@@ -218,6 +218,18 @@ class API
|
|
218
218
|
_get("v1/preview/story/#{public_preview_key}")
|
219
219
|
end
|
220
220
|
|
221
|
+
def entities(params)
|
222
|
+
_get("v1/entities", params)
|
223
|
+
end
|
224
|
+
|
225
|
+
def find_entity(id)
|
226
|
+
_get("v1/entities/#{id}")
|
227
|
+
end
|
228
|
+
|
229
|
+
def sub_entity(entity_id, sub_entity_id)
|
230
|
+
_get("v1/entities/#{entity_id}/#{sub_entity_id}")
|
231
|
+
end
|
232
|
+
|
221
233
|
private
|
222
234
|
|
223
235
|
def _post(url_path, body, session_cookie=nil)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class API
|
2
|
+
class Entity
|
3
|
+
class << self
|
4
|
+
def all(params)
|
5
|
+
API.entities(params)
|
6
|
+
end
|
7
|
+
|
8
|
+
def find(id)
|
9
|
+
API.find_entity(id)
|
10
|
+
end
|
11
|
+
|
12
|
+
def sub_entity(entity_id, sub_entity_id)
|
13
|
+
API.sub_entity(entity_id, sub_entity_id)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/quintype.gemspec
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../../lib/quintype/api/entity'
|
2
|
+
|
3
|
+
describe API::Entity do
|
4
|
+
describe '#all' do
|
5
|
+
it 'returns all entities', vcr: { cassette_name: 'api_entity_all' } do
|
6
|
+
result = described_class.all({})
|
7
|
+
expect(result['entities'].count).to eq 20
|
8
|
+
end
|
9
|
+
it 'returns entities when limits are specified', vcr: { cassette_name: 'api_entity_all_limits' } do
|
10
|
+
result = described_class.all(limit: 1)
|
11
|
+
expect(result['entities'].count).to eq 1
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#find' do
|
16
|
+
it 'returns a single entity by id', vcr: { cassette_name: 'api_entity_id' } do
|
17
|
+
result = described_class.find(45667)
|
18
|
+
expect(result.count).to eq 1
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#sub_entity' do
|
23
|
+
it 'returns a subentity by entity-id and subentity-id', vcr: { cassette_name: 'api_entity_subentity'} do
|
24
|
+
result = described_class.sub_entity(45667, 32728)
|
25
|
+
expect(result.count).to eq 1
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://bloombergquint.staging.quintype.io/api/v1/entities
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Cache-Control:
|
26
|
+
- public,max-age=15
|
27
|
+
Content-Length:
|
28
|
+
- '1323'
|
29
|
+
Accept-Ranges:
|
30
|
+
- bytes
|
31
|
+
Date:
|
32
|
+
- Thu, 07 Dec 2017 17:17:41 GMT
|
33
|
+
Age:
|
34
|
+
- '73'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Served-By:
|
38
|
+
- cache-lhr6333-LHR
|
39
|
+
X-Cache:
|
40
|
+
- HIT
|
41
|
+
X-Cache-Hits:
|
42
|
+
- '1'
|
43
|
+
X-Timer:
|
44
|
+
- S1512667061.312046,VS0,VE1
|
45
|
+
Vary:
|
46
|
+
- Accept-Encoding
|
47
|
+
body:
|
48
|
+
encoding: ASCII-8BIT
|
49
|
+
string: '{"entities":[{"updated-at":1512544059081,"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"publisher-id":26,"name":"Sanghvi
|
50
|
+
Brands Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45667,"isin":"INE204Y01010","last-updated-by":88299,"aliases":"","stock-id":"1002880","created-at":1512544059081,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540782"},{"updated-at":1512544059055,"category":"NULL","stock-industry":{"id":41537,"name":"Finance
|
51
|
+
- Stock Broking"},"publisher-id":26,"name":"5Paisa Capital Ltd.","nse-code":"5PAISA","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45666,"isin":"INE618L01018","last-updated-by":88299,"aliases":"","stock-id":"1002879","created-at":1512544059055,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540776"},{"updated-at":1512544059029,"category":"NULL","stock-industry":{"id":41521,"name":"Refractories"},"publisher-id":26,"name":"IFGL
|
52
|
+
Refractories Ltd.","nse-code":"","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45665,"isin":"INE133Y01011","last-updated-by":88299,"aliases":"","stock-id":"1002878","created-at":1512544059029,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540774"},{"updated-at":1512544059003,"category":"NULL","stock-industry":{"id":41488,"name":"Electronics
|
53
|
+
- Components"},"publisher-id":26,"name":"Pulz Electronics Ltd.","nse-code":"PULZ","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45664,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002877","created-at":1512544059003,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058977,"category":"NULL","stock-industry":{"id":41430,"name":"Engineering"},"publisher-id":26,"name":"ANI
|
54
|
+
Integrated Services Ltd.","nse-code":"ANI","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45663,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002876","created-at":1512544058977,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058951,"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"publisher-id":26,"name":"SecUR
|
55
|
+
Credential Ltd.","nse-code":"SECURCRED","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45662,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002875","created-at":1512544058951,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058914,"category":"NULL","stock-industry":{"id":41544,"name":"Finance
|
56
|
+
- Investment"},"publisher-id":26,"name":"Tube Investments of India Ltd.","nse-code":"TIINDIA","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45661,"isin":"INE974X01010","last-updated-by":88299,"aliases":"","stock-id":"1002874","created-at":1512544058914,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540762"},{"updated-at":1512544058883,"category":"NULL","stock-industry":{"id":41466,"name":"Logistics"},"publisher-id":26,"name":"Mahindra
|
57
|
+
Logistics Ltd.","nse-code":"MAHLOG","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45660,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002873","created-at":1512544058883,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058857,"category":"NULL","stock-industry":{"id":41548,"name":"Insurance"},"publisher-id":26,"name":"HDFC
|
58
|
+
Standard Life Insurance Co Ltd.","nse-code":"HDFCLIFE","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45659,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002872","created-at":1512544058857,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058831,"category":"NULL","stock-industry":{"id":41548,"name":"Insurance"},"publisher-id":26,"name":"The
|
59
|
+
New India Assurance Co. Ltd.","nse-code":"NIACL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45658,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002871","created-at":1512544058831,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058805,"category":"NULL","stock-industry":{"id":41541,"name":"Consumer
|
60
|
+
Food"},"publisher-id":26,"name":"Sheetal Cool Products Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45657,"isin":"INE501Y01019","last-updated-by":88299,"aliases":"","stock-id":"1002870","created-at":1512544058805,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540757"},{"updated-at":1512544058777,"category":"NULL","stock-industry":{"id":41553,"name":"Household
|
61
|
+
& Personal Products"},"publisher-id":26,"name":"Khadim India Ltd","nse-code":"KHADIM","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45656,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002869","created-at":1512544058777,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058735,"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"publisher-id":26,"name":"Kaarya
|
62
|
+
Facilities And Services Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45655,"isin":"INE282Y01016","last-updated-by":88299,"aliases":"","stock-id":"1002868","created-at":1512544058735,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540756"},{"updated-at":1512544058708,"category":"NULL","stock-industry":{"id":41447,"name":"Trading"},"publisher-id":26,"name":"DP
|
63
|
+
Abhushan Ltd.","nse-code":"DPABHUSHAN","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45654,"isin":"INE266Y01019","last-updated-by":88299,"aliases":"","stock-id":"1002867","created-at":1512544058708,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058682,"category":"NULL","stock-industry":{"id":41544,"name":"Finance
|
64
|
+
- Investment"},"publisher-id":26,"name":"Reliance Nippon Life Asset Management
|
65
|
+
Ltd.","nse-code":"RNAM","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45653,"isin":"NULL","last-updated-by":88299,"aliases":"","stock-id":"1002866","created-at":1512544058682,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058655,"category":"NULL","stock-industry":{"id":41500,"name":"Wood
|
66
|
+
& Wood Products"},"publisher-id":26,"name":"Milton Industries Ltd.","nse-code":"MILTON","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45652,"isin":"INE376Y01016","last-updated-by":88299,"aliases":"","stock-id":"1002865","created-at":1512544058655,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058629,"category":"NULL","stock-industry":{"id":41466,"name":"Logistics"},"publisher-id":26,"name":"Shreeji
|
67
|
+
Translogistics Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45651,"isin":"INE402Y01010","last-updated-by":88299,"aliases":"","stock-id":"1002864","created-at":1512544058629,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540738"},{"updated-at":1512544058603,"category":"NULL","stock-industry":{"id":41431,"name":"Pharmaceuticals
|
68
|
+
& Drugs"},"publisher-id":26,"name":"Shree Ganesh Remedies Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45650,"isin":"INE414Y01015","last-updated-by":88299,"aliases":"","stock-id":"1002863","created-at":1512544058603,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540737"},{"updated-at":1512544058577,"category":"NULL","stock-industry":{"id":41553,"name":"Household
|
69
|
+
& Personal Products"},"publisher-id":26,"name":"Omfurn India Ltd.","nse-code":"OMFURN","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45649,"isin":"INE338Y01016","last-updated-by":88299,"aliases":"","stock-id":"1002862","created-at":1512544058577,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"},{"updated-at":1512544058550,"category":"NULL","stock-industry":{"id":41552,"name":"Forgings"},"publisher-id":26,"name":"Tirupati
|
70
|
+
Forge Ltd.","nse-code":"FORGE","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45648,"isin":"INE319Y01016","last-updated-by":88299,"aliases":"","stock-id":"1002861","created-at":1512544058550,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"NULL"}],"total":20}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Thu, 07 Dec 2017 17:17:20 GMT
|
73
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://bloombergquint.staging.quintype.io/api/v1/entities?limit=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Cache-Control:
|
26
|
+
- public,max-age=15
|
27
|
+
Content-Length:
|
28
|
+
- '322'
|
29
|
+
Accept-Ranges:
|
30
|
+
- bytes
|
31
|
+
Date:
|
32
|
+
- Thu, 07 Dec 2017 17:34:23 GMT
|
33
|
+
Age:
|
34
|
+
- '0'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Served-By:
|
38
|
+
- cache-lhr6329-LHR
|
39
|
+
X-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Cache-Hits:
|
42
|
+
- '0'
|
43
|
+
X-Timer:
|
44
|
+
- S1512668063.306186,VS0,VE288
|
45
|
+
Vary:
|
46
|
+
- Accept-Encoding
|
47
|
+
body:
|
48
|
+
encoding: ASCII-8BIT
|
49
|
+
string: '{"entities":[{"updated-at":1512544059081,"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"publisher-id":26,"name":"Sanghvi
|
50
|
+
Brands Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45667,"isin":"INE204Y01010","last-updated-by":88299,"aliases":"","stock-id":"1002880","created-at":1512544059081,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540782"}],"total":1}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Thu, 07 Dec 2017 17:34:23 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://bloombergquint.staging.quintype.io/api/v1/entities/45667
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Cache-Control:
|
26
|
+
- public,max-age=15
|
27
|
+
Content-Length:
|
28
|
+
- '305'
|
29
|
+
Accept-Ranges:
|
30
|
+
- bytes
|
31
|
+
Date:
|
32
|
+
- Fri, 08 Dec 2017 06:39:17 GMT
|
33
|
+
Age:
|
34
|
+
- '0'
|
35
|
+
Connection:
|
36
|
+
- keep-alive
|
37
|
+
X-Served-By:
|
38
|
+
- cache-lhr6345-LHR
|
39
|
+
X-Cache:
|
40
|
+
- MISS
|
41
|
+
X-Cache-Hits:
|
42
|
+
- '0'
|
43
|
+
X-Timer:
|
44
|
+
- S1512715157.023426,VS0,VE173
|
45
|
+
Vary:
|
46
|
+
- Accept-Encoding
|
47
|
+
body:
|
48
|
+
encoding: ASCII-8BIT
|
49
|
+
string: '{"entity":{"updated-at":1512544059081,"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"publisher-id":26,"name":"Sanghvi
|
50
|
+
Brands Ltd.","nse-code":"NULL","type":"stock","stock-exchange":{"id":32728,"name":"BSE"},"entity-type-id":32,"deleted-at":null,"created-by":88299,"id":45667,"isin":"INE204Y01010","last-updated-by":88299,"aliases":"","stock-id":"1002880","created-at":1512544059081,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540782"}}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 08 Dec 2017 06:39:17 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://bloombergquint.staging.quintype.io/api/v1/entities/45667/32728
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.13.1
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Content-Length:
|
26
|
+
- '314'
|
27
|
+
Accept-Ranges:
|
28
|
+
- bytes
|
29
|
+
Date:
|
30
|
+
- Fri, 08 Dec 2017 06:53:47 GMT
|
31
|
+
Age:
|
32
|
+
- '0'
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
X-Served-By:
|
36
|
+
- cache-lhr6334-LHR
|
37
|
+
X-Cache:
|
38
|
+
- MISS
|
39
|
+
X-Cache-Hits:
|
40
|
+
- '0'
|
41
|
+
X-Timer:
|
42
|
+
- S1512716027.420982,VS0,VE287
|
43
|
+
Vary:
|
44
|
+
- Accept-Encoding
|
45
|
+
body:
|
46
|
+
encoding: ASCII-8BIT
|
47
|
+
string: '{"relationships":{"self":[{"category":"NULL","stock-industry":{"id":41454,"name":"Miscellaneous"},"entity-type":"stock","name":"Sanghvi
|
48
|
+
Brands Ltd.","nse-code":"NULL","rank":1,"relationship":"self","stock-exchange":{"id":32728,"name":"BSE"},"deleted-at":null,"created-by":88299,"id":45667,"isin":"INE204Y01010","last-updated-by":88299,"aliases":"","stock-id":"1002880","created-at":1512544059081,"stock-info-provider":{"id":32730,"name":"MarketsMojo"},"bse-code":"540782"}]}}'
|
49
|
+
http_version:
|
50
|
+
recorded_at: Fri, 08 Dec 2017 06:53:47 GMT
|
51
|
+
recorded_with: VCR 3.0.3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quintype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- lib/quintype.rb
|
52
52
|
- lib/quintype/api.rb
|
53
53
|
- lib/quintype/api/author.rb
|
54
|
+
- lib/quintype/api/entity.rb
|
54
55
|
- lib/quintype/api/stack.rb
|
55
56
|
- lib/quintype/api/story.rb
|
56
57
|
- lib/quintype/api/story/reading_time.rb
|
@@ -58,9 +59,14 @@ files:
|
|
58
59
|
- lib/quintype/api/url.rb
|
59
60
|
- lib/quintype/engine.rb
|
60
61
|
- quintype.gemspec
|
62
|
+
- spec/api/entity_spec.rb
|
61
63
|
- spec/api/stack_spec.rb
|
62
64
|
- spec/api/story_spec.rb
|
63
65
|
- spec/api/tag_spec.rb
|
66
|
+
- spec/fixtures/vcr_cassettes/api_entity_all.yml
|
67
|
+
- spec/fixtures/vcr_cassettes/api_entity_all_limits.yml
|
68
|
+
- spec/fixtures/vcr_cassettes/api_entity_id.yml
|
69
|
+
- spec/fixtures/vcr_cassettes/api_entity_subentity.yml
|
64
70
|
- spec/fixtures/vcr_cassettes/api_stack_all.yml
|
65
71
|
- spec/fixtures/vcr_cassettes/api_stack_stories_with_params.yml
|
66
72
|
- spec/fixtures/vcr_cassettes/api_stack_with_stories.yml
|
@@ -95,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
101
|
version: '0'
|
96
102
|
requirements: []
|
97
103
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.5.1
|
99
105
|
signing_key:
|
100
106
|
specification_version: 4
|
101
107
|
summary: quintype!
|