README.md in crunchbase4-0.1.4 vs README.md in crunchbase4-0.1.5
- old
+ new
@@ -54,17 +54,25 @@
- [Searches](https://github.com/ekohe/crunchbase4#search)
- [Autocompletes](https://github.com/ekohe/crunchbase4#autocompletes)
- [Deleted Entities](https://github.com/ekohe/crunchbase4#deleted-entities)
```ruby
-<!-- Entity -->
-response = client.organization('ekohe')
-response = client.organization('ekohe', 'ipos')
+<!-- Entity and Single Card -->
+response = client.organization('ekohe')
+ipos = client.organization('ekohe', card_id: 'ipos')
+fund = client.organization('ekohe', card_id: 'fund')
+ownership = client.organization('ekohe', card_id: 'ownership')
+founders = client.organization('ekohe', card_id: 'founders')
+investors = client.organization('ekohe', card_id: 'investors')
+jobs = client.organization('ekohe', card_id: 'jobs')
+headquarters_address = client.organization('ekohe', card_id: 'headquarters_address')
+top_2_press_references = client.organization('ekohe', card_id: 'press_references', limit: 2)
+
response = client.person('mark-zuckerberg')
-response = client.person('mark-zuckerberg', 'participated_investments')
+response = client.person('mark-zuckerberg', card_id: 'participated_investments')
response = client.funding_round('371c20af8aa94bcba8da0694d138f247')
-response = client.funding_round('371c20af8aa94bcba8da0694d138f247', 'investments')
+response = client.funding_round('371c20af8aa94bcba8da0694d138f247', card_id: 'investors')
response = client.acquisition('7638eae9-07b7-4fc6-ad20-5d99de3ff928')
response = client.fund('aeaac12b-df56-7039-40f9-f1992f88e20e')
response = client.ownership('4506d9ce-85d3-4a8f-89cd-07a225359d55')
<!-- Get the JSON response of Entity -->
@@ -81,18 +89,21 @@
date: '2020-05-05',
limit: 100
})
<!-- Autocompletes -->
-response = client.autocomplete_organizations('ekohe')
-response = client.autocomplete_people('encore')
-response = client.autocomplete_funding_rounds('facebook')
+response = client.autocomplete('ekohe')
+response = client.autocomplete('ekohe', collection_ids: 'organizations')
+response = client.autocomplete('ekohe', collection_ids: 'organizations', limit: 3)
+response = client.autocomplete('encore', collection_ids: 'people')
+response = client.autocomplete('facebook', collection_ids: 'funding_rounds')
+response = client.autocomplete('facebook', collection_ids: 'press_references')
<!-- Deleted Entities -->
-response = client.deledeted_organizations
-response = client.deledeted_people
-response = client.deledeted_funding_rounds
+response = client.deledeted_entities(collection_ids: 'organizations')
+response = client.deledeted_entities(collection_ids: 'people')
+response = client.deledeted_entities(collection_ids: 'funding_rounds')
```
#### Module: Utils
* We return all the original data from CrunchBase without any conversion. So you want to use the converted data, you can use this tool to convert.
@@ -487,11 +498,11 @@
Search by keyword has been supported in "Organization", "People" and "Fund Round"
* Search in an organization by keyword
```ruby
-pry(main)> response = client.autocomplete_organizations('ekohe')
+pry(main)> response = client.autocomplete('ekohe', collection_ids: 'organizations')
=> #<Crunchbase::Autocompletes::Client:0x00007fecb34ce1e8
@conditions={:query=>"ekohe", :collection_ids=>"organizations"},
@count=25,
@entities=
[#<Crunchbase::Models::AutocompleteEntity:0x00007fecb3976cb8
@@ -519,11 +530,11 @@
```
* Search in an people by keyword
```ruby
-pry(main)> response = client.autocomplete_people('maxime')
+pry(main)> response = client.autocomplete('maxime', collection_ids: 'people')
=> #<Crunchbase::Autocompletes::Client:0x00007fecb474f9c0
@conditions={:query=>"maxime", :collection_ids=>"people"},
@count=25,
@entities=
[#<Crunchbase::Models::AutocompleteEntity:0x00007fecb477db40
@@ -551,11 +562,11 @@
```
* Search in an funding rounds by keyword
```ruby
-pry(main)> response = client.autocomplete_funding_rounds('facebook')
+pry(main)> response = client.autocomplete('facebook', collection_ids: 'funding_rounds')
=> #<Crunchbase::Autocompletes::Client:0x00007fecb4dd66b8
@conditions={:query=>"facebook", :collection_ids=>"funding_rounds"},
@count=25,
@entities=
[#<Crunchbase::Models::AutocompleteEntity:0x00007fecb4e04950
@@ -585,11 +596,11 @@
### Deleted Entities
* Get deleted entities by collection_ids
```ruby
-pry(main)> response = client.deleted_organizations
+pry(main)> response = client.deleted_entities
=> #<Crunchbase::DeletedEntities::Client:0x00007fa9196b6498
@conditions={:collection_ids=>"organizations"},
@count=1000,
@entities=
[#<Crunchbase::Models::DeletedEntity:0x00007fa9197f9df0 @deleted_at="2020-06-06T11:51:34Z", @entity_def_id="organization", @identifier=[], @uuid="31e5d1dd-3a7d-4c8c-b7dc-4780d391bbc3">,
@@ -609,11 +620,11 @@
pry(main)> response.entities
pry(main)> response.count
pry(main)> response.total_count
# Get deleted people and funding rounds
-pry(main)> response = client.deleted_people
-pry(main)> response = client.deleted_funding_rounds
+pry(main)> response = client.deleted_entities(collection_ids: 'people')
+pry(main)> response = client.deleted_entities(collection_ids: 'funding_rounds')
```
## Development
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.