crunchbase4 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84f43d773473d40462a4eead8f4548aaa15eb10b2c5dff849b50d07f579fddf5
4
- data.tar.gz: 7f34006abc99d5106cdf7a261adade5e72d8db7be3d68a1cbd3bccdfb8e1d10b
3
+ metadata.gz: cdb7c5623a3de943904cfb33279384f6af90794bd04422502300a1f3a6734fd4
4
+ data.tar.gz: dcdb6527385ea1cf7bfdf9e59b5919ccbba6239673b596b015117eae40e0ee29
5
5
  SHA512:
6
- metadata.gz: ab8418cc8cb8739460bb1335092dee1f9110e9453f4ab61bca6430ad0250251db887e5cf95637fb0d1f319030a4b16ad0e188c3c925b9c63ea1aa2fd257da25b
7
- data.tar.gz: 67c78499a471c58315b1ff8d6c4abd5fe262dda55cfd2d67edf74be77d701a4e777db43cb1b6d38cb7d4cd1e0f6642b93b52f5608ee5df741830103378d5ff3d
6
+ metadata.gz: 73f00d14346138c7631c09338800ceecd2e67106351401a5c2bd7956ed53bd66d26cbfc95e52409e4e97800112cfabe4ddff3c139cbe48c4021bba0aee8760b2
7
+ data.tar.gz: dd131ff9d6f0ebcf6cf18df11b06d170db839117084bd6a6e995bbdeadffe15dda5a9a0e4b95a89c232a5efbe003c8ba0b748ac5d4e730f7522751024e44c2e1
@@ -9,12 +9,12 @@
9
9
  * After
10
10
  - Get organzation's fund: (`client.organization(entity_id, card_id: 'fund')`)
11
11
  - Method for uniformly obtaining deleted entities data and support more query condition
12
- * Get deleted organzations
13
- - Before: (`client.deleted_organzations`)
12
+ * Get deleted organizations
13
+ - Before: (`client.deleted_organizations`)
14
14
  - After : (`client.deleted_entities(collection_ids: 'organizations', limit: 20)`)
15
15
  - Method for uniformly obtaining autocompletes entities data and support more query condition
16
- * Get autocompletes organzations
17
- - Before: (`client.autocomplete_organzations`)
16
+ * Get autocompletes organizations
17
+ - Before: (`client.autocomplete_organizations`)
18
18
  - After : (`client.autocomplete('ekohe', collection_ids: 'organizations', limit: 3)`)
19
19
 
20
20
  ## [0.1.4] - 2020-06-12
@@ -38,11 +38,11 @@
38
38
 
39
39
  ### Added
40
40
  - Implemented searches APIs to get the recent updates entities on Search
41
- - organzations
41
+ - organizations
42
42
  - people
43
43
  - funding rounds
44
44
  - Implemented `autocompletes` API to allow user filter entities by keyword
45
- - organzations
45
+ - organizations
46
46
  - people
47
47
  - funding rounds
48
48
 
@@ -50,7 +50,7 @@
50
50
 
51
51
  ### Added
52
52
  - Implemented APIs to get acquisition and investment of Entity
53
- - Implemented APIs to search organzations and funding rounds of Search
53
+ - Implemented APIs to search organizations and funding rounds of Search
54
54
 
55
55
  ### Changed
56
56
  - Refactor the API client to support search API
