crunchbase_v2 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,16 +6,19 @@ module Crunchbase
6
6
  class BoardMembersAndAdvisor < CBEntity
7
7
  RESOURCE_LIST = 'board_members_and_advisors'
8
8
 
9
- attr_reader :type_name, :first_name, :last_name, :title, :started_on, :path,
10
- :created_at, :updated_at
9
+ attr_reader :type_name, :name, :first_name, :last_name, :title, :started_on, :ended_on,
10
+ :path, :permalink, :created_at, :updated_at
11
11
 
12
12
  def initialize(json)
13
13
  @type_name = json['type']
14
+ @name = json['first_name'].to_s + ' ' + json['last_name'].to_s
14
15
  @first_name = json['first_name']
15
16
  @last_name = json['last_name']
16
17
  @title = json['title']
17
18
  @path = json['path']
19
+ @permalink = (json['permalink'] || (json['path'] && json['path'].gsub('person/', '')))
18
20
  @started_on = json['started_on'] && DateTime.parse(json['started_on'])
21
+ @ended_on = json['ended_on'] && DateTime.parse(json['ended_on'])
19
22
  @created_at = Time.at(json['created_at']).utc
20
23
  @updated_at = Time.at(json['updated_at']).utc
21
24
  end
@@ -6,7 +6,7 @@ module Crunchbase
6
6
  RESOURCE_NAME = 'category'
7
7
  RESOURCE_LIST = 'categories'
8
8
 
9
- attr_reader :type_name, :name, :uuid, :path, :created_at, :updated_at
9
+ attr_reader :type_name, :name, :uuid, :path, :created_at, :updated_at, :number_of_organizations
10
10
 
11
11
  def initialize(json)
12
12
  @type_name = json['type']
@@ -15,6 +15,7 @@ module Crunchbase
15
15
  @path = json['path']
16
16
  @created_at = Time.at(json['created_at']).utc
17
17
  @updated_at = Time.at(json['updated_at']).utc
18
+ @number_of_organizations = json['number_of_organizations']
18
19
  end
19
20
 
20
21
  end
@@ -6,13 +6,14 @@ module Crunchbase
6
6
  class Competitor < CBEntity
7
7
  RESOURCE_LIST = 'competitors'
8
8
 
9
- attr_reader :type_name, :name, :last_name, :permalink, :title, :started_on, :ended_on,
9
+ attr_reader :type_name, :name, :last_name, :path, :permalink, :title, :started_on, :ended_on,
10
10
  :created_at, :updated_at
11
11
 
12
12
  def initialize(json)
13
13
  @type_name = json['type']
14
- @name = (json['name'] || (json['first_name'] + ' ' + json['last_name']))
15
- @permalink = (json['permalink'] || (json['path'] || json['path'].gsub('organization/', '')))
14
+ @name = (json['name'] || (json['first_name'].to_s + ' ' + json['last_name'].to_s))
15
+ @path = json['path']
16
+ @permalink = (json['permalink'] || (json['path'] && json['path'].gsub('organization/', '')))
16
17
  @title = json['title']
17
18
  @started_on = json['started_on']
18
19
  @ended_on = json['ended_on']
@@ -6,14 +6,16 @@ module Crunchbase
6
6
  class CurrentTeam < CBEntity
7
7
  RESOURCE_LIST = 'current_team'
8
8
 
9
- attr_reader :type_name, :first_name, :last_name, :permalink, :title, :started_on, :ended_on,
10
- :created_at, :updated_at
9
+ attr_reader :type_name, :name, :first_name, :last_name, :path, :permalink, :title,
10
+ :started_on, :ended_on, :created_at, :updated_at
11
11
 
12
12
  def initialize(json)
13
13
  @type_name = json['type']
14
+ @name = json['first_name'].to_s + ' ' + json['last_name'].to_s
14
15
  @first_name = json['first_name']
15
16
  @last_name = json['last_name']
16
- @permalink = (json['permalink'] || json['path'].gsub('person/', ''))
17
+ @path = json['path']
18
+ @permalink = (json['permalink'] || (json['path'] && json['path'].gsub('person/', '')))
17
19
  @title = json['title']
18
20
  @started_on = json['started_on']
19
21
  @ended_on = json['ended_on']
@@ -6,12 +6,13 @@ module Crunchbase
6
6
  class Customer < CBEntity
7
7
  RESOURCE_LIST = 'customers'
8
8
 
9
- attr_reader :type_name, :name, :path, :created_at, :updated_at
9
+ attr_reader :type_name, :name, :permalink, :path, :created_at, :updated_at
10
10
 
11
11
  def initialize(json)
12
12
  @type_name = json['type']
13
13
  @name = json['name']
14
14
  @path = json['path']
15
+ @permalink = json['path'] && json['path'].gsub('organization/', '')
15
16
  @created_at = Time.at(json['created_at']).utc
16
17
  @updated_at = Time.at(json['updated_at']).utc
17
18
  end
@@ -13,7 +13,7 @@ module Crunchbase
13
13
  @type_name = json['type']
14
14
  @title = json['title']
15
15
  @original_path = json['path']
16
- @path = Crunchbase::API.image_url + json['path']
16
+ @path = json['path'] && Crunchbase::API.image_url + json['path']
17
17
  @created_at = Time.at(json['created_at']).utc
18
18
  @updated_at = Time.at(json['updated_at']).utc
19
19
  end
@@ -15,7 +15,7 @@ module Crunchbase
15
15
  @path = json['path']
16
16
  @parent_location_uuid = json['parent_location_uuid']
17
17
  @uuid = json['uuid']
18
- @type_name = json['type_name']
18
+ @type_name = json['type']
19
19
  @created_at = Time.at(json['created_at']).utc
20
20
  @updated_at = Time.at(json['updated_at']).utc
21
21
  end
@@ -8,8 +8,8 @@ module Crunchbase
8
8
  class PastTeam < CBEntity
9
9
  RESOURCE_LIST = 'past_team'
10
10
 
11
- attr_reader :type_name, :name, :first_name, :last_name, :path, :permalink, :title, :started_on,
12
- :ended_on, :created_at, :updated_at
11
+ attr_reader :type_name, :name, :first_name, :last_name, :path, :permalink, :title,
12
+ :started_on, :ended_on, :created_at, :updated_at
13
13
 
14
14
  def initialize(json)
15
15
  @type_name = json['type']
@@ -14,7 +14,7 @@ module Crunchbase
14
14
  @type_name = json['type']
15
15
  properties = json['properties']
16
16
 
17
- @name = properties['first_name'] + ' ' + properties['last_name']
17
+ @name = properties['first_name'].to_s + ' ' + properties['last_name'].to_s
18
18
  @first_name = properties['first_name']
19
19
  @last_name = properties['last_name']
20
20
  @permalink = properties['permalink']
@@ -12,7 +12,7 @@ module Crunchbase
12
12
  @type_name = json['type']
13
13
  @title = json['title']
14
14
  @original_path = json['path']
15
- @path = Crunchbase::API.image_url + json['path']
15
+ @path = json['path'] && (Crunchbase::API.image_url + json['path'])
16
16
  @created_at = Time.at(json['created_at']).utc
17
17
  @updated_at = Time.at(json['updated_at']).utc
18
18
  end
@@ -11,7 +11,7 @@ module Crunchbase
11
11
  @announced_on = hash["announced_on"] && DateTime.parse(hash["announced_on"])
12
12
  @name = hash["name"]
13
13
  @path = hash["path"]
14
- @permalink = hash["path"].split('/').last
14
+ @permalink = hash["path"] && hash["path"].split('/').last
15
15
  @created_at = hash['created_at'] && Time.at(hash['created_at']).utc
16
16
  @updated_at = hash['updated_at'] && Time.at(hash['updated_at']).utc
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Crunchbase
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  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.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: