crunchbase4 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -39
- data/lib/crunchbase/utilities/search_query_parameters.rb +14 -13
- data/lib/crunchbase/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b73d116afcbec0aff28ccf3b7d32ca87085350d8503965e2e9073dbdf5a86593
|
4
|
+
data.tar.gz: a05828ca45439cba39a99a9688cd6830d51cd88ec7c1ec45527e28948e7ca73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7617367a3fd087f23f963a5d3b29034854de56cc03c5a7f4b8d8d368ac57d8f755418dfa29cbf9a1ba64cc26189af7400fb15c6ed153eadcc8e7e7c9b21612c
|
7
|
+
data.tar.gz: fd0f8739cda3b88dccafdf754c2422be13f5978128f8dd6ccbaadb7ef7858cd22a9996ea32e125bc24d4b4dfb90f3429d8d7549361db0977db03c0ad77d634b1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
crunchbase4 (0.2.
|
4
|
+
crunchbase4 (0.2.2)
|
5
5
|
faraday
|
6
6
|
faraday_curl
|
7
7
|
faraday_middleware
|
@@ -16,82 +16,59 @@ GEM
|
|
16
16
|
coderay (1.1.3)
|
17
17
|
crack (0.4.3)
|
18
18
|
safe_yaml (~> 1.0.0)
|
19
|
-
diff-lcs (1.
|
20
|
-
faraday (1.
|
21
|
-
faraday-em_http (~> 1.0)
|
22
|
-
faraday-em_synchrony (~> 1.0)
|
23
|
-
faraday-excon (~> 1.1)
|
24
|
-
faraday-httpclient (~> 1.0.1)
|
25
|
-
faraday-net_http (~> 1.0)
|
26
|
-
faraday-net_http_persistent (~> 1.1)
|
27
|
-
faraday-patron (~> 1.0)
|
28
|
-
faraday-rack (~> 1.0)
|
19
|
+
diff-lcs (1.5.0)
|
20
|
+
faraday (1.0.1)
|
29
21
|
multipart-post (>= 1.2, < 3)
|
30
|
-
ruby2_keywords (>= 0.0.4)
|
31
|
-
faraday-em_http (1.0.0)
|
32
|
-
faraday-em_synchrony (1.0.0)
|
33
|
-
faraday-excon (1.1.0)
|
34
|
-
faraday-httpclient (1.0.1)
|
35
|
-
faraday-net_http (1.0.1)
|
36
|
-
faraday-net_http_persistent (1.2.0)
|
37
|
-
faraday-patron (1.0.0)
|
38
|
-
faraday-rack (1.0.0)
|
39
22
|
faraday_curl (0.0.2)
|
40
23
|
faraday (>= 0.9.0)
|
41
24
|
faraday_middleware (1.2.0)
|
42
25
|
faraday (~> 1.0)
|
43
26
|
hashdiff (1.0.1)
|
44
|
-
httparty (0.
|
45
|
-
|
27
|
+
httparty (0.21.0)
|
28
|
+
mini_mime (>= 1.0.0)
|
46
29
|
multi_xml (>= 0.5.2)
|
30
|
+
jaro_winkler (1.5.4)
|
47
31
|
method_source (1.0.0)
|
48
|
-
|
49
|
-
mime-types-data (~> 3.2015)
|
50
|
-
mime-types-data (3.2021.0901)
|
32
|
+
mini_mime (1.1.2)
|
51
33
|
multi_xml (0.6.0)
|
52
34
|
multipart-post (2.1.1)
|
53
|
-
parallel (1.19.
|
35
|
+
parallel (1.19.2)
|
54
36
|
parser (2.7.1.3)
|
55
37
|
ast (~> 2.4.0)
|
56
|
-
pry (0.
|
38
|
+
pry (0.14.1)
|
57
39
|
coderay (~> 1.1)
|
58
40
|
method_source (~> 1.0)
|
59
41
|
public_suffix (4.0.6)
|
60
|
-
rainbow (3.
|
42
|
+
rainbow (3.1.1)
|
61
43
|
rake (12.3.3)
|
62
|
-
regexp_parser (1.7.0)
|
63
44
|
rexml (3.2.5)
|
64
45
|
rspec (3.9.0)
|
65
46
|
rspec-core (~> 3.9.0)
|
66
47
|
rspec-expectations (~> 3.9.0)
|
67
48
|
rspec-mocks (~> 3.9.0)
|
68
|
-
rspec-core (3.9.
|
49
|
+
rspec-core (3.9.3)
|
69
50
|
rspec-support (~> 3.9.3)
|
70
|
-
rspec-expectations (3.9.
|
51
|
+
rspec-expectations (3.9.4)
|
71
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
53
|
rspec-support (~> 3.9.0)
|
73
54
|
rspec-mocks (3.9.1)
|
74
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
56
|
rspec-support (~> 3.9.0)
|
76
57
|
rspec-support (3.9.3)
|
77
|
-
rubocop (0.
|
58
|
+
rubocop (0.81.0)
|
59
|
+
jaro_winkler (~> 1.5.1)
|
78
60
|
parallel (~> 1.10)
|
79
61
|
parser (>= 2.7.0.1)
|
80
62
|
rainbow (>= 2.2.2, < 4.0)
|
81
|
-
regexp_parser (>= 1.7)
|
82
63
|
rexml
|
83
|
-
rubocop-ast (>= 0.0.3)
|
84
64
|
ruby-progressbar (~> 1.7)
|
85
65
|
unicode-display_width (>= 1.4.0, < 2.0)
|
86
|
-
rubocop-ast (0.0.3)
|
87
|
-
parser (>= 2.7.0.1)
|
88
66
|
ruby-progressbar (1.10.1)
|
89
|
-
ruby2_keywords (0.0.5)
|
90
67
|
safe_yaml (1.0.5)
|
91
68
|
unicode-display_width (1.7.0)
|
92
69
|
vcr (6.0.0)
|
93
|
-
webmock (3.
|
94
|
-
addressable (>= 2.
|
70
|
+
webmock (3.18.1)
|
71
|
+
addressable (>= 2.8.0)
|
95
72
|
crack (>= 0.3.2)
|
96
73
|
hashdiff (>= 0.4.0, < 2.0.0)
|
97
74
|
|
@@ -11,6 +11,7 @@ module Crunchbase
|
|
11
11
|
#
|
12
12
|
# Search Query Parameters
|
13
13
|
#
|
14
|
+
# order_field_id: sort field, default field will be updated_at
|
14
15
|
# field_ids: array of field_id strings
|
15
16
|
# Fields to include as columns in the search result entities
|
16
17
|
# query: Search query to perform on the designated entity
|
@@ -25,19 +26,11 @@ module Crunchbase
|
|
25
26
|
# Used to paginate search results to the next page.
|
26
27
|
# after_id should be the uuid of the last item in the current page. May not be provided simultaneously with before_id.
|
27
28
|
def query_parameters(args)
|
29
|
+
order_field_id = args[:order_field_id] || 'updated_at'
|
30
|
+
|
28
31
|
params = {
|
29
|
-
'field_ids' =>
|
30
|
-
|
31
|
-
created_at
|
32
|
-
updated_at
|
33
|
-
] + (args[:field_ids] || []).uniq,
|
34
|
-
'order' => [
|
35
|
-
{
|
36
|
-
'field_id' => 'updated_at',
|
37
|
-
'sort' => (args[:sort] || 'desc'),
|
38
|
-
'nulls' => 'last'
|
39
|
-
}
|
40
|
-
],
|
32
|
+
'field_ids' => default_field_ids + (args[:field_ids] || []).uniq,
|
33
|
+
'order' => [{ 'field_id' => order_field_id, 'sort' => (args[:sort] || 'desc'), 'nulls' => 'last' }],
|
41
34
|
'limit' => args[:limit] || 1000
|
42
35
|
}
|
43
36
|
|
@@ -46,7 +39,7 @@ module Crunchbase
|
|
46
39
|
'query' => [
|
47
40
|
{
|
48
41
|
'type' => 'predicate',
|
49
|
-
'field_id' =>
|
42
|
+
'field_id' => order_field_id,
|
50
43
|
'operator_id' => 'gte',
|
51
44
|
'values' => [
|
52
45
|
args[:date]
|
@@ -59,6 +52,14 @@ module Crunchbase
|
|
59
52
|
params.merge!('after_id' => args[:after_id]) unless args[:after_id].nil?
|
60
53
|
params
|
61
54
|
end
|
55
|
+
|
56
|
+
def default_field_ids
|
57
|
+
@default_field_ids ||= %w[
|
58
|
+
uuid
|
59
|
+
created_at
|
60
|
+
updated_at
|
61
|
+
]
|
62
|
+
end
|
62
63
|
end
|
63
64
|
end
|
64
65
|
end
|
data/lib/crunchbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crunchbase4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|