ezlinkedin 0.5.2 → 0.5.3

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: 2fad8964262cf88a3f1256749ca8a883f88495e5
4
- data.tar.gz: 055e3da775bdd9af13d2037e3789a92d3512779b
3
+ metadata.gz: 18e983581138cb325e950e0f02321738c455c1ba
4
+ data.tar.gz: f9589dad85c4c3e4d3696ce6fe3ac59be36ff344
5
5
  SHA512:
6
- metadata.gz: 38198a60608cb378749ec6042f6f12aec0fdab1e717137b90d2d75a26b45a01caaebbd6177b8a087e4ae3c42d274b6fc91bc42ef9a2fdf9e8a8cee7871252e09
7
- data.tar.gz: 1bf2f9f87b46a5502bd4e0daac4c45279ce93ba2824c3d1f70334100c6dca3b022bfb5a4f888396d98c5c408881b5b3696d02ade72ffd021dd08ed5e21357242
6
+ metadata.gz: 9a895133706a4546c27b2ae81bcf181270d006eab37027b89a52327b33752c59664dff44e251af5a481c66476d05e2b8091f15fdc4693170abe4513389b0a283
7
+ data.tar.gz: e686d26e84edbd727bb410e6a6168e01fde84a4c0c053ae20496f0ae0c3d90fb4f07842b66f16e5b56aa746edd2edad0c841635f7c7c8545f88defc61d8d9c61
data/README.md CHANGED
@@ -34,6 +34,7 @@ require 'ezlinkedin'
34
34
  linkedin = EzLinkedin::Client.new("API KEY", "SECRET KEY", options) # options are the typical OAuth consumer options
35
35
  linkedin.authorize("access_token", "access_token_secret") # tokens obtained from omniauth
36
36
 
37
+ # make calls on linkedin
37
38
  linkedin.profile(id: 1234, fields: ['name', 'email']
38
39
  linkedin.connections(count: 30)
39
40
  linkedin.network_updates(types: [:shar, :prfx, :conn], count: 50)
@@ -43,12 +44,16 @@ linkedin.post_share({:comment => "I'm a comment",
43
44
  :submitted_url => "http...",
44
45
  :submitted_image_url => "http..." },
45
46
  :visibility => { :code => "anyone"} })
47
+ linkedin.search(company: ['id', 'name'], keywords: 'apple')
48
+ linkedin.search(people: ['first-name', 'id'], last_name: 'johnson')
46
49
  ```
50
+
47
51
  Currently, one can:
48
52
  * post shares
49
53
  * retrieve network updates, user profile, and connections
50
- * search for companies
54
+ * search for companies and people
51
55
  * use the company and people search api
56
+ * join groups
52
57
 
53
58
  ## TODO
54
59
 
@@ -7,22 +7,23 @@ module EzLinkedin
7
7
  # a string of keyword(s).
8
8
  # In order to specify fields for a resource(companies or people):
9
9
  # pass in the fields as a hash of arrays with the type of search as the key.
10
- # In this context, regular 'fields' key is for field pertaining to the search
10
+ # In this context, regular 'fields' key is for fields pertaining to the search
11
11
  # and not the resource being searched on.
12
12
  # client.search(:people => ['id', 'first-name'], fields: ['num-results'], first_name: 'bob')
13
13
  # client.search(:company => ['id', 'name'], keywords: 'stuff')
14
- # @param type="people" [String or symbol] :people or :company search?
15
14
  #
16
15
  # @return [Mash] hash of results
17
- def search(options, type="people")
16
+ def search(options)
17
+ type = :people
18
+
18
19
  path = "/#{type.to_s}-search"
19
20
  if options.is_a?(Hash)
20
21
  if options.has_key? :company
21
- type = 'company'
22
+ type = :company
23
+ path = "/#{type.to_s}-search"
22
24
  end
23
- path = "/#{type.to_s}-search"
24
25
  if type_fields = options.delete(type.to_sym)
25
- if type != 'people'
26
+ if type != :people
26
27
  path += ":(companies:(#{type_fields.join(',')})#{search_fields(options)})"
27
28
  else
28
29
  path += ":(people:(#{type_fields.join(',')})#{search_fields(options)})"
@@ -1,3 +1,3 @@
1
1
  module Ezlinkedin
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezlinkedin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - akonwi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-07 00:00:00.000000000 Z
11
+ date: 2013-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth