crunchbase_v2 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +17 -16
  2. data/lib/crunchbase/version.rb +1 -1
  3. 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 'crunchbase_v2'
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
- s = Crunchbase::Search.search("facebook")
32
+ response = Crunchbase::Search.search("facebook")
32
33
  OR
33
- s = Crunchbase::Search.search({ domain_name: 'facebook.com' }, 'organizations')
34
- s.total_items || s.per_page || s.pages || s.current_page
35
- all_results = s.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
- company = Crunchbase::Organization.get("facebook")
43
+ response = Crunchbase::Organization.get("facebook")
43
44
  Relationship objects [ competitors customers founders funding_rounds ipos products sub_organizations, acquisitions ]
44
- company.competitors Only return Top 8 items
45
- company.competitors_total_items Return competitors total items count
46
- company.competitors.each do |e|
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
- company.websites
53
+ response.websites
53
54
 
54
55
  If you want all competitors items, Please do:
55
56
 
56
- all_competitors = Competitor.lists_for_permalink(company.permalink)
57
- all_competitors.per_page
58
- all_competitors.current_page
59
- all_competitors.size
60
- all_competitors.results Return all competitors items
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
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Crunchbase
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crunchbase_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: