crunchbase4 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 116da8bf7036e9d4dba37ed63c85c7fa7cf44fa11c16f291045db209f4ab81b2
4
- data.tar.gz: cb9d52123e679160e5055c6aeefbcf30be6924499f050105fa723c9412988587
3
+ metadata.gz: cb7a01707e086f0d73d6a92807f4d0a9e2dfab44e73647254781103792817373
4
+ data.tar.gz: b61240087a0344caf96bb065fa9c309f83e19d2357d805f74278cf2bda9381cc
5
5
  SHA512:
6
- metadata.gz: a9cb04ffe4ed809a86743d76f2c815616b1d19ee132bf44fe04dc0fcd0d69265871cd4a827083a591630a9514c2f9d07c441a5bc9461ab14c4b3b31f021fc6bf
7
- data.tar.gz: 66a0327303a29efc601bac09788f8cd363bde4aedb0245f56d85d6c39eae02f531e1cbae6bd21db3c01e140e27a5c0f70c6bee069b761364902b69b2d3d194b9
6
+ metadata.gz: b08389e81858a042b5204787ef8c25a78f712f23688cfb40e81a428298205748158d2e5380a9a24551b896c103212dab8b10b183e4d5ef8d357fb0b0c02f3515
7
+ data.tar.gz: cc99c470c8838170978d862a738283ca2481bbf75deeeb9e4760b46902321ddd3469e31e6e01183917cea54794a20187c0b1648ba2962ce675a1bf6ccac3bea1
@@ -35,6 +35,11 @@ Metrics/BlockLength:
35
35
  Max: 200
36
36
  Exclude:
37
37
  - spec/entities/client_spec.rb
38
+ - spec/client_spec.rb
38
39
 
39
40
  Layout/LineLength:
40
41
  Max: 200
42
+
43
+ Metrics/ModuleLength:
44
+ Exclude:
45
+ - lib/crunchbase/utilities/veriables.rb
@@ -0,0 +1,34 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.2] - 2020-06-07
6
+
7
+ ### Added
8
+ - Implemented searches APIs to get the recent updates entities on Search
9
+ - organzations
10
+ - people
11
+ - funding rounds
12
+ - Implemented autocomplete API to allow user filter entities by keyword
13
+ - organzations
14
+ - people
15
+ - funding rounds
16
+
17
+ ## [0.1.1] - 2020-06-06
18
+
19
+ ### Added
20
+ - Implemented APIs to get acquisition and investment of Entity
21
+ - Implemented APIs to search organzations and funding rounds of Search
22
+
23
+ ### Changed
24
+ - Refactor the API client to support search API
25
+
26
+ ## [0.1.0] - 2020-06-04
27
+
28
+ ### Added
29
+
30
+ - Implemented APIs to get organzation and funding round of Entity
31
+
32
+ ## [0.0.0] - 2020-06-01
33
+
34
+ - Learning the Crunchbase V4 document and ready to create the new Gem
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crunchbase4 (0.1.0)
4
+ crunchbase4 (0.1.2)
5
5
  faraday
6
6
  faraday_curl
7
7
  faraday_middleware
data/README.md CHANGED
@@ -186,6 +186,25 @@ pry(main)> response = client.investment('1368da0c-07b0-46ef-9a86-b518367e60d6')
186
186
  }