data/README.md CHANGED
@@ -56,7 +56,7 @@ pry(main)> client = Crunchbase::Client.new
56
56
  - [Deleted Entities](https://github.com/ekohe/crunchbase4#deleted-entities)
57
57
 
58
58
  ```ruby
59
- <!-- Entity and Single Card -->
59
+ <!-- Examples of organization and single card -->
60
60
  response = client.organization('ekohe')
61
61
  ipos = client.organization('ekohe', card_id: 'ipos')
62
62
  fund = client.organization('ekohe', card_id: 'fund')
@@ -67,15 +67,25 @@ jobs = client.organization('ekohe', card_id: 'jobs')
67
67
  headquarters_address = client.organization('ekohe', card_id: 'headquarters_address')
68
68
  top_2_press_references = client.organization('ekohe', card_id: 'press_references', limit: 2)
69
69
 
70
+ <!-- Examples to get the funding rounds of the organization through paging -->
71
+ response = client.organization(
72
+ 'facebook', card_id: 'participated_funding_rounds',
73
+ limit: 5,
74
+ order: 'announced_on:desc',
75
+ after_id: '3cdfcecd-5377-439b-acab-cefcf6fe21a5'
76
+ )
77
+
78
+ <!-- Examples of person and single card -->
79
+
70
80
  response = client.person('mark-zuckerberg')
71
81
  response = client.person('mark-zuckerberg', card_id: 'participated_investments')
72
- response = client.funding_round('371c20af8aa94bcba8da0694d138f247')
73
- response = client.funding_round('371c20af8aa94bcba8da0694d138f247', card_id: 'investors')
82
+ response = client.funding_round('3cdfcecd-5377-439b-acab-cefcf6fe21a5')
83
+ response = client.funding_round('3cdfcecd-5377-439b-acab-cefcf6fe21a5', card_id: 'investors')
74
84
  response = client.acquisition('7638eae9-07b7-4fc6-ad20-5d99de3ff928')
75
85
  response = client.fund('aeaac12b-df56-7039-40f9-f1992f88e20e')
76
86
  response = client.ownership('4506d9ce-85d3-4a8f-89cd-07a225359d55')
77
87
 
78
- <!-- Get the JSON response of Entity -->
88
+ <!-- Get the JSON response of entity -->
79
89
 
80
90
  response.as_json
81
91
 
@@ -17,7 +17,7 @@ module Crunchbase
17
17
  # Defined Veriables for the data Category or Types
18
18
  #
19
19
  # Crunchbase::Utils.constants => [
20
- # :OPERATING_STATUS,
20
+ # :OPERATING_STATUS,
21
21
  # :PROGRAM_TYPES,
22
22
  # :REVENUE_RANGES,
23
23
  # :COMPANY_TYPES,
@@ -12,7 +12,7 @@ module Crunchbase
12
12
  include Mappings
13
13
 
14
14
  def fields
15
- field_ids.map(&:to_sym)
15
+ field_ids.concat(custom_fields).map(&:to_sym)
16
16
  end
17
17
 
18
18
  def parse_response(response, request_field_ids = [], cards = [])
@@ -43,6 +43,11 @@ module Crunchbase
43
43
  def as_json
44
44
  fields.each_with_object({}) { |item, hash| hash[item] = send(item) }
45
45
  end
46
+
47
+ private
48
+ def custom_fields
49
+ []
50
+ end
46
51
  end
47
52
  end
48
53
  end
@@ -134,6 +134,15 @@ module Crunchbase
134
134
  headquarters_address
135
135
  ]
136
136
  end
137
+
138
+ def employees_range
139
+ Crunchbase::Utils::NUM_EMPLOYEES_ENUM[num_employees_enum]
140
+ end
141
+
142
+ private
143
+ def custom_fields
144
+ %w[employees_range]
145
+ end
137
146
  end
138
147
  end
139
148
  end
@@ -142,7 +142,7 @@ module Crunchbase
142
142
  'online_and_on_campus' => 'Online and On Campus'
143
143
  }.freeze
144
144
 
145
- SCHOOL_METHODS = {
145
+ SCHOOL_PROGRAMS = {
146
146
  'bootcamp' => 'Bootcamp',
147
147
  'community_college' => 'Community College',
148
148
  'four_year_university' => 'Four Year University',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crunchbase
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
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.5
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-06-26 00:00:00.000000000 Z
11
+ date: 2020-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  requirements: []
198
198
  rubygems_version: 3.0.3
199
- signing_key:
199
+ signing_key:
200
200
  specification_version: 4
201
201
  summary: Crunchbase is a ruby wrapper base on Crunchbase V4 API
202
202
  test_files: []