crunchbase4 0.1.1 → 0.1.6
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 +5 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +1 -1
- data/README.md +392 -40
- data/crunchbase4.gemspec +2 -2
- data/lib/crunchbase.rb +30 -1
- data/lib/crunchbase/autocompletes/client.rb +75 -0
- data/lib/crunchbase/client.rb +4 -0
- data/lib/crunchbase/deleted_entities/client.rb +69 -0
- data/lib/crunchbase/entities/client.rb +24 -12
- data/lib/crunchbase/models.rb +10 -1
- data/lib/crunchbase/models/address.rb +36 -0
- data/lib/crunchbase/models/autocomplete_entity.rb +25 -0
- data/lib/crunchbase/models/concerns/entity.rb +53 -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/ipo.rb +48 -0
- data/lib/crunchbase/models/job.rb +42 -0
- data/lib/crunchbase/models/organization.rb +9 -0
- data/lib/crunchbase/models/ownership.rb +39 -0
- data/lib/crunchbase/models/principal.rb +112 -0
- data/lib/crunchbase/utilities/autocomplete.rb +51 -0
- data/lib/crunchbase/utilities/deleted_entities.rb +47 -0
- data/lib/crunchbase/utilities/entity_endpoints.rb +58 -24
- data/lib/crunchbase/utilities/request.rb +28 -11
- data/lib/crunchbase/utilities/response.rb +1 -1
- data/lib/crunchbase/utilities/search_endpoints.rb +22 -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 +23 -7
- data/lib/crunchbase/models/entity.rb +0 -32
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.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: 'Crunchbase is a ruby wrapper base on Crunchbase V4 API.
|
111
|
+
description: 'Crunchbase is a ruby wrapper base on Crunchbase V4 API. it provides
|
112
112
|
easy to get the API data by each endpoint. '
|
113
113
|
email:
|
114
114
|
- encore@ekohe.com
|
@@ -132,29 +132,45 @@ files:
|
|
132
132
|
- bin/setup
|
133
133
|
- crunchbase4.gemspec
|
134
134
|
- lib/crunchbase.rb
|
135
|
+
- lib/crunchbase/autocompletes/client.rb
|
135
136
|
- lib/crunchbase/client.rb
|
136
137
|
- lib/crunchbase/config.rb
|
138
|
+
- lib/crunchbase/deleted_entities/client.rb
|
137
139
|
- lib/crunchbase/entities.rb
|
138
140
|
- lib/crunchbase/entities/client.rb
|
139
141
|
- lib/crunchbase/errors.rb
|
140
142
|
- lib/crunchbase/models.rb
|
141
143
|
- lib/crunchbase/models/acquisition.rb
|
144
|
+
- lib/crunchbase/models/address.rb
|
145
|
+
- lib/crunchbase/models/autocomplete_entity.rb
|
142
146
|
- lib/crunchbase/models/category.rb
|
143
147
|
- lib/crunchbase/models/category_group.rb
|
144
|
-
- 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
|
145
153
|
- lib/crunchbase/models/funding_round.rb
|
146
154
|
- lib/crunchbase/models/investment.rb
|
155
|
+
- lib/crunchbase/models/ipo.rb
|
156
|
+
- lib/crunchbase/models/job.rb
|
147
157
|
- lib/crunchbase/models/organization.rb
|
158
|
+
- lib/crunchbase/models/ownership.rb
|
148
159
|
- lib/crunchbase/models/person.rb
|
149
160
|
- lib/crunchbase/models/press_reference.rb
|
161
|
+
- lib/crunchbase/models/principal.rb
|
150
162
|
- lib/crunchbase/searches.rb
|
151
163
|
- lib/crunchbase/searches/client.rb
|
152
164
|
- lib/crunchbase/utilities.rb
|
165
|
+
- lib/crunchbase/utilities/autocomplete.rb
|
153
166
|
- lib/crunchbase/utilities/cb_model.rb
|
167
|
+
- lib/crunchbase/utilities/deleted_entities.rb
|
154
168
|
- lib/crunchbase/utilities/entity_endpoints.rb
|
155
169
|
- lib/crunchbase/utilities/request.rb
|
156
170
|
- lib/crunchbase/utilities/response.rb
|
157
171
|
- lib/crunchbase/utilities/search_endpoints.rb
|
172
|
+
- lib/crunchbase/utilities/search_query_parameters.rb
|
173
|
+
- lib/crunchbase/utilities/veriables.rb
|
158
174
|
- lib/crunchbase/version.rb
|
159
175
|
homepage: https://github.com/ekohe/crunchbase4
|
160
176
|
licenses:
|
@@ -163,7 +179,7 @@ metadata:
|
|
163
179
|
allowed_push_host: https://rubygems.org
|
164
180
|
homepage_uri: https://github.com/ekohe/crunchbase4
|
165
181
|
source_code_uri: https://github.com/ekohe/crunchbase4
|
166
|
-
changelog_uri: https://github.com/ekohe/crunchbase4/CHANGELOG.md
|
182
|
+
changelog_uri: https://github.com/ekohe/crunchbase4/blob/master/CHANGELOG.md
|
167
183
|
post_install_message: Thanks for installing!
|
168
184
|
rdoc_options: []
|
169
185
|
require_paths:
|
@@ -180,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
196
|
version: '0'
|
181
197
|
requirements: []
|
182
198
|
rubygems_version: 3.0.3
|
183
|
-
signing_key:
|
199
|
+
signing_key:
|
184
200
|
specification_version: 4
|
185
201
|
summary: Crunchbase is a ruby wrapper base on Crunchbase V4 API
|
186
202
|
test_files: []
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../utilities/response'
|
4
|
-
|
5
|
-
module Crunchbase
|
6
|
-
# Get the Organization data from API
|
7
|
-
module Models
|
8
|
-
# Root
|
9
|
-
class Entity
|
10
|
-
include ::Crunchbase::Utilities::Response
|
11
|
-
|
12
|
-
def fields
|
13
|
-
field_ids.map(&:to_sym)
|
14
|
-
end
|
15
|
-
|
16
|
-
def parse_response(response, request_field_ids = [])
|
17
|
-
extract_fields = (request_field_ids.empty? ? field_ids : request_field_ids)
|
18
|
-
|
19
|
-
dynamic_attributes(self, extract_fields, response.dig('properties'))
|
20
|
-
end
|
21
|
-
|
22
|
-
def parse_cards_response(response)
|
23
|
-
parse_response(response, response.dig('properties'))
|
24
|
-
# response.dig('cards')
|
25
|
-
end
|
26
|
-
|
27
|
-
def as_json
|
28
|
-
fields.each_with_object({}) { |item, hash| hash[item] = send(item) }
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|