linkedin2 0.0.12 → 0.0.13

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: f21650ead8956952df160eae59d15c3a0ce291a6
4
- data.tar.gz: 51d1053ddc6b96045683948c579e9b9825ff98f3
3
+ metadata.gz: 784a2b1e59ee322da6d88c34dff578b289cee1fb
4
+ data.tar.gz: db782934e02027cc081125b672f8ab548140ab08
5
5
  SHA512:
6
- metadata.gz: 93aa6944077526c2b8dcc19f0e033fe4764ca88139b5222ae6497af493d14086bed69c200bcdf7f27cda2180dfabd6c4bb4bb012f6a40c295f50dd0ae9ee75af
7
- data.tar.gz: 8511a8e244f5c466dd17aa4672494933c060e52cfbd443719c1a8a5359c91242816ed9c30d10dcdc0a5c536cb3279b05b33e102d77794af311bcbba79f5331ba
6
+ metadata.gz: bae1dc38a2d8df7845ad36cbbaa307e5c9cdc18fdebe7d2d063637d246221356ab24f17b9957ffbeeec134e054f4df76833dfd34db1d06b25f99bc1efbaca673
7
+ data.tar.gz: e74e9381cb02ce3706335904e583860f921f120486ac9fbe2a129341d353e14823885846f768e72d6f9b00e5b4ce21dae39df4a468b0688270f2a98546f9a2d5
@@ -25,8 +25,10 @@ module LinkedIn
25
25
  end
26
26
  end
27
27
 
28
- def search(options = {})
29
- get "v1/people-search?#{options.to_param}"
28
+ def search(options = {}, token = nil)
29
+ get "v1/people-search?#{options.to_param}" do |req|
30
+ req.headers.merge! 'x-li-auth-token' => token unless token.blank?
31
+ end
30
32
  end
31
33
 
32
34
  def connect_with(selector, subject, message, type = :friend, auth_name = nil, auth_value = nil)
@@ -10,6 +10,7 @@ module LinkedIn
10
10
 
11
11
  HTTP_METHODS = [:get, :post, :put, :patch, :delete, :headers].freeze
12
12
 
13
+ attr_writer :profile_fields
13
14
  attr_reader :access_token
14
15
 
15
16
  def_delegators :@access_token, :expires?, :expired?, :request
@@ -48,10 +49,11 @@ module LinkedIn
48
49
  end
49
50
 
50
51
  def profile_fields
52
+ return @profile_fields if @profile_fields
51
53
  scopes = config.scope unless config.scope.respond_to?(:values)
52
54
  scopes ||= config.scope
53
55
 
54
- scopes.reduce([]) { |fields, scope| fields + LinkedIn.send(scope) }
56
+ @profile_fields = scopes.reduce([]) { |fields, scope| fields + LinkedIn.send(scope) }
55
57
  end
56
58
 
57
59
  def method_missing(method, *args, &body)
@@ -1,3 +1,3 @@
1
1
  module LinkedIn
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  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.12
4
+ version: 0.0.13
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-03-17 00:00:00.000000000 Z
12
+ date: 2014-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2