linkedin2 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/linkedin/api/authentication.rb +7 -0
- data/lib/linkedin/api/industries.rb +22 -0
- data/lib/linkedin/version.rb +1 -1
- data/linkedin.gemspec +5 -4
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e22b4228722aeb931755451e1a67f8157ea310fb
|
4
|
+
data.tar.gz: cd03e8d6a4a4f1c6b91a1cbcd439c14d375da590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c18b8f15ff3c57ca9fd2aa88cd6f96f98ba33f1148ecab574e01aac97e3408772f3d01d9bced86103bdb144288d3487f553fd38d30e9d2604fc5a32e89883e
|
7
|
+
data.tar.gz: f5371d42aec46180eaf9bcc4742bdf67a427ca56fee04cf091ebfdb4328da1e0bf33f71cb2dc50fff0c6f273e19de4952ce605d6a975eb05d9ddc80dd6e65d6a
|
data/README.md
CHANGED
@@ -25,7 +25,8 @@ Or install it yourself as:
|
|
25
25
|
Configure an instance directly with a hash:
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
client = LinkedIn::Client.new key: <your-key>, secret: <your-secret>,
|
28
|
+
client = LinkedIn::Client.new key: <your-key>, secret: <your-secret>,
|
29
|
+
redirect_uri: <your-callback>, scope: %i(r_basicprofile r_network)
|
29
30
|
```
|
30
31
|
|
31
32
|
Or configure an instance directly with the configure method:
|
@@ -5,6 +5,7 @@ module LinkedIn
|
|
5
5
|
|
6
6
|
def authorize_url(params = {})
|
7
7
|
params.reverse_merge! config.to_h.slice :scope, :state, :redirect_uri
|
8
|
+
params[:scope] = serialize_scope params[:scope]
|
8
9
|
auth_code.authorize_url params
|
9
10
|
end
|
10
11
|
|
@@ -16,6 +17,12 @@ module LinkedIn
|
|
16
17
|
|
17
18
|
self.access_token = auth_code.get_token authorization_code, params, opts
|
18
19
|
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def serialize_scope(scope)
|
24
|
+
Array[scope].flatten.join ' '
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
@@ -21,6 +21,10 @@ module LinkedIn
|
|
21
21
|
INDUSTRIES.detect { |indust| indust[:description].to_s.downcase == description.to_s.downcase }
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.find_group_names(*groups)
|
25
|
+
Array[groups].flatten.map { |group| GROUPS[group.to_sym] }
|
26
|
+
end
|
27
|
+
|
24
28
|
INDUSTRIES = [ { code: 1, group: [:gov, :tech], description: 'Defense & Space' },
|
25
29
|
{ code: 3, group: [:tech], description: 'Computer Hardware' },
|
26
30
|
{ code: 4, group: [:tech], description: 'Computer Software' },
|
@@ -168,6 +172,24 @@ module LinkedIn
|
|
168
172
|
{ code: 146, group: [:good, :man], description: 'Packaging and Containers' },
|
169
173
|
{ code: 147, group: [:cons, :man], description: 'Industrial Automation' },
|
170
174
|
{ code: 148, group: [:gov], description: 'Government Relations' } ]
|
175
|
+
|
176
|
+
GROUPS = { agr: 'Agriculture',
|
177
|
+
art: 'Art & Design',
|
178
|
+
cons: 'Real Estate & Construction',
|
179
|
+
corp: 'Business & Operations',
|
180
|
+
edu: 'Education',
|
181
|
+
fin: 'Financial Services',
|
182
|
+
good: 'Consumer Goods',
|
183
|
+
gov: 'Government',
|
184
|
+
hlth: 'Health Care',
|
185
|
+
leg: 'Legal',
|
186
|
+
man: 'Basic Industries',
|
187
|
+
med: 'Media & Entertainment',
|
188
|
+
org: 'Charitable & Civic Organizations',
|
189
|
+
rec: 'Leisure & Recreation',
|
190
|
+
serv: 'Business Services',
|
191
|
+
tech: 'Technology',
|
192
|
+
tran: 'Transportation & Logistics' }
|
171
193
|
end
|
172
194
|
end
|
173
195
|
end
|
data/lib/linkedin/version.rb
CHANGED
data/linkedin.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'linkedin/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'linkedin2'
|
8
8
|
spec.version = LinkedIn::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Bob Breznak', 'Josh Jordan']
|
10
|
+
spec.email = ['bob@evertrue.com', 'josh.jordan@gmail.com']
|
11
11
|
spec.description = %q{Ruby wrapper for the LinkedIn API}
|
12
12
|
spec.summary = %q{Ruby wrapper for the LinkedIn API}
|
13
13
|
spec.homepage = 'https://github.com/bobbrez/linkedin2'
|
@@ -16,12 +16,13 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'oauth2', '~> 0.9'
|
22
22
|
spec.add_dependency 'hashie', '~> 2.0.5'
|
23
|
-
spec.add_dependency 'activesupport', '~>
|
23
|
+
spec.add_dependency 'activesupport', '~> 3.2'
|
24
24
|
spec.add_dependency 'faraday_middleware', '~> 0.9'
|
25
|
+
spec.add_dependency 'faraday', '~> 0.8.9'
|
25
26
|
|
26
27
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
28
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkedin2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Breznak
|
8
|
+
- Josh Jordan
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: oauth2
|
@@ -44,14 +45,14 @@ dependencies:
|
|
44
45
|
requirements:
|
45
46
|
- - "~>"
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
+
version: '3.2'
|
48
49
|
type: :runtime
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
53
|
- - "~>"
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
+
version: '3.2'
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: faraday_middleware
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +67,20 @@ dependencies:
|
|
66
67
|
- - "~>"
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0.9'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: faraday
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.8.9
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.8.9
|
69
84
|
- !ruby/object:Gem::Dependency
|
70
85
|
name: bundler
|
71
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,6 +182,7 @@ dependencies:
|
|
167
182
|
description: Ruby wrapper for the LinkedIn API
|
168
183
|
email:
|
169
184
|
- bob@evertrue.com
|
185
|
+
- josh.jordan@gmail.com
|
170
186
|
executables: []
|
171
187
|
extensions: []
|
172
188
|
extra_rdoc_files: []
|