187
187
  ```
188
188
 
189
+ #### Get the latest updated entities
190
+
191
+ Allow user using the method `recent_updates(args)` to get recent updates for each endpoint on searches
192
+
193
+ # Example to get recent updated organizations
194
+
195
+ ```
196
+ args = {
197
+ scope_name: 'organization', # must
198
+ date: '2020-05-05', # must
199
+ field_ids: %w[name website permalink], # default %[uuid created_at updated_at]
200
+ sort: 'desc' # default `desc`
201
+ before_id: 'uuid' # optional
202
+ after_id: 'uuid' # optional
203
+ }
204
+
205
+ response = client.recent_updates(args)
206
+ ```
207
+
189
208
  #### Search organizations by query conditions and order
190
209
 
191
210
  * Step1: Needs to build the query conditions
@@ -279,24 +298,213 @@ pry(main)> response = client.search_organizations(query_data)
279
298
  - Get total count: `response.total_count`
280
299
  - Get entities count: `response.count`
281
300
 
301
+ #### Search people by query conditions and order
302
+
303
+ * Step1: Needs to build the query conditions
304
+
305
+ ```
306
+ query_data = {
307
+ 'field_ids' => %w[
308
+ first_name
309
+ last_name
310
+ uuid
311
+ permalink
312
+ name
313
+ ],
314
+ 'order' => [
315
+ {
316
+ 'field_id' => 'last_name',
317
+ 'sort' => 'asc',
318
+ 'nulls' => 'last'
319
+ }
320
+ ],
321
+ 'query' => [
322
+ {
323
+ 'type' => 'predicate',
324
+ 'field_id' => 'first_name',
325
+ 'operator_id' => 'contains',
326
+ 'values' => [
327
+ 'Maxime'
328
+ ]
329
+ },
330
+ {
331
+ 'type' => 'predicate',
332
+ 'field_id' => 'last_name',
333
+ 'operator_id' => 'contains',
334
+ 'values' => [
335
+ 'Guilbot'
336
+ ]
337
+ }
338
+ ],
339
+ 'limit' => 5
340
+ }
341
+ ```
342
+
343
+ * Use `client` to send a request and parse response
344
+
345
+ ```
346
+ pry(main)> response = client.search_people(query_data)
347
+ => #<Crunchbase::Searches::Client:0x00007f9acca12d18
348
+ @conditions=
349
+ {"field_ids"=>["first_name", "last_name", "uuid", "permalink", "name"],
350
+ "order"=>[{"field_id"=>"last_name", "sort"=>"asc", "nulls"=>"last"}],
351
+ "query"=>
352
+ [{"type"=>"predicate", "field_id"=>"first_name", "operator_id"=>"contains", "values"=>["Maxime"]}, {"type"=>"predicate", "field_id"=>"last_name", "operator_id"=>"contains", "values"=>["Guilbot"]}],
353
+ "limit"=>5},
354
+ @count=1,
355
+ @entities=[#<Crunchbase::Models::Person:0x00007f9acca43418 @first_name="Maxime", @last_name="Guilbot", @name="Maxime Guilbot", @permalink="maxime-guilbot", @uuid="90f4c92e-3479-1f6e-6470-b2ae78805839">],
356
+ @entity_type="person",
357
+ @kclass_name=Crunchbase::Models::Person,
358
+ @total_count=1>
359
+ pry(main)> response.entities
360
+ => [#<Crunchbase::Models::Person:0x00007f9acca43418 @first_name="Maxime", @last_name="Guilbot", @name="Maxime Guilbot", @permalink="maxime-guilbot", @uuid="90f4c92e-3479-1f6e-6470-b2ae78805839">]
361
+ pry(main)> response.total_count
362
+ => 1
363
+ ```
364
+
365
+ ## Autocompletes
366
+
367
+ ### Allow users to filter by keyword from these endpoints
368
+
369
+ Search by keyword has been supported in "Organization", "People" and "Fund Round"
370
+
371
+ 1. Example: Search in an organization by keyword
372
+
373
+ ```
374
+ pry(main)> response = client.autocomplete_organizations('ekohe')
375
+ => #<Crunchbase::Autocompletes::Client:0x00007fecb34ce1e8
376
+ @conditions={:query=>"ekohe", :collection_ids=>"organizations"},
377
+ @count=25,
378
+ @entities=
379
+ [#<Crunchbase::Models::AutocompleteEntity:0x00007fecb3976cb8
380
+ @facet_ids=["siftery", "apptopia", "company", "rank", "builtwith", "bombora", "similarweb"],
381
+ @identifier=["9fe491b2-b6a1-5c87-0f4d-226dd0cc97a9", "Ekohe", "ekohe"],
382
+ @permalink="ekohe",
383
+ @short_description="Creating cutting-edge, useful technical solutions to move you forward -- we deliver on the promise of AI.",
384
+ @uuid="9fe491b2-b6a1-5c87-0f4d-226dd0cc97a9">,
385
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb3975980
386
+ @facet_ids=["rank", "builtwith", "company", "siftery"],
387
+ @identifier=["4994381c-3f6a-07bc-6ccf-a180cfbfbf60", "Ekohealth", "ekohealth"],
388
+ @permalink="ekohealth",
389
+ @short_description="Ekohealth is an online platform, entitling the patients having Ekohealth card to avail up to 50% discount on medical expense.",
390
+ @uuid="4994381c-3f6a-07bc-6ccf-a180cfbfbf60">,
391
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb3974cb0
392
+ @facet_ids=["siftery", "apptopia", "company", "rank", "builtwith", "bombora", "similarweb"],
393
+ @identifier=["d21d2598-6f76-d6b4-458e-579bc9c3a36d", "EcoHealth Alliance", "ecohealth-alliance"],
394
+ @permalink="ecohealth-alliance",
395
+ @short_description="EcoHealth Alliance is a solutions that promote conservation and prevents pandemics.",
396
+ @uuid="d21d2598-6f76-d6b4-458e-579bc9c3a36d">,
397
+ ...]
398
+ pry(main)> response.entities
399
+ pry(main)> response.count
400
+ pry(main)> response.total_count
401
+ ```
402
+
403
+ 2. Example: Search in an people by keyword
404
+
405
+ ```
406
+ pry(main)> response = client.autocomplete_people('maxime')
407
+ => #<Crunchbase::Autocompletes::Client:0x00007fecb474f9c0
408
+ @conditions={:query=>"maxime", :collection_ids=>"people"},
409
+ @count=25,
410
+ @entities=
411
+ [#<Crunchbase::Models::AutocompleteEntity:0x00007fecb477db40
412
+ @facet_ids=["rank"],
413
+ @identifier=["e270e799-052d-60ba-86d4-9c0535556851", "Maxime Leufroy-Murat", "maxime-leufroy-murat"],
414
+ @permalink="maxime-leufroy-murat",
415
+ @short_description="Maxime Leufroy-Murat - CEO @ FG Properties",
416
+ @uuid="e270e799-052d-60ba-86d4-9c0535556851">,
417
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb477ce70
418
+ @facet_ids=["rank"],
419
+ @identifier=["0b71cab9-43dc-4f03-9267-4dcbc191ec30", "Maxime Schwab", "maxime-schwab"],
420
+ @permalink="maxime-schwab",
421
+ @short_description="Co-Founder",
422
+ @uuid="0b71cab9-43dc-4f03-9267-4dcbc191ec30">,
423
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb477c1f0
424
+ @facet_ids=["rank"],
425
+ @identifier=["527a4a8e-46e4-d808-c7df-b540bd8fedab", "Maxime Lombardini", "maxime-lombardini"],
426
+ @permalink="maxime-lombardini",
427
+ @short_description="Maxime Lombardini is Chief Executive Officer and Member of the board of Iliad since 2007. \r\n\r\nBefore joining Iliad, Maxime Lombardini use to...",
428
+ @uuid="527a4a8e-46e4-d808-c7df-b540bd8fedab">,
429
+ ...]
430
+ pry(main)> response.entities
431
+ pry(main)> response.count
432
+ pry(main)> response.total_count
433
+ ```
434
+ 2. Example: Search in an funding rounds by keyword
435
+
436
+ ```
437
+ pry(main)> pry(main)> response = client.autocomplete_funding_rounds('facebook')
438
+ => #<Crunchbase::Autocompletes::Client:0x00007fecb4dd66b8
439
+ @conditions={:query=>"facebook", :collection_ids=>"funding_rounds"},
440
+ @count=25,
441
+ @entities=
442
+ [#<Crunchbase::Models::AutocompleteEntity:0x00007fecb4e04950
443
+ @facet_ids=["rank"],
444
+ @identifier=["6fae3958-a001-27c0-fb7e-666266aedd78", "Series B - Facebook", "facebook-series-b--6fae3958"],
445
+ @permalink="facebook-series-b--6fae3958",
446
+ @short_description="Facebook raised $27500000 on 2006-04-01 in Series B",
447
+ @uuid="6fae3958-a001-27c0-fb7e-666266aedd78">,
448
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb4e17c30
449
+ @facet_ids=["rank"],
450
+ @identifier=["d950d7a5-79ff-fb93-ca87-13386b0e2feb", "Series A - Facebook", "facebook-series-a--d950d7a5"],
451
+ @permalink="facebook-series-a--d950d7a5",
452
+ @short_description="Facebook raised $12700000 on 2005-05-01 in Series A",
453
+ @uuid="d950d7a5-79ff-fb93-ca87-13386b0e2feb">,
454
+ #<Crunchbase::Models::AutocompleteEntity:0x00007fecb4e16f60
455
+ @facet_ids=["rank"],
456
+ @identifier=["59971bc0-0935-be60-e279-a9db5e787169", "Secondary Market - Facebook", "facebook-secondary-market--59971bc0"],
457
+ @permalink="facebook-secondary-market--59971bc0",
458
+ @short_description="Facebook raised $120000000 on 2010-06-28 in Secondary Market",
459
+ @uuid="59971bc0-0935-be60-e279-a9db5e787169">,
460
+ ...]
461
+ pry(main)> response.entities
462
+ pry(main)> response.count
463
+ pry(main)> response.total_count
464
+ ```
465
+
282
466
  ## Development
283
467
 
284
468
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
285
469
 
286
- ### Examples of API requests
470
+ ### Examples of API requests for each endpoint
287
471
 
288
472
  ```
289
473
  Crunchbase.config.user_key = 'user_key'
290
474
  client = Crunchbase::Client.new
475
+
476
+ <!-- Entity -->
291
477
  response = client.organization('ekohe')
292
478
  response = client.person('mark-zuckerberg')
293
479
  response = client.funding_round('371c20af8aa94bcba8da0694d138f247')
294
480
  response = client.acquisition('7638eae9-07b7-4fc6-ad20-5d99de3ff928')
481
+
482
+ <!-- Search -->
483
+ client.search_organizations(query_data)
484
+ client.search_people(query_data)
485
+ client.search_funding_rounds(query_data)
486
+ client.recent_updates({
487
+ scope_name: 'organization',
488
+ field_ids: %w[name website permalink],
489
+ date: '2020-05-05',
490
+ limit: 100
491
+ })
492
+
493
+ <!-- Autocompletes -->
494
+ response = client.autocomplete_organizations('ekohe')
495
+ response = client.autocomplete_people('encore')
496
+ response = client.autocomplete_funding_rounds('facebook')
295
497
  ```
296
498
 
499
+ ## Changelog
500
+
501
+ If you want to know what update, please check the [Changelog](https://github.com/ekohe/crunchbase4/blob/master/CHANGELOG.md).
502
+
297
503
  ## Contributing
298
504
 
299
- Bug reports and pull requests are welcome on GitHub at https://github.com/ekohe/crunchbase4. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ekohe/crunchbase4/blob/master/CODE_OF_CONDUCT.md).
505
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ekohe/crunchbase4. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected.
506
+
507
+ To see all contributors from https://github.com/ekohe/crunchbase4/graphs/contributors
300
508
 
301
509
  ## License
302
510
 
@@ -4,11 +4,40 @@ require 'crunchbase/version'
4
4
 
5
5
  require 'crunchbase/config'
6
6
  require 'crunchbase/client'
7
+ require 'crunchbase/models'
7
8
  require 'crunchbase/entities'
8
9
  require 'crunchbase/searches'
9
- require 'crunchbase/models'
10
+ require 'crunchbase/utilities/veriables'
10
11
 
12
+ # CB v4
11
13
  module Crunchbase
12
14
  API_VERSION = 'v4'
13
15
  BASE_URI = "https://api.crunchbase.com/api/#{API_VERSION}/"
16
+
17
+ # Defined Veriables for the data Category or Types
18
+ #
19
+ # Crunchbase::Utils.constants => [
20
+ # :OPERATING_STATUS,
21
+ # :PROGRAM_TYPES,
22
+ # :REVENUE_RANGES,
23
+ # :COMPANY_TYPES,
24
+ # :FACET_IDS,
25
+ # :SCHOOL_METHODS,
26
+ # :IPO_STATUS,
27
+ # :FUNDING_STAGES,
28
+ # :CURRENCY_ENUM,
29
+ # :DATE_PRECISIONS,
30
+ # :LAYOUT_IDS,
31
+ # :NUM_EMPLOYEES_ENUM,
32
+ # :FUNDING_TYPES,
33
+ # :SCHOOL_TYPES,
34
+ # :QUERY_OPERATORS,
35
+ # :STATUS,
36
+ # :STOCK_EXCHANGE_SYMBOLS
37
+ # ]
38
+ #
39
+ # Crunchbase::Utils::NUM_EMPLOYEES_ENUM
40
+ class Utils
41
+ include Utilities::Veriables
42
+ end
14
43
  end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../utilities/request'
4
+ require_relative '../utilities/cb_model'
5
+
6
+ module Crunchbase
7
+ # autocompletes endpoints
8
+ module Autocompletes
9
+ # Send request for autocompletes endpoint
10
+ #
11
+ # API doc:
12
+ # https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Autocomplete/get_autocompletes
13
+ class Client
14
+ include ::Crunchbase::Utilities::Request
15
+ include ::Crunchbase::Utilities::CbModel
16
+
17
+ attr_accessor :total_count, :count, :entities, :conditions, :entity_type
18
+
19
+ ROOT_LIST = 'autocompletes'
20
+ LIMIT = 25
21
+
22
+ def initialize(raw_data)
23
+ @conditions = raw_data
24
+ @entity_type = 'autocomplete_entity'
25
+ end
26
+
27
+ # Will include all attribute from API document
28
+ def autocompletes
29
+ wrapping!(
30
+ get(
31
+ ROOT_LIST,
32
+ autocompletes_parameters
33
+ )
34
+ )
35
+ end
36
+
37
+ private
38
+
39
+ def wrapping!(response)
40
+ query_results = search_results(response.dig('entities'))
41
+
42
+ self.total_count = response['count']
43
+ self.entities = query_results
44
+ self.count = query_results.size
45
+ self
46
+ end
47
+
48
+ # One item of organization
49
+ #
50
+ # {
51
+ # "facet_ids"=>
52
+ # ["siftery", "apptopia", "company", "rank", "builtwith", "bombora", "similarweb"],
53
+ # "identifier"=>
54
+ # {
55
+ # "uuid"=>"9fe491b2-b6a1-5c87-0f4d-226dd0cc97a9",
56
+ # "value"=>"Ekohe",
57
+ # "image_id"=>"v1500646625/zhionn8nlgbkz4lj7ilz.png",
58
+ # "permalink"=>"ekohe",
59
+ # "entity_def_id"=>"organization"
60
+ # },
61
+ # "short_description"=>
62
+ # "Creating cutting-edge, useful technical solutions to move you forward -- we deliver on the promise of AI."
63
+ # }
64
+ def search_results(entities)
65
+ entities.each_with_object([]) do |entity, objects|
66
+ objects << cbobject.parse_response(entity)
67
+ end
68
+ end
69
+
70
+ def autocompletes_parameters
71
+ @conditions.merge(limit: @conditions[:limit] || LIMIT)
72
+ end
73
+ end
74
+ end
75
+ end
@@ -2,11 +2,15 @@
2
2
 
3
3
  require_relative 'utilities/entity_endpoints'
4
4
  require_relative 'utilities/search_endpoints'
5
+ require_relative 'utilities/autocomplete'
6
+ require_relative 'utilities/deleted_entities'
5
7
 
6
8
  module Crunchbase
7
9
  # API Request
8
10
  class Client
9
11
  include Utilities::EntityEndpoints
10
12
  include Utilities::SearchEndpoints
13
+ include Utilities::Autocomplete
14
+ include Utilities::DeletedEntities
11
15
  end
12
16
  end
@@ -4,6 +4,7 @@ module Crunchbase
4
4
  # Models
5
5
  module Models
6
6
  autoload :Entity, 'crunchbase/models/entity'
7
+ autoload :AutocompleteEntity, 'crunchbase/models/autocomplete_entity'
7
8
  autoload :Organization, 'crunchbase/models/organization'
8
9
  autoload :Person, 'crunchbase/models/person'
9
10
  autoload :FundingRound, 'crunchbase/models/funding_round'
@@ -12,5 +13,6 @@ module Crunchbase
12
13
  autoload :PressReference, 'crunchbase/models/press_reference'
13
14
  autoload :CategoryGroup, 'crunchbase/models/category_group'
14
15
  autoload :Category, 'crunchbase/models/category'
16
+ autoload :Ipo, 'crunchbase/models/ipo'
15
17
  end
16
18
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Get the Entities data from API
5
+ module Models
6
+ # For AutocompleteEntity
7
+ class AutocompleteEntity < Entity
8
+ def field_ids
9
+ basis_fields
10
+ end
11
+
12
+ def basis_fields
13
+ %w[
14
+ identifier
15
+ facet_ids
16
+ short_description
17
+ ]
18
+ end
19
+
20
+ def parse_response(response)
21
+ dynamic_attributes(self, field_ids, response)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Get the Entities data from API
5
+ module Models
6
+ # Get the person data from API
7
+ class Ipo < Entity
8
+ RESOURCE_LIST = 'ipos'
9
+
10
+ def field_ids
11
+ %w[
12
+ created_at
13
+ entity_def_id
14
+ image_id
15
+ rank
16
+ rank_ipo
17
+ shares_outstanding
18
+ shares_sold
19
+ stock_exchange_symbol
20
+ stock_full_symbol
21
+ updated_at
22
+ ] + basis_fields
23
+ end
24
+
25
+ def basis_fields
26
+ %w[
27
+ uuid
28
+ permalink
29
+ identifier
30
+ amount_raised
31
+ share_price
32
+ stock_symbol
33
+ valuation
34
+ delisted_on
35
+ went_public_on
36
+ short_description
37
+ ]
38
+ end
39
+
40
+ def full_cards
41
+ %w[
42
+ organization
43
+ press_references
44
+ ]
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../autocompletes/client'
4
+
5
+ module Crunchbase
6
+ # Utilities
7
+ module Utilities
8
+ # Autocomplete on Searches
9
+ module Autocomplete
10
+ # endpoint: /autocompletes
11
+ #
12
+ # Suggests matching Identifier entities based on the query and entity_def_ids provided.
13
+ #
14
+ # query * string
15
+ # Value to perform the autocomplete search with.
16
+ # collection_ids string
17
+ # A comma separated list of collection ids to search against.
18
+ # Leaving this blank means it will search across all identifiers.
19
+ # Entity defs can be constrained to specific facets by providing them as facet collections.
20
+ # Relationship collections will resolve to their underlying entity def.
21
+ #
22
+ # Collection ids are:
23
+ # organizations, people, funding_rounds, acquisitions, investments, events,
24
+ # press_references, funds, event_appearances, ipos, ownerships, categories,
25
+ # category_groups, locations, jobs
26
+ # limit integer
27
+ # Number of results to retrieve; default = 10, max = 25
28
+ #
29
+ #
30
+ # Example for organizations
31
+ #
32
+ # raw_data = {
33
+ # query: keyword,
34
+ # collection_ids: 'organizations'
35
+ # }
36
+ def autocomplete_organizations(keyword)
37
+ autocompletes(wrapper_query_data(keyword, 'organizations'))
38
+ end
39
+
40
+ def autocomplete_people(keyword)
41
+ autocompletes(wrapper_query_data(keyword, 'people'))
42
+ end
43
+
44
+ def autocomplete_funding_rounds(keyword)
45
+ autocompletes(wrapper_query_data(keyword, 'funding_rounds'))
46
+ end
47
+
48
+ def autocomplete_press_references(keyword)
49
+ autocompletes(wrapper_query_data(keyword, 'press_references'))
50
+ end
51
+
52
+ private
53
+
54
+ def autocompletes(raw_data)
55
+ Crunchbase::Autocompletes::Client.new(raw_data).autocompletes
56
+ end
57
+
58
+ def wrapper_query_data(keyword, collection_ids)
59
+ {
60
+ query: keyword,
61
+ collection_ids: collection_ids
62
+ }
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Utilities
5
+ module Utilities
6
+ # Autocomplete on Searches
7
+ module DeletedEntities
8
+ # endpoint: /deleted_entities
9
+ #
10
+ # Retrieve deleted entities
11
+ # Retrieve deleted entities for a collection id
12
+ def deleted_entities(collection_id: nil); end
13
+ end
14
+ end
15
+ end
@@ -74,6 +74,16 @@ module Crunchbase
74
74
  entities('press_reference', entity_id).fetch_cards
75
75
  end
76
76
 
77
+ # Lookup an Ipo or Single card
78
+ def ipo(entity_id, card_id: nil)
79
+ lookup_for('ipo', entity_id, card_id)
80
+ end
81
+
82
+ # Lookup Ipo's all card
83
+ def ipo_cards(entity_id)
84
+ entities('ipo', entity_id).fetch_cards
85
+ end
86
+
77
87
  private
78
88
 
79
89
  def entities(entity_type, entity_id)
@@ -13,19 +13,16 @@ module Crunchbase
13
13
  module Request
14
14
  module_function
15
15
 
16
+ # Autocompletes endpoint
17
+ def get(uri, *args)
18
+ fetch_request(uri, *args)
19
+ end
20
+
16
21
  # Entity endpoints
17
22
  #
18
23
  # https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Entity/get_entities_organizations__entity_id_
19
24
  def entity(uri, *args)
20
- response = Faraday.new(url: BASE_URI, headers: headers) do |faraday|
21
- faraday.adapter Faraday.default_adapter
22
- faraday.response :json
23
- faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
24
- end.get(uri, *args)
25
-
26
- return response.body if response.status == 200
27
-
28
- raise Error, response.reason_phrase
25
+ fetch_request(uri, *args)
29
26
  end
30
27
 
31
28
  # Search endpoints
@@ -41,11 +38,23 @@ module Crunchbase
41
38
 
42
39
  return response.body if response.status == 200
43
40
 
44
- raise Error, response.reason_phrase
41
+ raise Error, response.body[0]['message']
45
42
  end
46
43
 
47
44
  private
48
45
 
46
+ def fetch_request(uri, *args)
47
+ response = Faraday.new(url: BASE_URI, headers: headers) do |faraday|
48
+ faraday.adapter Faraday.default_adapter
49
+ faraday.response :json
50
+ faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
51
+ end.get(uri, *args)
52
+
53
+ return response.body if response.status == 200
54
+
55
+ raise Error, response.body['error']
56
+ end
57
+
49
58
  def debug_mode?
50
59
  Crunchbase.config.debug || false
51
60
  end
@@ -17,7 +17,7 @@ module Crunchbase
17
17
  attribute_names.delete(attribute_name)
18
18
  hash_datas = response&.dig(attribute_name)
19
19
 
20
- values = hash_datas&.map { |k, v| v if %w[uuid permalink].include?(k) }&.compact || []
20
+ values = hash_datas&.map { |k, v| v if %w[uuid permalink value].include?(k) }&.compact || []
21
21
  dynamic_define_method(object, attribute_name, values)
22
22
  hash_datas&.keys&.each do |key|
23
23
  next unless %w[uuid permalink].include?(key)
@@ -1,10 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative './search_query_parameters'
4
+
3
5
  module Crunchbase
4
6
  # Utilities
5
7
  module Utilities
6
8
  # All Searches API endpoint
7
9
  module SearchEndpoints
10
+ include SearchQueryParameters
11
+
12
+ # Example to searching organizations
13
+ #
14
+ # {
15
+ # scope_name: 'organization',
16
+ # date: '2020-05-05',
17
+ # field_ids: %w[name website permalink],
18
+ # sort: 'desc'
19
+ # before_id: 'uuid'
20
+ # after_id: 'uuid'
21
+ # }
22
+ def recent_updates(args)
23
+ searches(query_parameters(args), args[:scope_name]).searches
24
+ end
25
+
8
26
  # For Searches
9
27
  def search_organizations(raw_data)
10
28
  searches(raw_data, 'organization').searches
@@ -14,6 +32,10 @@ module Crunchbase
14
32
  searches(raw_data, 'funding_round').searches
15
33
  end
16
34
 
35
+ def search_people(raw_data)
36
+ searches(raw_data, 'person').searches
37
+ end
38
+
17
39
  private
18
40
 
19
41
  def searches(raw_data, scope_name)
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Utilities
5
+ module Utilities
6
+ # All Searches Query Parameters
7
+ module SearchQueryParameters
8
+ module_function
9
+
10
+ # https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Search/post_searches_people
11
+ #
12
+ # Search Query Parameters
13
+ #
14
+ # field_ids: array of field_id strings
15
+ # Fields to include as columns in the search result entities
16
+ # query: Search query to perform on the designated entity
17
+ # order: (field_id, sort, nulls)
18
+ # Order in which the search results should be returned
19
+ # limit: integer
20
+ # Number of rows to return. Default is 100, min is 1, max is 1000.
21
+ # before_id: string($uuid)
22
+ # Used to paginate search results to the previous page.
23
+ # before_id should be the uuid of the first item in the current page. May not be provided simultaneously with after_id.
24
+ # after_id: string($uuid)
25
+ # Used to paginate search results to the next page.
26
+ # after_id should be the uuid of the last item in the current page. May not be provided simultaneously with before_id.
27
+ def query_parameters(args)
28
+ params = {
29
+ 'field_ids' => %w[
30
+ uuid
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
+ ],
41
+ 'limit' => args[:limit] || 1000
42
+ }
43
+
44
+ unless args[:date].nil?
45
+ params.merge!(
46
+ 'query' => [
47
+ {
48
+ 'type' => 'predicate',
49
+ 'field_id' => 'updated_at',
50
+ 'operator_id' => 'gte',
51
+ 'values' => [
52
+ args[:date]
53
+ ]
54
+ }
55
+ ]
56
+ )
57
+ end
58
+ params.merge!('before_id' => args[:before_id]) unless args[:before_id].nil?
59
+ params.merge!('after_id' => args[:after_id]) unless args[:after_id].nil?
60
+ params
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,335 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Utilities
5
+ module Utilities
6
+ # Veriables
7
+ module Veriables
8
+ # Description of operators
9
+ QUERY_OPERATORS = {
10
+ 'blank' => 'Blank',
11
+ 'eq' => 'Equal',
12
+ 'not_eq' => 'Not equal',
13
+ 'gt' => 'Greater than',
14
+ 'gte' => 'Greater than or equal',
15
+ 'lt' => 'Less than',
16
+ 'lte' => 'Less than or equal',
17
+ 'starts' => 'Starts',
18
+ 'contains' => 'Contains',
19
+ 'between' => 'Between',
20
+ 'includes' => 'Includes',
21
+ 'not_includes' => 'Does not include',
22
+ 'includes_all' => 'Includes all',
23
+ 'not_includes_all' => 'Does not include all'
24
+ }.freeze
25
+
26
+ COMPANY_TYPES = {
27
+ 'for_profit' => 'For Profit',
28
+ 'non_profit' => 'Non-profit'
29
+ }.freeze
30
+
31
+ FACET_IDS = {
32
+ 'company' => 'Company',
33
+ 'investor' => 'Investor',
34
+ 'school' => 'School'
35
+ }.freeze
36
+
37
+ IPO_STATUS = {
38
+ 'delisted' => 'Delisted',
39
+ 'private' => 'Private',
40
+ 'public' => 'Public'
41
+ }.freeze
42
+
43
+ FUNDING_STAGES = {
44
+ 'early_stage_venture' => 'Early Stage Venture',
45
+ 'ipo' => 'IPO',
46
+ 'late_stage_venture' => 'Late Stage Venture',
47
+ 'm_and_a' => 'M&A',
48
+ 'private_equity' => 'Private Equity',
49
+ 'seed' => 'Seed'
50
+ }.freeze
51
+
52
+ FUNDING_TYPES = {
53
+ 'angel' => 'Angel',
54
+ 'convertible_note' => 'Convertible Note',
55
+ 'corporate_round' => 'Corporate Round',
56
+ 'debt_financing' => 'Debt Financing',
57
+ 'equity_crowdfunding' => 'Equity Crowdfunding',
58
+ 'grant' => 'Grant',
59
+ 'initial_coin_offering' => 'Initial Coin Offering',
60
+ 'non_equity_assistance' => 'Non-equity Assistance',
61
+ 'post_ipo_debt' => 'Post-IPO Debt',
62
+ 'post_ipo_equity' => 'Post-IPO Equity',
63
+ 'post_ipo_secondary' => 'Post-IPO Secondary',
64
+ 'pre_seed' => 'Pre-Seed',
65
+ 'private_equity' => 'Private Equity',
66
+ 'product_crowdfunding' => 'Product Crowdfunding',
67
+ 'secondary_market' => 'Secondary Market',
68
+ 'seed' => 'Seed',
69
+ 'series_a' => 'Series A',
70
+ 'series_b' => 'Series B',
71
+ 'series_c' => 'Series C',
72
+ 'series_d' => 'Series D',
73
+ 'series_e' => 'Series E',
74
+ 'series_f' => 'Series F',
75
+ 'series_g' => 'Series G',
76
+ 'series_h' => 'Series H',
77
+ 'series_i' => 'Series I',
78
+ 'series_j' => 'Series J',
79
+ 'series_unknown' => 'Venture - Series Unknown',
80
+ 'undisclosed' => 'Undisclosed'
81
+ }.freeze
82
+
83
+ CURRENCY_ENUM = %w[
84
+ AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD
85
+ BIF BMD BND BOB BRL BSD BTN BWP BYN BYR BZD CAD CDF CHF CLF
86
+ CLP CNY COP CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB
87
+ EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG
88
+ HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW
89
+ KRW KWD KYD KZT LAK LBP LKR LRD LSL LTL LVL LYD MAD MDL MGA
90
+ MKD MMK MNT MOP MRO MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK
91
+ NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF
92
+ SAR SBD SCR SDG SEK SGD SHP SKK SLL SOS SRD SSP STD SVC SYP
93
+ SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD UYU UZS
94
+ VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD
95
+ XPF XPT YER ZAR ZMK ZMW xts
96
+ ].freeze
97
+
98
+ DATE_PRECISIONS = %w[none year month day].freeze
99
+
100
+ LAYOUT_IDS = {
101
+ 'default' => 'Default Layout',
102
+ 'investor' => 'Investor Layout',
103
+ 'school' => 'School Layout'
104
+ }.freeze
105
+
106
+ NUM_EMPLOYEES_ENUM = {
107
+ 'c_00001_00010' => '1-10',
108
+ 'c_00011_00050' => '11-50',
109
+ 'c_00051_00100' => '51-100',
110
+ 'c_00101_00250' => '101-250',
111
+ 'c_00251_00500' => '251-500',
112
+ 'c_00501_01000' => '501-1000',
113
+ 'c_01001_05000' => '1001-5000',
114
+ 'c_05001_10000' => '5001-10000',
115
+ 'c_10001_max' => '10001+'
116
+ }.freeze
117
+
118
+ OPERATING_STATUS = {
119
+ 'active' => 'Active',
120
+ 'closed' => 'Closed'
121
+ }.freeze
122
+
123
+ PROGRAM_TYPES = {
124
+ 'on_site' => 'On-Site',
125
+ 'online' => 'Online'
126
+ }.freeze
127
+
128
+ REVENUE_RANGES = {
129
+ 'r_00000000' => 'Less than $1M',
130
+ 'r_00001000' => '$1M to $10M',
131
+ 'r_00010000' => '$10M to $50M',
132
+ 'r_00050000' => '$50M to $100M',
133
+ 'r_00100000' => '$100M to $500M',
134
+ 'r_00500000' => '$500M to $1B',
135
+ 'r_01000000' => '$1B to $10B',
136
+ 'r_10000000' => '$10B+'
137
+ }.freeze
138
+
139
+ SCHOOL_METHODS = {
140
+ 'on_compus' => 'On Campus',
141
+ 'online' => 'Online',
142
+ 'online_and_on_campus' => 'Online and On Campus'
143
+ }.freeze
144
+
145
+ SCHOOL_METHODS = {
146
+ 'bootcamp' => 'Bootcamp',
147
+ 'community_college' => 'Community College',
148
+ 'four_year_university' => 'Four Year University',
149
+ 'graduate_university' => 'Graduate University',
150
+ 'high_school' => 'High School',
151
+ 'trade_school' => 'Trade School',
152
+ 'two_year_university' => 'Two Year University'
153
+ }.freeze
154
+
155
+ SCHOOL_TYPES = {
156
+ 'for_profit_private' => 'Private',
157
+ 'non_profit_private' => 'Private (Non-Profit)',
158
+ 'public' => 'Public'
159
+ }.freeze
160
+
161
+ STATUS = {
162
+ 'closed' => 'Closed',
163
+ 'ipo' => 'IPO',
164
+ 'operating' => 'Operating',
165
+ 'was_acquired' => 'Was Acquired'
166
+ }.freeze
167
+
168
+ STOCK_EXCHANGE_SYMBOLS = {
169
+ 'adx' => 'ADX - Abu Dhabi Securities Exchange',
170
+ 'afx' => 'AFX - Afghanistan Stock Exchange',
171
+ 'altx' => 'ALTX - ALTX East Africa Exchange',
172
+ 'amex' => 'AMEX - American Stock Exchange',
173
+ 'ams' => 'AMS - Euronext Amsterdam',
174
+ 'amx' => 'AMX - Armenia Securities Exchange',
175
+ 'asce' => 'ASCE - Abuja Securities and Commodities Exchange',
176
+ 'asx' => 'ASX - Australian Securities Exchange',
177
+ 'ath' => 'ATH - Athens Stock Exchange',
178
+ 'bcba' => 'BCBA - Buenos Aires Stock Exchange',
179
+ 'bdp' => 'BDP - Budapest Stock Exchange',
180
+ 'belex' => 'BELEX - Belgrade Stock Exchange',
181
+ 'ber' => 'BER - Berliner Börse',
182
+ 'bfb' => 'BFB - Baku Stock Exchange',
183
+ 'bit' => 'BIT - Italian Stock Exchange',
184
+ 'bkk' => 'BKK - Thailand Stock Exchange',
185
+ 'blse' => 'BLSE - Banja Luka Stock Exchange',
186
+ 'bme' => 'BME - Madrid Stock Exchange',
187
+ 'bmv' => 'BMV - Mexican Stock Exchange',
188
+ 'bom' => 'BOM - Bombay Stock Exchange',
189
+ 'brvm' => 'BRVM - Regional Securities Exchange SA',
190
+ 'bse' => 'BSE - Bulgarian Stock Exchange',
191
+ 'bse_lb' => 'BSE - Beirut Stock Exchange',
192
+ 'bsse' => 'BSSE - Bratislava Stock Exchange',
193
+ 'bsx' => 'BSX - Bermuda Stock Exchange',
194
+ 'bvb' => 'BVB - Bucharest Stock Exchange',
195
+ 'bvc' => 'BVC - Colombian Stock Exchange',
196
+ 'bvfb' => 'BVFB - Belarusian Currency and Stock Exchange',
197
+ 'bvm' => 'BVM - Montevideo Stock Exchange',
198
+ 'bvmf' => 'B3 - Brazil Stock Exchange and OTC Market',
199
+ 'bvmt' => 'BVMT - Tunis Stock Exchange',
200
+ 'bx' => 'BX - Berne Stock Exchange',
201
+ 'cas' => 'CAS - Casablanca Stock Exchange',
202
+ 'cise' => 'CISE - Channel Islands Stock Exchange',
203
+ 'cnsx' => 'CNSX - Canadian National Stock Exchange',
204
+ 'col' => 'COL - Colombo Stock Exchange',
205
+ 'cph' => 'CPH - Copenhagen Stock Exchange',
206
+ 'cse' => 'CSE - Canadian Securities Exchange',
207
+ 'cse_cy' => 'CSE - Cyprus Stock Exchange',
208
+ 'csx' => 'CSX - Cambodia Securities Exchange',
209
+ 'cve' => 'TSX-V - Toronto TSX Venture Exchange',
210
+ 'dfm' => 'DFM - Dubai Financial Market',
211
+ 'dse' => 'DSE - Dhaka Stock Exchange',
212
+ 'dsx' => 'DSX - Douala Stock Exchange',
213
+ 'dus' => 'DUS - Börse Düsseldorf',
214
+ 'ebr' => 'EBR - Euronext Brussels',
215
+ 'egx' => 'EGX - Egypt Stock Exchange',
216
+ 'eli' => 'ELI - Euronext Lisbon',
217
+ 'epa' => 'EPA - Euronext Paris',
218
+ 'etr' => 'ETR - Deutsche Börse XETRA',
219
+ 'eurex' => 'EUREX - Eurex Exchange',
220
+ 'fra' => 'FRA - Frankfurt Stock Exchange',
221
+ 'fwb' => 'FWB - Börse Frankfurt Stock Exchange',
222
+ 'gha' => 'GHA - Ghana Stock Exchange',
223
+ 'gsx' => 'GSX - Georgian Stock Exchange',
224
+ 'gsx_gi' => 'GSX - Gibraltar Stock Exchange',
225
+ 'hel' => 'HEL - Helsinki Stock Exchange',
226
+ 'hkg' => 'HKG - Hong Kong Stock Exchange',
227
+ 'hnx' => 'HNX - Hanoi Stock Exchange',
228
+ 'hose' => 'HOSE - Ho Chi Minh Stock Exchange',
229
+ 'ice' => 'ICE - Iceland Stock Exchange',
230
+ 'idx' => 'IDX - Indonesia Stock Exchange',
231
+ 'iex' => 'IEX - Investors Exchange',
232
+ 'ifb' => 'IFB - Iran Fara Bourse',
233
+ 'ime' => 'IME - Iran Mercantile Exchange',
234
+ 'irenex' => 'IRENEX - Iran Energy Exchange',
235
+ 'ise' => 'ISE - Irish Stock Exchange',
236
+ 'ist' => 'IST - Istanbul Stock Exchange',
237
+ 'isx' => 'ISX - Iraq Stock Exchange',
238
+ 'jp' => 'JP - Japan Exchange',
239
+ 'jsc' => 'JSC - Belarusian Currency and Stock Exchange',
240
+ 'jse' => 'JSE - Johannesburg Stock Exchange',
241
+ 'jse_jam' => 'JSE - Jamaica Stock Exchange',
242
+ 'kase' => 'KASE - Kazakhstan Stock Exchange',
243
+ 'klse' => 'KLSE - Malaysia Stock Exchange',
244
+ 'kosdaq' => 'KOSDAQ - Korean Securities Dealers Automated Quotations',
245
+ 'krx' => 'KRX - Korea Stock Exchange',
246
+ 'kse' => 'KSE - Kuwait Stock Exchange',
247
+ 'lje' => 'LJE - Ljubljana Stock Exchange',
248
+ 'lse' => 'LSE - London Stock Exchange',
249
+ 'lsm' => 'LSM - Libyan Stock Market',
250
+ 'lsx' => 'LSX - Lao Securities Exchange',
251
+ 'luse' => 'LuSE - Lusaka Securities Exchange',
252
+ 'luxse' => 'LuxSE - Luxembourg Stock Exchange',
253
+ 'mal' => 'MAL - Malta Stock Exchange',
254
+ 'mcx' => 'MCX - Multi Commodity Exchange of India',
255
+ 'meff' => 'MEFF - Mercado Spanish Financial Futures Market',
256
+ 'mnse' => 'MNSE - Montenegro Stock Exchange',
257
+ 'moex' => 'MOEX - Moscow Exchange',
258
+ 'mse' => 'MSE - Metropolitan Stock Exchange',
259
+ 'mse_md' => 'MSE - Moldova Stock Exchange',
260
+ 'mse_mk' => 'MSE - Macedonian Stock Exchange',
261
+ 'msei' => 'MSEI - Metropolitan Stock Exchange of India',
262
+ 'msm' => 'MSM - Muscat Securities Market',
263
+ 'mun' => 'MUN - Börse München',
264
+ 'nasdaq' => 'NASDAQ',
265
+ 'nbo' => 'NSE - Nairobi Securities Exchange',
266
+ 'neeq' => 'NEEQ - National Equities Exchange and Quotations',
267
+ 'nepse' => 'NEPSE - Nepal Stock Exchange',
268
+ 'nex' => 'NEX - NEX Exchange',
269
+ 'ngm' => 'NGM - Nordic Growth Market Exchange',
270
+ 'nig' => 'NIG - Nigerian Stock Exchange',
271
+ 'notc' => 'NOTC - Norwegian OTC',
272
+ 'npex' => 'NPEX - NPEX Stock Exchange',
273
+ 'nse' => 'NSE - National Stock Exchange of India',
274
+ 'nsx' => 'NSX - National Stock Exchange of Australia',
275
+ 'nyse' => 'NYSE - New York Stock Exchange',
276
+ 'nysearca' => 'NYSEARCA - NYSE Arca',
277
+ 'nysemkt' => 'NYSEAMERICAN - NYSE American',
278
+ 'nze' => 'NZE - New Zealand Stock Exchange',
279
+ 'ose' => 'OSE - Oslo Stock Exchange',
280
+ 'otcbb' => 'OTCBB - FINRA OTC Bulletin Board',
281
+ 'otcpink' => 'OTC Pink',
282
+ 'otcqb' => 'OTCQB',
283
+ 'otcqx' => 'OTCQX',
284
+ 'pdex' => 'PDEx - Philippine Dealing Exchange',
285
+ 'pex' => 'PEX - Palestine Exchange',
286
+ 'pfts' => 'PFTS - PFTS Ukraine Stock Exchange',
287
+ 'pomsox' => 'POMSoX - Port Moresby Stock Exchange',
288
+ 'prg' => 'PRA - Prague Stock Exchange',
289
+ 'pse' => 'PSE - Philippine Stock Exchange',
290
+ 'psx' => 'PSX - Pakistan Stock Exchange',
291
+ 'qse' => 'QSE - Qatar Stock Exchange',
292
+ 'rfb' => 'RFB - Riga Stock Exchange',
293
+ 'rse' => 'RSE - Rwanda Stock Exchange',
294
+ 'rsebl' => 'RSEBL - Royal Securities Exchange of Bhutan',
295
+ 'sase' => 'SASE - Sarajevo Stock Exchange',
296
+ 'sbx' => 'SBX - BX Swiss',
297
+ 'sehk' => 'SEHK - The Stock Exchange of Hong Kong',
298
+ 'sem' => 'SEM - Stock Exchange of Mauritius',
299
+ 'sgbv' => 'SGBV - Algiers Stock Exchange',
300
+ 'sgx' => 'SGX - Singapore Stock Exchange',
301
+ 'six' => 'SIX - SIX Swiss Exchange',
302
+ 'spbex' => 'SPBEX - Saint Petersburg Stock Exchange',
303
+ 'spse' => 'SPSE - South Pacific Stock Exchange',
304
+ 'sse' => 'SSE - Shanghai Stock Exchange',
305
+ 'ssx' => 'SSX - Sydney Stock Exchange',
306
+ 'sto' => 'STO - Stockholm Stock Exchange',
307
+ 'stu' => 'STU - Börse Stuttgart',
308
+ 'swx' => 'SWX - SIX Swiss Exchange',
309
+ 'szse' => 'SZSE - Shenzhen Stock Exchange',
310
+ 'tadawul' => 'Tadawul - Saudi Stock Exchange',
311
+ 'tal' => 'TSE - Tallinn Stock Exchange',
312
+ 'tfex' => 'TFEX - Thailand Futures Exchange',
313
+ 'tise' => 'TISE - The International Stock Exchange',
314
+ 'tlv' => 'TLV - Tel Aviv Stock Exchange',
315
+ 'tpe' => 'TWSE - Taiwan Stock Exchange',
316
+ 'tse_al' => 'TSE - Tirana Stock Exchange',
317
+ 'tse_ir' => 'TSE - Tehran Stock Exchange',
318
+ 'tsec' => 'TWO - Taiwan OTC Exchange',
319
+ 'tsx' => 'TSX - Toronto Stock Exchange',
320
+ 'ttse' => 'TTSE - Trinidad and Tobago Stock Exchange',
321
+ 'tyo' => 'TYO - Tokyo Stock Exchange',
322
+ 'use' => 'USE - Uganda Securities Exchange',
323
+ 'ux' => 'UX - Ukrainian Exchange',
324
+ 'vie' => 'VIE - Vienna Stock Exchange',
325
+ 'vmf' => 'VMF - Faroese Securities Market',
326
+ 'vse' => 'VSE - Vancouver Stock Exchange',
327
+ 'wse' => 'WSE - Warsaw Stock Exchange',
328
+ 'ysx' => 'YSX - Yangon Stock Exchange',
329
+ 'zamace' => 'ZAMACE - Zambian Commodity Exchange',
330
+ 'zse' => 'ZSE - Zimbabwe Stock Exchange',
331
+ 'zse_hr' => 'ZSE - Zagreb Stock Exchange'
332
+ }.freeze
333
+ end
334
+ end
335
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crunchbase
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
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.1
4
+ version: 0.1.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: 2020-06-06 00:00:00.000000000 Z
11
+ date: 2020-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -132,6 +132,7 @@ 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
137
138
  - lib/crunchbase/entities.rb
@@ -139,22 +140,28 @@ files:
139
140
  - lib/crunchbase/errors.rb
140
141
  - lib/crunchbase/models.rb
141
142
  - lib/crunchbase/models/acquisition.rb
143
+ - lib/crunchbase/models/autocomplete_entity.rb
142
144
  - lib/crunchbase/models/category.rb
143
145
  - lib/crunchbase/models/category_group.rb
144
146
  - lib/crunchbase/models/entity.rb
145
147
  - lib/crunchbase/models/funding_round.rb
146
148
  - lib/crunchbase/models/investment.rb
149
+ - lib/crunchbase/models/ipo.rb
147
150
  - lib/crunchbase/models/organization.rb
148
151
  - lib/crunchbase/models/person.rb
149
152
  - lib/crunchbase/models/press_reference.rb
150
153
  - lib/crunchbase/searches.rb
151
154
  - lib/crunchbase/searches/client.rb
152
155
  - lib/crunchbase/utilities.rb
156
+ - lib/crunchbase/utilities/autocomplete.rb
153
157
  - lib/crunchbase/utilities/cb_model.rb
158
+ - lib/crunchbase/utilities/deleted_entities.rb
154
159
  - lib/crunchbase/utilities/entity_endpoints.rb
155
160
  - lib/crunchbase/utilities/request.rb
156
161
  - lib/crunchbase/utilities/response.rb
157
162
  - lib/crunchbase/utilities/search_endpoints.rb
163
+ - lib/crunchbase/utilities/search_query_parameters.rb
164
+ - lib/crunchbase/utilities/veriables.rb
158
165
  - lib/crunchbase/version.rb
159
166
  homepage: https://github.com/ekohe/crunchbase4
160
167
  licenses: