crunchbase-ruby-library 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91153b9e83f5c3270eabbbf641da01759ed1c556
4
- data.tar.gz: f1b5910214f88fda6daaaae8eeb44784cf799f85
3
+ metadata.gz: 9c1369c879d7ae6abcc3c0691d052e349da787cb
4
+ data.tar.gz: 5a0767cf583d4ba492e8573e47bd8190180881a6
5
5
  SHA512:
6
- metadata.gz: be6ccbf1793797e07d413d3551ed43f5a03957434129c518f5cb6aacf8c1ae906f4d695a8aa30b193fb8eeb8dbf6e9ec0148f38b105a4200ec85720c8c1164cb
7
- data.tar.gz: 8c316527b8521ce2fd2246491556c3e7e802cdd848b594b45d5b1e930b54fee96b424f4bbe70749419b469eaa799eeb347bdcc5d9c1b516077734d10a227fe7a
6
+ metadata.gz: 53d5afedbb3347f6070c20ef3cb121a4f87b8597c5033145f29910e6df0c26ce1b0c4aad8b58be79fcd391fd441394ef0e749e3421758f9df68c0c7afd8a3313
7
+ data.tar.gz: 9edc9efb7e651c8535b12509ec3fe8caa8512092cf749ae6bc5b48a3a93186e126c13627da2d34f58cb6f83ecdf4e74de821dd2fc91dcde85da86ba0627113c0
@@ -4,7 +4,7 @@ inherit_from: .rubocop_todo.yml
4
4
 
5
5
  AllCops:
6
6
  DisplayCopNames: true
7
- TargetRubyVersion: 2.3
7
+ TargetRubyVersion: 2.4
8
8
  Exclude:
9
9
  - '**/*.yml'
10
10
  - 'tmp/**/*'
@@ -45,11 +45,11 @@ Style/StringLiteralsInInterpolation:
45
45
 
46
46
  Style/CaseIndentation:
47
47
  # Valid values are: case, end
48
- IndentWhenRelativeTo: end
48
+ EnforcedStyle: end
49
49
  IndentOneStep: false
50
50
 
51
51
  Lint/EndAlignment:
52
- AlignWith: variable
52
+ EnforcedStyleAlignWith: variable
53
53
 
54
54
  Lint/UselessAssignment:
55
55
  Enabled: false
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Crunchbase
1
+ # CrunchBase
2
2
 
3
3
  Crunchbase API v3.1 - Ruby Library [CrunchBase Data Hub](https://data.crunchbase.com/v3.1/docs/using-the-api).
4
4
 
@@ -22,13 +22,13 @@ Or install it yourself as:
22
22
 
23
23
  ### Certificate (User Key)
24
24
 
25
- Create the file `config/initializers/crunchbase.rb` in your rails project and add user_key.
25
+ Create the file `config/initializers/crunchbase.rb` in your rails project and add user key.
26
26
 
27
27
  require 'crunchbase'
28
28
 
29
29
  Crunchbase::API.key = 'user_key'
30
30
  Crunchbase::API.debug = false
31
- Crunchbase::API.timtout = 60 # Default value is 60
31
+ Crunchbase::API.timeout = 60 # Default value is 60
32
32
 
33
33
  ### Creating request client
34
34
 
@@ -66,14 +66,19 @@ Create the file `config/initializers/crunchbase.rb` in your rails project and ad
66
66
 
67
67
  ### Get Organization by the permalink
68
68
 
69
- => response = client.get('facebook', 'Organization')
69
+ * response = client.get('facebook', 'Organization')
70
70
 
71
- Relationship objects [ primary_image founders current_team investors owned_by sub_organizations headquarters offices products categories customers competitors members memberships funding_rounds investments acquisitions acquired_by ipo funds websites images videos news ]
71
+ - Relationship objects
72
+ [
73
+ primary_image founders current_team investors owned_by sub_organizations
74
+ headquarters offices products categories customers competitors
75
+ members memberships funding_rounds investments acquisitions acquired_by
76
+ ipo funds websites images videos news
77
+ ]
72
78
 
73
- methods: Get Organization with one relationship data
74
-
75
- => response = client.get('facebook', 'Organization', 'PastTeam')
76
- past_team.results.collect { |p| [p.title, p.person.first_name] }
79
+ - Methods: Get Organization with one relationship data
80
+ * response = client.get('facebook', 'Organization', 'PastTeam')
81
+ * past_team.results.collect { |p| [p.title, p.person.first_name] }
77
82
 
78
83
  ....
79
84
 
@@ -113,7 +118,8 @@ Max 10 requests per search allowed.
113
118
 
114
119
  ### How to debug in the console
115
120
 
116
- $ ruby bin/console OR ./bin/console
121
+ $ 1. ruby bin/console
122
+ $ 2. ./bin/console
117
123
  => client = Crunchbase::Client.new
118
124
  => ...
119
125
 
@@ -7,8 +7,10 @@ require 'yaml'
7
7
 
8
8
  # Setup the user key for API
9
9
  yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'spec', 'crunchbase.yml'))
10
+
10
11
  Crunchbase::API.key = yaml['key']
11
12
  Crunchbase::API.debug = yaml['debug']
13
+ Crunchbase::API.timeout = yaml['timeout']
12
14
 
13
15
  # (If you use this, don't forget to add pry to your Gemfile!)
14
16
  require "pry"
@@ -12,7 +12,7 @@ require 'crunchbase/api'
12
12
  require 'crunchbase/exception'
13
13
 
14
14
  module Crunchbase
15
- API_VERSION = '3.1'.freeze
15
+ API_VERSION = 'v3.1'.freeze
16
16
  API_BASE_URL = 'https://api.crunchbase.com'.freeze
17
17
  WEB_SITE_URL = 'https://www.crunchbase.com'.freeze
18
18
  IMAGE_URL = 'https://res.cloudinary.com/crunchbase-production/'.freeze
@@ -37,7 +37,7 @@ module Crunchbase
37
37
  }.freeze
38
38
 
39
39
  @redirect_limit = 2
40
- @timeout = 60
40
+ @timeout = 60
41
41
  @debug = false
42
42
 
43
43
  # Must be overridden in subclasses
@@ -54,7 +54,7 @@ module Crunchbase
54
54
  attr_accessor :debug, :timeout, :redirect_limit
55
55
 
56
56
  def api_url
57
- API_BASE_URL.gsub(/\/$/, '') + '/v' + API_VERSION + '/'
57
+ [API_BASE_URL, '/', API_VERSION, '/'].join
58
58
  end
59
59
 
60
60
  def single_entity(permalink, entity_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crunchbase
4
- VERSION = '0.3.5'.freeze
4
+ VERSION = '0.3.6'.freeze
5
5
  end
@@ -1,2 +1,3 @@
1
1
  key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2
2
  debug: true
3
+ timeout: 60
@@ -14,6 +14,7 @@ yaml = YAML.load_file(File.join(File.dirname(__FILE__), 'crunchbase.yml'))
14
14
 
15
15
  Crunchbase::API.key = yaml['key']
16
16
  Crunchbase::API.debug = yaml['debug']
17
+ Crunchbase::API.timeout = yaml['timeout']
17
18
 
18
19
  Dir[File.dirname(__FILE__) + '/crunchbase/support/*.rb'].each { |file| require file }
19
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crunchbase-ruby-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Encore Shao