crunchbase-ruby-library 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 +4 -4
- data/README.md +10 -10
- data/lib/crunchbase/model/acquired_by.rb +11 -9
- data/lib/crunchbase/model/address.rb +6 -6
- data/lib/crunchbase/model/degree.rb +5 -5
- data/lib/crunchbase/model/funding_round.rb +10 -10
- data/lib/crunchbase/model/headquarter.rb +1 -1
- data/lib/crunchbase/model/job.rb +4 -4
- data/lib/crunchbase/model/new.rb +4 -4
- data/lib/crunchbase/model/organization.rb +2 -2
- data/lib/crunchbase/model/person.rb +2 -2
- data/lib/crunchbase/model/product.rb +8 -8
- data/lib/crunchbase/model/video.rb +3 -3
- data/lib/crunchbase/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ad940bca165d85e87b478f8934cb8810f9433ae
|
4
|
+
data.tar.gz: e2ae5f5b0736f043ae0ff0571ec279fb3d275699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137231ba95555b75d966237879a8849acea81fe04f4d8f414a483377b748fa912157ce95f427a22596e1b31a544dafa9ba454d85ffd88f0880cfd988aae4df1f
|
7
|
+
data.tar.gz: 8ef1a82ef01c884f0cd7ac49640d0f1072bcac4335dddb3c7ab9e219fc1b0120d8c73fbba232323831eff980a6b5b244b626c6bf24d37e5fe16368c81acfada9
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ And then execute:
|
|
15
15
|
Or install it yourself as:
|
16
16
|
|
17
17
|
$ gem install crunchbase-ruby-library
|
18
|
-
|
18
|
+
|
19
19
|
## Usage Examples
|
20
20
|
|
21
21
|
Config your user_key, debug somewhere like development.rb, Recommended directory config/initializers/crunchbase.rb
|
@@ -28,17 +28,17 @@ Config your user_key, debug somewhere like development.rb, Recommended directory
|
|
28
28
|
## Search Organization OR Person
|
29
29
|
|
30
30
|
Retrieve the way, Please use Search Class. The Search Will Return a list consisting of objects of the OrganizationSummary | PersonSummary type. Example:
|
31
|
-
|
31
|
+
|
32
32
|
Query Orgnization
|
33
33
|
|
34
34
|
Method 1
|
35
|
-
response = Crunchbase::Model::Search.search({query: "Google"}, 'organizations')
|
35
|
+
response = Crunchbase::Model::Search.search({query: "Google"}, 'organizations')
|
36
36
|
|
37
37
|
Method 2
|
38
|
-
response = Crunchbase::Model::Search.search({name: "Google"}, 'organizations')
|
38
|
+
response = Crunchbase::Model::Search.search({name: "Google"}, 'organizations')
|
39
39
|
|
40
40
|
Method 3
|
41
|
-
response = Crunchbase::Model::Search.search({domain_name: "google.com"}, 'organizations')
|
41
|
+
response = Crunchbase::Model::Search.search({domain_name: "google.com"}, 'organizations')
|
42
42
|
|
43
43
|
response.total_items || response.per_page || response.pages || response.current_page
|
44
44
|
response.results.each { |r| puts r.name }
|
@@ -46,7 +46,7 @@ Retrieve the way, Please use Search Class. The Search Will Return a list consist
|
|
46
46
|
|
47
47
|
Query Person
|
48
48
|
|
49
|
-
response = Crunchbase::Model::Search.search({query: "encore"}, 'people')
|
49
|
+
response = Crunchbase::Model::Search.search({query: "encore"}, 'people')
|
50
50
|
|
51
51
|
response.results.each { |i| [i.first_name, i.last_name] }
|
52
52
|
|
@@ -82,10 +82,10 @@ Get information by the permalink, Example:
|
|
82
82
|
people = Crunchbase::Model::Person.list( page )
|
83
83
|
|
84
84
|
people.results
|
85
|
-
|
86
|
-
[ #<Crunchbase::Model::PersonSummary:...>,
|
87
|
-
#<Crunchbase::Model::PersonSummary: ...>,
|
88
|
-
#<Crunchbase::Model::PersonSummary: ...>,
|
85
|
+
|
86
|
+
[ #<Crunchbase::Model::PersonSummary:...>,
|
87
|
+
#<Crunchbase::Model::PersonSummary: ...>,
|
88
|
+
#<Crunchbase::Model::PersonSummary: ...>,
|
89
89
|
#<Crunchbase::Model::PersonSummary: ...>
|
90
90
|
...... ]
|
91
91
|
|
@@ -5,24 +5,26 @@ module Crunchbase::Model
|
|
5
5
|
|
6
6
|
RESOURCE_LIST = 'acquired_by'
|
7
7
|
|
8
|
-
attr_reader :
|
8
|
+
attr_reader :uuid, :type_name
|
9
|
+
attr_reader :api_path, :web_path, :price, :price_currency_code, :price_usd, :payment_type, :acquisition_type, :acquisition_status, :disposition_of_acquired, :announced_on, :announced_on_trust_code, :completed_on, :completed_on_trust_code, :created_at, :updated_at
|
10
|
+
|
11
|
+
attr_reader :acquiree, :acquirer
|
9
12
|
|
10
13
|
def initialize(json)
|
11
|
-
|
12
|
-
instance_variable_set("@#{v}", json[v] || nil)
|
13
|
-
}
|
14
|
+
super
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
unless (relationships = json['relationships']).nil?
|
17
|
+
instance_relationships_object(Crunchbase::Model::Organization, 'aquiree', relationships['acquiree'])
|
18
|
+
instance_relationships_object(Crunchbase::Model::Organization, 'acquirer', relationships['acquirer'])
|
19
|
+
end
|
18
20
|
end
|
19
21
|
|
20
22
|
def property_keys
|
21
|
-
%w[ announced_on
|
23
|
+
%w[ api_path web_path price price_currency_code price_usd payment_type acquisition_type acquisition_status disposition_of_acquired announced_on announced_on_trust_code completed_on completed_on_trust_code created_at updated_at ]
|
22
24
|
end
|
23
25
|
|
24
26
|
def date_keys
|
25
|
-
%w[ announced_on ]
|
27
|
+
%w[ announced_on completed_on ]
|
26
28
|
end
|
27
29
|
|
28
30
|
end
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
module Crunchbase::Model
|
4
4
|
class Address < Crunchbase::Model::Entity
|
5
|
-
|
5
|
+
|
6
6
|
RESOURCE_LIST = 'addresses'
|
7
7
|
|
8
|
-
attr_reader :name, :street_1, :street_2, :city, :city_web_path, :region, :region_web_path,
|
9
|
-
:country, :country_web_path, :latitude, :longitude, :created_at, :updated_at
|
8
|
+
attr_reader :name, :street_1, :street_2, :postal_code, :city, :city_web_path, :region, :region_code2, :region_web_path,
|
9
|
+
:country, :country_code2, :country_code3, :country_web_path, :latitude, :longitude, :created_at, :updated_at
|
10
10
|
|
11
11
|
|
12
12
|
def property_keys
|
13
13
|
%w[
|
14
|
-
name street_1 street_2 city city_web_path region region_web_path
|
15
|
-
country country_web_path latitude longitude created_at updated_at
|
14
|
+
name street_1 street_2 postal_code city city_web_path region region_code2 region_web_path
|
15
|
+
country country_code2 country_code3 country_web_path latitude longitude created_at updated_at
|
16
16
|
]
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -5,8 +5,8 @@ module Crunchbase::Model
|
|
5
5
|
|
6
6
|
RESOURCE_LIST = 'degrees'
|
7
7
|
|
8
|
-
attr_reader :degree_type_name, :degree_subject, :started_on, :started_on_trust_code, :is_completed,
|
9
|
-
:completed_on, :completed_on_trust_code,
|
8
|
+
attr_reader :degree_type_name, :degree_subject, :started_on, :started_on_trust_code, :is_completed,
|
9
|
+
:completed_on, :completed_on_trust_code,
|
10
10
|
:created_at, :updated_at
|
11
11
|
|
12
12
|
attr_reader :school
|
@@ -21,11 +21,11 @@ module Crunchbase::Model
|
|
21
21
|
|
22
22
|
def property_keys
|
23
23
|
%w[
|
24
|
-
degree_type_name degree_subject started_on started_on_trust_code is_completed
|
25
|
-
completed_on completed_on_trust_code
|
24
|
+
degree_type_name degree_subject started_on started_on_trust_code is_completed
|
25
|
+
completed_on completed_on_trust_code
|
26
26
|
created_at updated_at
|
27
27
|
]
|
28
28
|
end
|
29
29
|
|
30
30
|
end
|
31
|
-
end
|
31
|
+
end
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
module Crunchbase::Model
|
4
4
|
class FundingRound < Crunchbase::Model::Entity
|
5
|
-
|
5
|
+
|
6
6
|
RESOURCE_LIST = 'funding_rounds'
|
7
7
|
RESOURCE_NAME = 'funding-rounds'
|
8
8
|
|
9
|
-
attr_reader :api_path, :web_path, :funding_type, :series, :series_qualifier,
|
10
|
-
:announced_on, :announced_on_trust_code, :closed_on, :closed_on_trust_code,
|
9
|
+
attr_reader :permalink, :api_path, :web_path, :funding_type, :series, :series_qualifier,
|
10
|
+
:announced_on, :announced_on_trust_code, :closed_on, :closed_on_trust_code,
|
11
11
|
:money_raised, :money_raised_currency_code, :money_raised_usd,
|
12
|
-
:target_money_raised, :target_money_raised_currency_code, :target_money_raised_usd,
|
12
|
+
:target_money_raised, :target_money_raised_currency_code, :target_money_raised_usd,
|
13
13
|
:created_at, :updated_at
|
14
14
|
|
15
15
|
attr_reader :investments, :funded_organization, :images, :videos, :news
|
16
16
|
|
17
|
-
attr_reader :investments_total_items, :funded_organization_total_items, :images_total_items,
|
17
|
+
attr_reader :investments_total_items, :funded_organization_total_items, :images_total_items,
|
18
18
|
:videos_total_items, :news_total_items
|
19
19
|
|
20
20
|
def initialize(json)
|
@@ -41,13 +41,13 @@ module Crunchbase::Model
|
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
def property_keys
|
46
46
|
%w[
|
47
|
-
api_path web_path funding_type series series_qualifier
|
48
|
-
announced_on announced_on_trust_code closed_on closed_on_trust_code
|
49
|
-
money_raised money_raised_currency_code money_raised_usd
|
50
|
-
target_money_raised target_money_raised_currency_code target_money_raised_usd
|
47
|
+
permalink api_path web_path funding_type series series_qualifier
|
48
|
+
announced_on announced_on_trust_code closed_on closed_on_trust_code
|
49
|
+
money_raised money_raised_currency_code money_raised_usd
|
50
|
+
target_money_raised target_money_raised_currency_code target_money_raised_usd
|
51
51
|
created_at updated_at
|
52
52
|
]
|
53
53
|
end
|
data/lib/crunchbase/model/job.rb
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module Crunchbase::Model
|
4
4
|
class Job < Crunchbase::Model::Entity
|
5
|
-
|
5
|
+
|
6
6
|
RESOURCE_LIST = 'jobs'
|
7
7
|
|
8
|
-
attr_reader :title, :started_on, :started_on_trust_code, :ended_on, :ended_on_trust_code,
|
8
|
+
attr_reader :title, :started_on, :started_on_trust_code, :ended_on, :ended_on_trust_code,
|
9
9
|
:created_at, :updated_at
|
10
10
|
|
11
11
|
attr_reader :person, :organization
|
@@ -18,7 +18,7 @@ module Crunchbase::Model
|
|
18
18
|
instance_relationships_object(Crunchbase::Model::Organization, 'organization', relationships['organization'])
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def property_keys
|
23
23
|
%w[
|
24
24
|
title started_on started_on_trust_code ended_on ended_on_trust_code created_at updated_at
|
@@ -30,4 +30,4 @@ module Crunchbase::Model
|
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
data/lib/crunchbase/model/new.rb
CHANGED
@@ -5,17 +5,17 @@ module Crunchbase::Model
|
|
5
5
|
|
6
6
|
RESOURCE_LIST = 'news'
|
7
7
|
|
8
|
-
attr_reader :title, :author, :posted_on, :url, :created_at, :updated_at, :type
|
8
|
+
attr_reader :title, :author, :posted_on, :posted_on_trust_code, :url, :created_at, :updated_at, :type
|
9
9
|
|
10
10
|
def property_keys
|
11
11
|
%w[
|
12
|
-
title author posted_on url created_at updated_at type
|
12
|
+
title author posted_on posted_on_trust_code url created_at updated_at type
|
13
13
|
]
|
14
14
|
end
|
15
15
|
|
16
16
|
def date_keys
|
17
17
|
%w[posted_on]
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
@@ -6,7 +6,7 @@ module Crunchbase::Model
|
|
6
6
|
RESOURCE_LIST = RESOURCE_NAME = 'organizations'
|
7
7
|
|
8
8
|
attr_reader :permalink, :api_path, :web_path, :name, :also_known_as, :short_description, :description,
|
9
|
-
:primary_role, :role_company, :role_investor, :role_group, :role_school,
|
9
|
+
:profile_image_url, :primary_role, :role_company, :role_investor, :role_group, :role_school,
|
10
10
|
:founded_on, :founded_on_trust_code, :is_closed, :closed_on, :closed_on_trust_code,
|
11
11
|
:num_employees_min, :num_employees_max,
|
12
12
|
:total_funding_usd,
|
@@ -65,7 +65,7 @@ module Crunchbase::Model
|
|
65
65
|
def property_keys
|
66
66
|
%w[
|
67
67
|
permalink api_path web_path name also_known_as short_description description
|
68
|
-
primary_role role_company role_investor role_group role_school
|
68
|
+
profile_image_url primary_role role_company role_investor role_group role_school
|
69
69
|
founded_on founded_on_trust_code is_closed closed_on closed_on_trust_code
|
70
70
|
num_employees_min num_employees_max total_funding_usd
|
71
71
|
stock_exchange stock_symbol
|
@@ -5,7 +5,7 @@ module Crunchbase::Model
|
|
5
5
|
|
6
6
|
RESOURCE_LIST = RESOURCE_NAME = 'people'
|
7
7
|
|
8
|
-
attr_reader :permalink, :api_path, :web_path, :first_name, :last_name, :also_known_as, :bio, :profile_image_url,
|
8
|
+
attr_reader :permalink, :api_path, :web_path, :first_name, :last_name, :gender, :also_known_as, :bio, :profile_image_url,
|
9
9
|
:role_investor, :born_on, :born_on_trust_code, :is_deceased, :died_on, :died_on_trust_code,
|
10
10
|
:created_at, :updated_at
|
11
11
|
|
@@ -40,7 +40,7 @@ module Crunchbase::Model
|
|
40
40
|
|
41
41
|
def property_keys
|
42
42
|
%w[
|
43
|
-
permalink api_path web_path first_name last_name also_known_as bio profile_image_url
|
43
|
+
permalink api_path web_path first_name last_name gender also_known_as bio profile_image_url
|
44
44
|
role_investor born_on born_on_trust_code is_deceased died_on died_on_trust_code
|
45
45
|
created_at updated_at
|
46
46
|
]
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
module Crunchbase::Model
|
4
4
|
class Product < Crunchbase::Model::Entity
|
5
|
-
|
5
|
+
|
6
6
|
RESOURCE_LIST = RESOURCE_NAME = 'products'
|
7
7
|
|
8
|
-
attr_reader :permalink, :api_path, :web_path, :name, :also_known_as,
|
9
|
-
:lifecycle_stage, :short_description, :description,
|
10
|
-
:launched_on, :launched_on_trust_code, :closed_on, :closed_on_trust_code,
|
8
|
+
attr_reader :permalink, :api_path, :web_path, :name, :also_known_as,
|
9
|
+
:lifecycle_stage, :short_description, :description, :profile_image_url,
|
10
|
+
:launched_on, :launched_on_trust_code, :closed_on, :closed_on_trust_code,
|
11
11
|
:homepage_url, :created_at, :updated_at
|
12
12
|
|
13
13
|
attr_reader :websites, :primary_image, :images, :images_total_items, :categories, :video, :news
|
@@ -32,9 +32,9 @@ module Crunchbase::Model
|
|
32
32
|
|
33
33
|
def property_keys
|
34
34
|
%w[
|
35
|
-
permalink api_path web_path name also_known_as
|
36
|
-
lifecycle_stage short_description description
|
37
|
-
launched_on launched_on_trust_code closed_on closed_on_trust_code
|
35
|
+
permalink api_path web_path name also_known_as
|
36
|
+
lifecycle_stage short_description description profile_image_url
|
37
|
+
launched_on launched_on_trust_code closed_on closed_on_trust_code
|
38
38
|
homepage_url created_at updated_at
|
39
39
|
]
|
40
40
|
end
|
@@ -44,4 +44,4 @@ module Crunchbase::Model
|
|
44
44
|
end
|
45
45
|
|
46
46
|
end
|
47
|
-
end
|
47
|
+
end
|
data/lib/crunchbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crunchbase-ruby-library
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|