crunchbase_v2 0.0.7 → 0.0.8
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.
- data/README.rdoc +17 -16
- data/lib/crunchbase/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -20,7 +20,8 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
Config your user_key, debug somewhere like development.rb, Recommended directory config/initializers/crunchbase.rb
|
22
22
|
|
23
|
-
require '
|
23
|
+
require 'crunchbase'
|
24
|
+
|
24
25
|
Crunchbase::API.key = 'user_key'
|
25
26
|
Crunchbase::API.debug = false
|
26
27
|
|
@@ -28,36 +29,36 @@ Config your user_key, debug somewhere like development.rb, Recommended directory
|
|
28
29
|
|
29
30
|
Searching the Crunchbase is possible with the Search class, The Search will return a list consisting of objects of the SearchResult type.
|
30
31
|
|
31
|
-
|
32
|
+
response = Crunchbase::Search.search("facebook")
|
32
33
|
OR
|
33
|
-
|
34
|
-
|
35
|
-
all_results =
|
34
|
+
response = Crunchbase::Search.search({ domain_name: 'facebook.com' }, 'organizations')
|
35
|
+
response.total_items || response.per_page || response.pages || response.current_page
|
36
|
+
all_results = response.results
|
36
37
|
all_results.each { |r| puts r.name }
|
37
38
|
|
38
39
|
=== Organizations && RelationShip List Items
|
39
40
|
|
40
41
|
Get information by the permalink, Example:
|
41
42
|
|
42
|
-
|
43
|
+
response = Crunchbase::Organization.get("facebook")
|
43
44
|
Relationship objects [ competitors customers founders funding_rounds ipos products sub_organizations, acquisitions ]
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
competitor = a.fetch
|
45
|
+
response.competitors Only return Top 8 items
|
46
|
+
response.competitors_total_items Return competitors total items count
|
47
|
+
response.competitors.each do |e|
|
48
|
+
competitor = (a.fetch ||
|
48
49
|
puts competitor.name
|
49
50
|
end
|
50
51
|
OR
|
51
52
|
Friendly relationship objects [ past_teams current_teams offices headquarters categories investments primary_images images websites new_items board_members_and_advisors ]
|
52
|
-
|
53
|
+
response.websites
|
53
54
|
|
54
55
|
If you want all competitors items, Please do:
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
response = Crunchbase::Competitor.lists_for_permalink(response.permalink)
|
58
|
+
response.per_page
|
59
|
+
response.current_page
|
60
|
+
response.size
|
61
|
+
response.results Return all competitors items
|
61
62
|
|
62
63
|
=== People
|
63
64
|
|
data/lib/crunchbase/version.rb
CHANGED