ezlinkedin 0.5.2 → 0.5.3
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 +6 -1
- data/lib/ezlinkedin/search.rb +7 -6
- data/lib/ezlinkedin/version.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: 18e983581138cb325e950e0f02321738c455c1ba
|
4
|
+
data.tar.gz: f9589dad85c4c3e4d3696ce6fe3ac59be36ff344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/ezlinkedin/search.rb
CHANGED
@@ -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
|
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
|
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 =
|
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 !=
|
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)})"
|
data/lib/ezlinkedin/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|