crunchbase4 0.1.9 → 0.2.1
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/CHANGELOG.md +11 -0
- data/Gemfile.lock +2 -2
- data/README.md +25 -8
- data/crunchbase4.gemspec +2 -2
- data/lib/crunchbase/models/organization.rb +10 -0
- data/lib/crunchbase/utilities/request.rb +8 -4
- data/lib/crunchbase/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 971654d5b778699371f2018a2875e6e463568ac74594fa7538ea3631eab06a5f
|
|
4
|
+
data.tar.gz: 1841c00ac046c7ee260fd19acfce5201c3ae18ee5e1950f2394ea99637827955
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fce7337167a7315926f1200a24019d9edf90418d9a29a877c273573b8522d836ce28ae75bd8b3c34ec633e5becbb547eac231da8d80f2a9f2cde30a5af66f496
|
|
7
|
+
data.tar.gz: 0440b78a9dcb051757b313cab629db2dd1a8e3cedc20a46e4cea88e881f599ec1408c7acf87320de08ed01e71cbf5054533d2d0c3de53316a995e3da1a21d42a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [0.2.1] - 2022-10-10
|
|
4
|
+
|
|
5
|
+
### New fields in organization and API version
|
|
6
|
+
- Add the following fields to the organization model
|
|
7
|
+
- diversity_spotlights
|
|
8
|
+
- num_diversity_spotlight_investments
|
|
9
|
+
- valuation
|
|
10
|
+
- valuation_date
|
|
11
|
+
- website_url
|
|
12
|
+
- Corrected API URL version number from 1.0.1 to 1.0.3
|
|
13
|
+
|
|
3
14
|
## [0.1.9] - 2021-10-04
|
|
4
15
|
|
|
5
16
|
### Allow to export Daily CSV bulk
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
crunchbase4 (0.1
|
|
4
|
+
crunchbase4 (0.2.1)
|
|
5
5
|
faraday
|
|
6
6
|
faraday_curl
|
|
7
7
|
faraday_middleware
|
|
@@ -38,7 +38,7 @@ GEM
|
|
|
38
38
|
faraday-rack (1.0.0)
|
|
39
39
|
faraday_curl (0.0.2)
|
|
40
40
|
faraday (>= 0.9.0)
|
|
41
|
-
faraday_middleware (1.
|
|
41
|
+
faraday_middleware (1.2.0)
|
|
42
42
|
faraday (~> 1.0)
|
|
43
43
|
hashdiff (1.0.1)
|
|
44
44
|
httparty (0.20.0)
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Crunchbase4
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Crunchbase4 is a ruby wrapper based on Crunchbase V4 API, it provides easy to get the API data by each endpoint. [Crunchbase Enterprise API, 2021-07-16](https://app.swaggerhub.com/apis/Crunchbase/crunchbase-enterprise_api/1.0.3)
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/rb/crunchbase4)
|
|
6
6
|
[](https://travis-ci.org/ekohe/crunchbase4)
|
|
@@ -23,16 +23,33 @@ Or install it yourself as:
|
|
|
23
23
|
|
|
24
24
|
## Getting Started
|
|
25
25
|
|
|
26
|
+
#### Crunchbase API Infos
|
|
27
|
+
|
|
28
|
+
- Title: Crunchbase Enterprise API
|
|
29
|
+
- Last Updated Date: 2021-07-16
|
|
30
|
+
- Servers URL: https://api.crunchbase.com/api/v4
|
|
31
|
+
- API Reference doc: https://data.crunchbase.com/docs
|
|
32
|
+
- Tags
|
|
33
|
+
- Autocomplete
|
|
34
|
+
- Deleted Entities
|
|
35
|
+
- Entity
|
|
36
|
+
- Search
|
|
37
|
+
|
|
26
38
|
#### Configure your certificate for API
|
|
27
39
|
|
|
28
40
|
```ruby
|
|
29
|
-
require '
|
|
41
|
+
require 'crunchbase'
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
Crunchbase.config.user_key =
|
|
33
|
-
Crunchbase.config.
|
|
43
|
+
config = YAML.load(File.read('spec/crunchbase.yml'))
|
|
44
|
+
Crunchbase.config.user_key = config['user_key']
|
|
45
|
+
Crunchbase.config.debug = config['debug'] || false # If you want to know the request information, can set the debug = true
|
|
34
46
|
```
|
|
35
47
|
|
|
48
|
+
#### If you want to use it in Rails Application, simple way to create a file `crunchbase.rb` in `config/initializers`
|
|
49
|
+
|
|
50
|
+
- and put the above info(https://github.com/ekohe/crunchbase4#configure-your-certificate-for-api) into the new file
|
|
51
|
+
|
|
52
|
+
|
|
36
53
|
## Usage
|
|
37
54
|
|
|
38
55
|
#### Class: `Client` for API
|
|
@@ -148,7 +165,7 @@ pry(main)> Crunchbase::Utils::COMPANY_TYPES
|
|
|
148
165
|
```ruby
|
|
149
166
|
pry(main)> response = client.organization('ekohe')
|
|
150
167
|
=> #<Crunchbase::Models::Organization:0x00007fbc5cfdf2f8
|
|
151
|
-
@categories=["Apps", "Artificial Intelligence", "Big Data", "
|
|
168
|
+
@categories=["Apps", "Artificial Intelligence", "Big Data", "Blockchain", "Cryptocurrency", "Enterprise Software", "iOS", "Machine Learning", "Retail", "UX Design"],
|
|
152
169
|
@category_groups=["Apps", "Artificial Intelligence", "Commerce and Shopping", "Data and Analytics", "Design", "Financial Services", "Mobile", "Platforms", "Science and Engineering", "Software"],
|
|
153
170
|
@company_type="for_profit",
|
|
154
171
|
@contact_email="info@ekohe.com",
|
|
@@ -196,7 +213,7 @@ pry(main)> response = client.funding_round('371c20af-8aa9-4bcb-a8da-0694d138f247
|
|
|
196
213
|
@funded_organization_categories=nil,
|
|
197
214
|
@funded_organization_description="Facebook is an online social networking service that enables its users to connect with friends and family.",
|
|
198
215
|
@funded_organization_funding_stage="ipo",
|
|
199
|
-
@funded_organization_funding_total=
|
|
216
|
+
@funded_organization_funding_total=16122817488,
|
|
200
217
|
@funded_organization_identifier="Facebook",
|
|
201
218
|
@funded_organization_location=["Menlo Park", "California", "United States", "North America"],
|
|
202
219
|
@funded_organization_revenue_range="r_10000000",
|
data/crunchbase4.gemspec
CHANGED
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ['Encore Shao']
|
|
9
9
|
spec.email = ['encore@ekohe.com']
|
|
10
10
|
|
|
11
|
-
spec.summary = '
|
|
12
|
-
spec.description = '
|
|
11
|
+
spec.summary = 'Crunchbase4 is a ruby wrapper base on Crunchbase V4 API'
|
|
12
|
+
spec.description = 'Crunchbase4 is a ruby wrapper base on Crunchbase V4 API, it provides easy to get the API data by each endpoint.'
|
|
13
13
|
spec.homepage = 'https://github.com/ekohe/crunchbase4'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
@@ -4,6 +4,7 @@ module Crunchbase
|
|
|
4
4
|
# Get the Organization data from API
|
|
5
5
|
module Models
|
|
6
6
|
# Build Organization API
|
|
7
|
+
# rubocop:disable Metrics/ClassLength, Metrics/MethodLength
|
|
7
8
|
class Organization < Entity
|
|
8
9
|
RESOURCE_LIST = 'organizations'
|
|
9
10
|
|
|
@@ -28,6 +29,11 @@ module Crunchbase
|
|
|
28
29
|
|
|
29
30
|
def field_ids
|
|
30
31
|
%w[
|
|
32
|
+
diversity_spotlights
|
|
33
|
+
num_diversity_spotlight_investments
|
|
34
|
+
valuation
|
|
35
|
+
valuation_date
|
|
36
|
+
website_url
|
|
31
37
|
acquirer_identifier
|
|
32
38
|
categories
|
|
33
39
|
category_groups
|
|
@@ -47,6 +53,7 @@ module Crunchbase
|
|
|
47
53
|
funding_stage
|
|
48
54
|
funding_total
|
|
49
55
|
funds_total
|
|
56
|
+
hub_tags
|
|
50
57
|
image_id
|
|
51
58
|
image_url
|
|
52
59
|
investor_identifiers
|
|
@@ -58,6 +65,8 @@ module Crunchbase
|
|
|
58
65
|
last_funding_at
|
|
59
66
|
last_funding_total
|
|
60
67
|
last_funding_type
|
|
68
|
+
last_key_employee_change_date
|
|
69
|
+
last_layoff_date
|
|
61
70
|
layout_id
|
|
62
71
|
listed_stock_symbol
|
|
63
72
|
location_group_identifiers
|
|
@@ -145,5 +154,6 @@ module Crunchbase
|
|
|
145
154
|
%w[employees_range]
|
|
146
155
|
end
|
|
147
156
|
end
|
|
157
|
+
# rubocop:enable Metrics/ClassLength, Metrics/MethodLength
|
|
148
158
|
end
|
|
149
159
|
end
|
|
@@ -44,9 +44,11 @@ module Crunchbase
|
|
|
44
44
|
faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
|
|
45
45
|
end.post(uri, args)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
resp_body = response.body
|
|
48
|
+
resp_status = response.status
|
|
49
|
+
return resp_body if resp_status == 200
|
|
48
50
|
|
|
49
|
-
raise Error,
|
|
51
|
+
raise Error, resp_body.is_a?(Array) ? resp_body[0]['message'] : resp_body['error']
|
|
50
52
|
end
|
|
51
53
|
|
|
52
54
|
private
|
|
@@ -58,9 +60,11 @@ module Crunchbase
|
|
|
58
60
|
faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
|
|
59
61
|
end.get(uri, *args)
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
resp_body = response.body
|
|
64
|
+
resp_status = response.status
|
|
65
|
+
return resp_body if resp_status == 200
|
|
62
66
|
|
|
63
|
-
raise Error,
|
|
67
|
+
raise Error, resp_body.is_a?(Array) ? resp_body[0]['message'] : resp_body['error']
|
|
64
68
|
end
|
|
65
69
|
|
|
66
70
|
def debug_mode?
|
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.2.1
|
|
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: 2022-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -122,8 +122,8 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
-
description:
|
|
126
|
-
easy to get the API data by each endpoint.
|
|
125
|
+
description: Crunchbase4 is a ruby wrapper base on Crunchbase V4 API, it provides
|
|
126
|
+
easy to get the API data by each endpoint.
|
|
127
127
|
email:
|
|
128
128
|
- encore@ekohe.com
|
|
129
129
|
executables: []
|
|
@@ -212,8 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
212
212
|
- !ruby/object:Gem::Version
|
|
213
213
|
version: '0'
|
|
214
214
|
requirements: []
|
|
215
|
-
rubygems_version: 3.
|
|
215
|
+
rubygems_version: 3.0.3
|
|
216
216
|
signing_key:
|
|
217
217
|
specification_version: 4
|
|
218
|
-
summary:
|
|
218
|
+
summary: Crunchbase4 is a ruby wrapper base on Crunchbase V4 API
|
|
219
219
|
test_files: []
|