linkedin2 0.0.9 → 0.0.10

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: e45f5c055609244d7e0c59718c6f93ca6324d62f
4
- data.tar.gz: f5b46b8c8c2537cb929eb03eb3252729aa7b630b
3
+ metadata.gz: 9f04fb3c903a7ecc6b4546af838106c5d004f6da
4
+ data.tar.gz: 17d2c3692974aaaf990a05a5d0a72a671af02dc3
5
5
  SHA512:
6
- metadata.gz: 290ea41069d546ddd9bd013f5bcd85a171212bd5709d9e544c59ecc70f29b8ef7629d2ad253f7865797ccf1ece5c7a7c5a83824ae19a375574a97c221e0a01a2
7
- data.tar.gz: 82674d2f05520e8285e589195a3007d4ef963f4e6a44237b0c9087936c7fa3a6596264d4c92c4d7e62f0b238f313d7b5c5357e5e13d1402ee4de2d00ba823b18
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 'linkedin'
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 linkedin
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
@@ -1,3 +1,3 @@
1
1
  module LinkedIn
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
data/lib/linkedin2.rb CHANGED
@@ -34,7 +34,7 @@ module LinkedIn
34
34
  Client.new options, &block
35
35
  end
36
36
 
37
- %i(r_basicprofile r_emailaddress r_fullprofile r_contactinfo r_network rw_groups rw_nus w_messages).each do |field|
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.9
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-02-13 00:00:00.000000000 Z
12
+ date: 2014-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2