linkedin2 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/linkedin/api/permissions.rb +1 -6
- data/lib/linkedin/api/profiles.rb +8 -0
- data/lib/linkedin/version.rb +1 -1
- data/lib/linkedin2.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: 9f04fb3c903a7ecc6b4546af838106c5d004f6da
|
4
|
+
data.tar.gz: 17d2c3692974aaaf990a05a5d0a72a671af02dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e73559188b36a4b0a2bbc7bd2597a2a8394842cc5ec2fe5b9a51b3e06c0e34d24e39d137c21209286f7bddc7ca0b319272b1bb1c5dcc978d586559bbe4e3c00
|
7
|
+
data.tar.gz: ab080d48049b5ce4f82c651992238ca2a37dc995b00a58e2d182f83902ec92bb3ee14f1a29b9ec0ca92b5d05e476ee9d13c0ac2ab31c1fb4629357ca52805108
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ A modernized LinkedIn Ruby client.
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
gem '
|
11
|
+
gem 'linkedin2'
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
@@ -16,7 +16,7 @@ And then execute:
|
|
16
16
|
|
17
17
|
Or install it yourself as:
|
18
18
|
|
19
|
-
$ gem install
|
19
|
+
$ gem install linkedin2
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
@@ -6,7 +6,7 @@ module LinkedIn
|
|
6
6
|
POSITIONS = { 'positions' => [ 'id', 'title', 'summary', 'start-date', 'end-date', 'is-current', COMPANY ] }
|
7
7
|
PROFILE_REQ = { 'api-standard-profile-request' => ['url', 'headers'] }
|
8
8
|
|
9
|
-
PROFILE_BASE = [ 'id', 'first-name', 'last-name','maiden-name', 'formatted-name', 'phonetic-first-name',
|
9
|
+
PROFILE_BASE = [ 'id', 'first-name', 'last-name','maiden-name', 'formatted-name', 'phonetic-first-name',
|
10
10
|
'phonetic-last-name', 'formatted-phonetic-name', 'headline', 'industry', 'distance',
|
11
11
|
'current-share', 'num-connections', 'num-connections-capped', 'summary', 'specialties',
|
12
12
|
'picture-url', 'site-standard-profile-request', 'public-profile-url',
|
@@ -21,11 +21,6 @@ module LinkedIn
|
|
21
21
|
'mfeed-rss-url', 'following', 'job-bookmarks', 'suggestions', 'date-of-birth',
|
22
22
|
'member-url-resources', 'related-profile-views', 'honors-awards' ]
|
23
23
|
|
24
|
-
|
25
|
-
%i(company location positions profile_base relation member_resources full_base).each do |field|
|
26
|
-
private_constant field.upcase
|
27
|
-
end
|
28
|
-
|
29
24
|
R_BASICPROFILE = PROFILE_BASE + [ RELATION ]
|
30
25
|
R_EMAILADDRESS = [ 'email-address' ]
|
31
26
|
R_FULLPROFILE = FULL_BASE + [ MEMBER_RESOURCES ]
|
@@ -17,6 +17,14 @@ module LinkedIn
|
|
17
17
|
profile [selector, 'connections'].join '/'
|
18
18
|
end
|
19
19
|
|
20
|
+
def shared_connections(selector, offset = 0, limit = 10, token = nil)
|
21
|
+
query = "#{selector.to_param}:(#{Permissions.render_permissions Permissions::RELATION})"
|
22
|
+
get "v1/people/#{query}" do |req|
|
23
|
+
req.params.merge! start: offset, count: limit
|
24
|
+
req.headers.merge! 'x-li-auth-token' => token unless token.blank?
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
def search(options = {})
|
21
29
|
get "v1/people-search?#{options.to_param}"
|
22
30
|
end
|
data/lib/linkedin/version.rb
CHANGED
data/lib/linkedin2.rb
CHANGED
@@ -34,7 +34,7 @@ module LinkedIn
|
|
34
34
|
Client.new options, &block
|
35
35
|
end
|
36
36
|
|
37
|
-
|
37
|
+
[:r_basicprofile, :r_emailaddress, :r_fullprofile, :r_contactinfo, :r_network, :rw_groups, :rw_nus, :w_messages].each do |field|
|
38
38
|
define_singleton_method field do
|
39
39
|
API::Permissions.const_get field.to_s.upcase
|
40
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Breznak
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|