crunchbase4 0.1.0 → 0.1.5
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 +4 -4
- data/.rubocop_todo.yml +11 -1
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +4 -1
- data/README.md +572 -62
- data/crunchbase4.gemspec +7 -6
- data/lib/crunchbase.rb +30 -3
- data/lib/crunchbase/autocompletes/client.rb +75 -0
- data/lib/crunchbase/client.rb +9 -40
- data/lib/crunchbase/config.rb +1 -1
- data/lib/crunchbase/deleted_entities/client.rb +69 -0
- data/lib/crunchbase/entities/client.rb +35 -21
- data/lib/crunchbase/models.rb +11 -1
- data/lib/crunchbase/models/acquisition.rb +61 -0
- data/lib/crunchbase/models/address.rb +36 -0
- data/lib/crunchbase/models/autocomplete_entity.rb +25 -0
- data/lib/crunchbase/models/concerns/entity.rb +48 -0
- data/lib/crunchbase/models/concerns/mappings.rb +37 -0
- data/lib/crunchbase/models/deleted_entity.rb +26 -0
- data/lib/crunchbase/models/event_appearance.rb +39 -0
- data/lib/crunchbase/models/fund.rb +43 -0
- data/lib/crunchbase/models/funding_round.rb +1 -1
- data/lib/crunchbase/models/ipo.rb +48 -0
- data/lib/crunchbase/models/job.rb +42 -0
- data/lib/crunchbase/models/ownership.rb +39 -0
- data/lib/crunchbase/models/principal.rb +112 -0
- data/lib/crunchbase/searches/client.rb +57 -6
- data/lib/crunchbase/utilities/autocomplete.rb +51 -0
- data/lib/crunchbase/utilities/cb_model.rb +32 -0
- data/lib/crunchbase/utilities/deleted_entities.rb +47 -0
- data/lib/crunchbase/utilities/entity_endpoints.rb +125 -0
- data/lib/crunchbase/utilities/request.rb +47 -8
- data/lib/crunchbase/utilities/response.rb +33 -12
- data/lib/crunchbase/utilities/search_endpoints.rb +46 -0
- data/lib/crunchbase/utilities/search_query_parameters.rb +64 -0
- data/lib/crunchbase/utilities/veriables.rb +335 -0
- data/lib/crunchbase/version.rb +1 -1
- metadata +45 -12
- data/lib/crunchbase/models/entity.rb +0 -28
- data/lib/crunchbase/searches/organization.rb +0 -52
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.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_curl
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: faraday_middleware
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,10 +108,10 @@ dependencies:
|
|
94
108
|
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
|
-
description:
|
98
|
-
|
111
|
+
description: 'Crunchbase is a ruby wrapper base on Crunchbase V4 API. it provides
|
112
|
+
easy to get the API data by each endpoint. '
|
99
113
|
email:
|
100
|
-
- encore
|
114
|
+
- encore@ekohe.com
|
101
115
|
executables: []
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
@@ -118,35 +132,54 @@ files:
|
|
118
132
|
- bin/setup
|
119
133
|
- crunchbase4.gemspec
|
120
134
|
- lib/crunchbase.rb
|
135
|
+
- lib/crunchbase/autocompletes/client.rb
|
121
136
|
- lib/crunchbase/client.rb
|
122
137
|
- lib/crunchbase/config.rb
|
138
|
+
- lib/crunchbase/deleted_entities/client.rb
|
123
139
|
- lib/crunchbase/entities.rb
|
124
140
|
- lib/crunchbase/entities/client.rb
|
125
141
|
- lib/crunchbase/errors.rb
|
126
142
|
- lib/crunchbase/models.rb
|
143
|
+
- lib/crunchbase/models/acquisition.rb
|
144
|
+
- lib/crunchbase/models/address.rb
|
145
|
+
- lib/crunchbase/models/autocomplete_entity.rb
|
127
146
|
- lib/crunchbase/models/category.rb
|
128
147
|
- lib/crunchbase/models/category_group.rb
|
129
|
-
- lib/crunchbase/models/entity.rb
|
148
|
+
- lib/crunchbase/models/concerns/entity.rb
|
149
|
+
- lib/crunchbase/models/concerns/mappings.rb
|
150
|
+
- lib/crunchbase/models/deleted_entity.rb
|
151
|
+
- lib/crunchbase/models/event_appearance.rb
|
152
|
+
- lib/crunchbase/models/fund.rb
|
130
153
|
- lib/crunchbase/models/funding_round.rb
|
131
154
|
- lib/crunchbase/models/investment.rb
|
155
|
+
- lib/crunchbase/models/ipo.rb
|
156
|
+
- lib/crunchbase/models/job.rb
|
132
157
|
- lib/crunchbase/models/organization.rb
|
158
|
+
- lib/crunchbase/models/ownership.rb
|
133
159
|
- lib/crunchbase/models/person.rb
|
134
160
|
- lib/crunchbase/models/press_reference.rb
|
161
|
+
- lib/crunchbase/models/principal.rb
|
135
162
|
- lib/crunchbase/searches.rb
|
136
163
|
- lib/crunchbase/searches/client.rb
|
137
|
-
- lib/crunchbase/searches/organization.rb
|
138
164
|
- lib/crunchbase/utilities.rb
|
165
|
+
- lib/crunchbase/utilities/autocomplete.rb
|
166
|
+
- lib/crunchbase/utilities/cb_model.rb
|
167
|
+
- lib/crunchbase/utilities/deleted_entities.rb
|
168
|
+
- lib/crunchbase/utilities/entity_endpoints.rb
|
139
169
|
- lib/crunchbase/utilities/request.rb
|
140
170
|
- lib/crunchbase/utilities/response.rb
|
171
|
+
- lib/crunchbase/utilities/search_endpoints.rb
|
172
|
+
- lib/crunchbase/utilities/search_query_parameters.rb
|
173
|
+
- lib/crunchbase/utilities/veriables.rb
|
141
174
|
- lib/crunchbase/version.rb
|
142
|
-
homepage: https://github.com/
|
175
|
+
homepage: https://github.com/ekohe/crunchbase4
|
143
176
|
licenses:
|
144
177
|
- MIT
|
145
178
|
metadata:
|
146
179
|
allowed_push_host: https://rubygems.org
|
147
|
-
homepage_uri: https://github.com/
|
148
|
-
source_code_uri: https://github.com/
|
149
|
-
changelog_uri: https://github.com/
|
180
|
+
homepage_uri: https://github.com/ekohe/crunchbase4
|
181
|
+
source_code_uri: https://github.com/ekohe/crunchbase4
|
182
|
+
changelog_uri: https://github.com/ekohe/crunchbase4/blob/master/CHANGELOG.md
|
150
183
|
post_install_message: Thanks for installing!
|
151
184
|
rdoc_options: []
|
152
185
|
require_paths:
|
@@ -165,5 +198,5 @@ requirements: []
|
|
165
198
|
rubygems_version: 3.0.3
|
166
199
|
signing_key:
|
167
200
|
specification_version: 4
|
168
|
-
summary:
|
201
|
+
summary: Crunchbase is a ruby wrapper base on Crunchbase V4 API
|
169
202
|
test_files: []
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Crunchbase
|
4
|
-
# Get the Organization data from API
|
5
|
-
module Models
|
6
|
-
# Root
|
7
|
-
class Entity
|
8
|
-
include ::Crunchbase::Utilities::Response
|
9
|
-
|
10
|
-
def fields
|
11
|
-
field_ids.map(&:to_sym)
|
12
|
-
end
|
13
|
-
|
14
|
-
def parse_response(response)
|
15
|
-
dynamic_attributes(self, field_ids, response.dig('properties'))
|
16
|
-
end
|
17
|
-
|
18
|
-
def parse_cards_response(response)
|
19
|
-
parse_response(response, response.dig('properties'))
|
20
|
-
# response.dig('cards')
|
21
|
-
end
|
22
|
-
|
23
|
-
def as_json
|
24
|
-
fields.each_with_object({}) { |item, hash| hash[item] = send(item) }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Crunchbase
|
4
|
-
# Whole Searches endpoints
|
5
|
-
module Searches
|
6
|
-
# Send request for entities endpoints
|
7
|
-
class Organization < Client
|
8
|
-
include ::Crunchbase::Utilities::Request
|
9
|
-
|
10
|
-
def endpoint
|
11
|
-
::Crunchbase::Models::Organization::RESOURCE_LIST
|
12
|
-
end
|
13
|
-
|
14
|
-
def query_conditions
|
15
|
-
{
|
16
|
-
"field_ids": field_ids,
|
17
|
-
"order": orders,
|
18
|
-
"query": conditions,
|
19
|
-
"limit": LIMIT
|
20
|
-
}
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def field_ids
|
26
|
-
::Crunchbase::Models::Organization.new.basis_fields
|
27
|
-
end
|
28
|
-
|
29
|
-
def orders
|
30
|
-
[
|
31
|
-
{
|
32
|
-
"field_id": 'name',
|
33
|
-
"sort": 'asc'
|
34
|
-
}
|
35
|
-
]
|
36
|
-
end
|
37
|
-
|
38
|
-
def conditions
|
39
|
-
[
|
40
|
-
{
|
41
|
-
"type": 'predicate',
|
42
|
-
"field_id": @field,
|
43
|
-
"operator_id": 'includes',
|
44
|
-
"values": [
|
45
|
-
@value
|
46
|
-
]
|
47
|
-
}
|
48
|
-
]
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|