reuters 0.8.9 → 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.
- checksums.yaml +8 -8
- data/lib/reuters/client/search.rb +2 -1
- data/lib/reuters/client/search/all.rb +34 -0
- data/lib/reuters/namespaces/search.rb +2 -1
- data/lib/reuters/namespaces/search/all.rb +31 -0
- data/lib/reuters/version.rb +1 -1
- data/lib/reuters/wsdls/search.rb +2 -1
- data/lib/reuters/wsdls/search/all.rb +25 -0
- data/spec/reuters/client/search/all_spec.rb +47 -0
- data/spec/reuters/namespaces/search/all_spec.rb +5 -0
- data/spec/reuters/wsdls/search/all_spec.rb +5 -0
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTY0MTNhN2U5NjI2OTFlY2Y5YjgwN2ViMGRkMzU3MDIyYTk4ZmNlMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmQzODllYzhjZDlkYTczODdiYmY2YTgyNDMzOGQ3Y2ZhMTA1MTQyMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjA5NGQ0NDViMjIzNDAyMTNiOTkwNWQ0MTg0OGU2OTE3NDZkOTgzMmU1M2Rl
|
10
|
+
MGJmZjE2NTkxOWEwM2ZjOTA1MTBmZTA0NmIwZjNkZmE3MTIzODUyZmI5ZDQ5
|
11
|
+
YzM3NmM4NzUxNjY4OWFlMTk1ZGU4N2UwYjY3YjFiODgzMGU0MDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjZiZThhNWZlNGJkNmVkODIwZjM1YmFjN2QyZWEwNDUwOTgyZmJmMzFlOTEy
|
14
|
+
YjhlZWJhZjNhYzhkNmQ1MWRhYWNhZjM1MTAxNjFkODkwZmQyMGQyNzEwZDA2
|
15
|
+
NDE0MzM4ZjFiM2EyZThhYzM5ZWY1NjJhY2JkNzQxNmQ2MzhkMDI=
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Reuters
|
2
|
+
module Client
|
3
|
+
module Search
|
4
|
+
# Performs a "Search All" Reuters API request. This particular
|
5
|
+
# requests allows you to search for all types of listings, such as
|
6
|
+
# Equities, Derivatives and Funds.
|
7
|
+
#
|
8
|
+
# @note All Equity Search XML Requests require that the
|
9
|
+
# appropriate xmlns attribute is present on elements
|
10
|
+
# inside the request element. This class uses the
|
11
|
+
# before_request hook to inject the appropriate attribute.
|
12
|
+
class All < Equity
|
13
|
+
|
14
|
+
# Retrieve the correctly formatted Namespace Data Type
|
15
|
+
# for an Equity-based Search Reuters Request.
|
16
|
+
#
|
17
|
+
# @return [String] the fully resolved namespace endpoint.
|
18
|
+
def data_type
|
19
|
+
ns_definition(:query_spec_datatypes)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Retrieve the correctly formatted Namespace Query
|
23
|
+
# Specification for an Equity-based Search.
|
24
|
+
#
|
25
|
+
# @return [String] the fully resolved namespace endpoint.
|
26
|
+
def query_spec
|
27
|
+
ns_definition(:searchall, :query_spec, 1)
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Reuters
|
2
|
+
module Namespaces
|
3
|
+
module Search
|
4
|
+
# Represents the Search All namespace that can be
|
5
|
+
# used to query for information about all types of listings
|
6
|
+
module All
|
7
|
+
|
8
|
+
# @!parse include Base
|
9
|
+
|
10
|
+
include Base
|
11
|
+
|
12
|
+
# Year for the Search Equity endpoint.
|
13
|
+
mattr_accessor :year
|
14
|
+
self.year = '2006'
|
15
|
+
|
16
|
+
# Month for the Search Equity endpoint.
|
17
|
+
mattr_accessor :month
|
18
|
+
self.month = '05'
|
19
|
+
|
20
|
+
# Day for the Search Equity endpoint.
|
21
|
+
mattr_accessor :day
|
22
|
+
self.day = '01'
|
23
|
+
|
24
|
+
# Name for the Search Equity endpoint.
|
25
|
+
mattr_accessor :name
|
26
|
+
self.name = 'Search/Searchall_1'
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/reuters/version.rb
CHANGED
data/lib/reuters/wsdls/search.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Reuters
|
2
|
+
module Wsdls
|
3
|
+
module Search
|
4
|
+
# The Search All WSDL endpoint is used by the
|
5
|
+
# {Reuters::Client::Search::All} class to discover
|
6
|
+
# and make search-all-based API calls.
|
7
|
+
module All
|
8
|
+
|
9
|
+
# @!parse include Base
|
10
|
+
|
11
|
+
include Base
|
12
|
+
|
13
|
+
# Wsdl for the TokenManagement endpoint.
|
14
|
+
mattr_accessor :name
|
15
|
+
self.name = 'Search'
|
16
|
+
|
17
|
+
# Default method for this Wsdl
|
18
|
+
mattr_accessor :method
|
19
|
+
self.name = 'Searchall_1_HttpAndRkdToken_Soap11.wsdl'
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Reuters::Client::Search::All do
|
4
|
+
|
5
|
+
before { @search = Reuters::Client::Search::All.new }
|
6
|
+
|
7
|
+
subject { @search }
|
8
|
+
|
9
|
+
it_behaves_like "a search client class"
|
10
|
+
|
11
|
+
it { should respond_to(:data_type) }
|
12
|
+
it { should respond_to(:query_spec) }
|
13
|
+
|
14
|
+
describe "return value of #data_type" do
|
15
|
+
|
16
|
+
it "should be a string" do
|
17
|
+
expect(subject.data_type).to be_a(String)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should be a resolved namespace" do
|
21
|
+
expect(subject.data_type).to include(Reuters.namespaces_endpoint)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should include the camelcased data type" do
|
25
|
+
expect(subject.data_type).to include("QuerySpecDatatypes")
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "return value of #query_spec" do
|
31
|
+
|
32
|
+
it "should be a string" do
|
33
|
+
puts subject.operations.inspect
|
34
|
+
expect(subject.query_spec).to be_a(String)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should be a resolved namespace" do
|
38
|
+
expect(subject.query_spec).to include(Reuters.namespaces_endpoint)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should include the camelcased specification namespace" do
|
42
|
+
expect(subject.query_spec).to include("Searchall_QuerySpec_1")
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reuters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stockflare
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|
@@ -244,6 +244,7 @@ files:
|
|
244
244
|
- lib/reuters/client/base.rb
|
245
245
|
- lib/reuters/client/fundamentals.rb
|
246
246
|
- lib/reuters/client/search.rb
|
247
|
+
- lib/reuters/client/search/all.rb
|
247
248
|
- lib/reuters/client/search/base.rb
|
248
249
|
- lib/reuters/client/search/equity.rb
|
249
250
|
- lib/reuters/client/token.rb
|
@@ -253,6 +254,7 @@ files:
|
|
253
254
|
- lib/reuters/namespaces/common.rb
|
254
255
|
- lib/reuters/namespaces/fundamentals.rb
|
255
256
|
- lib/reuters/namespaces/search.rb
|
257
|
+
- lib/reuters/namespaces/search/all.rb
|
256
258
|
- lib/reuters/namespaces/search/equity.rb
|
257
259
|
- lib/reuters/namespaces/token.rb
|
258
260
|
- lib/reuters/response.rb
|
@@ -261,18 +263,21 @@ files:
|
|
261
263
|
- lib/reuters/wsdls/base.rb
|
262
264
|
- lib/reuters/wsdls/fundamentals.rb
|
263
265
|
- lib/reuters/wsdls/search.rb
|
266
|
+
- lib/reuters/wsdls/search/all.rb
|
264
267
|
- lib/reuters/wsdls/search/equity.rb
|
265
268
|
- lib/reuters/wsdls/token.rb
|
266
269
|
- reuters.gemspec
|
267
270
|
- spec/fixtures/responses/token.xml
|
268
271
|
- spec/reuters/builder_spec.rb
|
269
272
|
- spec/reuters/client/fundamentals_spec.rb
|
273
|
+
- spec/reuters/client/search/all_spec.rb
|
270
274
|
- spec/reuters/client/search/equity_spec.rb
|
271
275
|
- spec/reuters/client/token_spec.rb
|
272
276
|
- spec/reuters/client_spec.rb
|
273
277
|
- spec/reuters/credentials_spec.rb
|
274
278
|
- spec/reuters/namespaces/common_spec.rb
|
275
279
|
- spec/reuters/namespaces/fundamentals_spec.rb
|
280
|
+
- spec/reuters/namespaces/search/all_spec.rb
|
276
281
|
- spec/reuters/namespaces/search/equity_spec.rb
|
277
282
|
- spec/reuters/namespaces/search_spec.rb
|
278
283
|
- spec/reuters/namespaces/token_spec.rb
|
@@ -280,6 +285,7 @@ files:
|
|
280
285
|
- spec/reuters/response_spec.rb
|
281
286
|
- spec/reuters/version_spec.rb
|
282
287
|
- spec/reuters/wsdls/fundamentals_spec.rb
|
288
|
+
- spec/reuters/wsdls/search/all_spec.rb
|
283
289
|
- spec/reuters/wsdls/search/equity_spec.rb
|
284
290
|
- spec/reuters/wsdls/token_spec.rb
|
285
291
|
- spec/reuters/wsdls_spec.rb
|
@@ -312,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
318
|
version: '0'
|
313
319
|
requirements: []
|
314
320
|
rubyforge_project:
|
315
|
-
rubygems_version: 2.4.
|
321
|
+
rubygems_version: 2.4.5
|
316
322
|
signing_key:
|
317
323
|
specification_version: 4
|
318
324
|
summary: Ruby client for Thomson Reuters Knowledge Direct (TRKD) API
|
@@ -320,12 +326,14 @@ test_files:
|
|
320
326
|
- spec/fixtures/responses/token.xml
|
321
327
|
- spec/reuters/builder_spec.rb
|
322
328
|
- spec/reuters/client/fundamentals_spec.rb
|
329
|
+
- spec/reuters/client/search/all_spec.rb
|
323
330
|
- spec/reuters/client/search/equity_spec.rb
|
324
331
|
- spec/reuters/client/token_spec.rb
|
325
332
|
- spec/reuters/client_spec.rb
|
326
333
|
- spec/reuters/credentials_spec.rb
|
327
334
|
- spec/reuters/namespaces/common_spec.rb
|
328
335
|
- spec/reuters/namespaces/fundamentals_spec.rb
|
336
|
+
- spec/reuters/namespaces/search/all_spec.rb
|
329
337
|
- spec/reuters/namespaces/search/equity_spec.rb
|
330
338
|
- spec/reuters/namespaces/search_spec.rb
|
331
339
|
- spec/reuters/namespaces/token_spec.rb
|
@@ -333,6 +341,7 @@ test_files:
|
|
333
341
|
- spec/reuters/response_spec.rb
|
334
342
|
- spec/reuters/version_spec.rb
|
335
343
|
- spec/reuters/wsdls/fundamentals_spec.rb
|
344
|
+
- spec/reuters/wsdls/search/all_spec.rb
|
336
345
|
- spec/reuters/wsdls/search/equity_spec.rb
|
337
346
|
- spec/reuters/wsdls/token_spec.rb
|
338
347
|
- spec/reuters/wsdls_spec.rb
|