xing_api 0.5 → 0.6
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/lib/xing_api/company/update/comment.rb +27 -0
- data/lib/xing_api/company/update.rb +36 -0
- data/lib/xing_api/company.rb +27 -0
- data/lib/xing_api/user/company.rb +12 -0
- data/lib/xing_api/version.rb +1 -1
- data/lib/xing_api.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac73392397affd053a94d0096fdfbef820db5205
|
4
|
+
data.tar.gz: d836f131f9ab49b7d6bd91e431b0296e53b640ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a169fa335b000d2400d5c7afa3c4afc2fe87d0f3b6f40561f07dcfedee9d9fc0dc29cb43c24175207333bffb448ac626b12ec6e3940b7c05ee7904e813a536e3
|
7
|
+
data.tar.gz: 70b8ff977812c6826e38339ba9525fe6175efc0526f30e1f17ced85d748adbec78ef1d6226e90852d744c930ae83b05aef785efe2de4b21cfa2f2cfd004f0b85
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module XingApi
|
2
|
+
class Company
|
3
|
+
class Update
|
4
|
+
class Comment < XingApi::Base
|
5
|
+
def self.list(update_id, options = {})
|
6
|
+
request(:get, "/v1/companies/updates/#{update_id}/comments", options)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.create(update_id, content, options = {})
|
10
|
+
request(
|
11
|
+
:post,
|
12
|
+
"/v1/companies/updates/#{update_id}/comments",
|
13
|
+
{ content: content }.merge(options)
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.delete(update_id, comment_id, options = {})
|
18
|
+
request(
|
19
|
+
:delete,
|
20
|
+
"/v1/companies/updates/#{update_id}/comments/#{comment_id}",
|
21
|
+
options
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module XingApi
|
2
|
+
class Company
|
3
|
+
class Update < XingApi::Base
|
4
|
+
def self.list(company_id, options = {})
|
5
|
+
request(:get, "/v1/companies/#{company_id}/updates", options)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.create(company_id, headline, content, options = {})
|
9
|
+
request(
|
10
|
+
:post,
|
11
|
+
"/v1/companies/#{company_id}/updates",
|
12
|
+
{
|
13
|
+
headline: headline,
|
14
|
+
content: content
|
15
|
+
}.merge(options)
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.edit(update_id, options = {})
|
20
|
+
request(:put, "/v1/companies/updates/#{update_id}", options)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.delete(update_id, options = {})
|
24
|
+
request(:delete, "/v1/companies/updates/#{update_id}", options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.like(update_id, options = {})
|
28
|
+
request(:put, "/v1/companies/updates/#{update_id}/like", options)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.unlike(update_id, options = {})
|
32
|
+
request(:delete, "/v1/companies/updates/#{update_id}/like", options)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module XingApi
|
2
|
+
class Company < XingApi::Base
|
3
|
+
def self.find(company_id, options = {})
|
4
|
+
request(:get, "/v1/companies/#{company_id}", options)
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.search(keywords, options = {})
|
8
|
+
request(:get, '/v1/companies/find', { keywords: keywords }.merge(options))
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.unfollow(company_id, options = {})
|
12
|
+
request(:delete, "/v1/companies/#{company_id}/follow", options)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.follow(company_id, options = {})
|
16
|
+
request(:put, "/v1/companies/#{company_id}/follow", options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.employees(company_id, options = {})
|
20
|
+
request(:get, "/v1/companies/#{company_id}/employees", options)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.contacts(company_id, options = {})
|
24
|
+
request(:get, "/v1/companies/#{company_id}/contacts", options)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -29,6 +29,18 @@ module XingApi
|
|
29
29
|
{ company_id: company_id }.merge(options)
|
30
30
|
)
|
31
31
|
end
|
32
|
+
|
33
|
+
def self.recommendations(options = {})
|
34
|
+
request(:get, '/v1/companies/recommendations', options)
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.following(options = {})
|
38
|
+
request(:get, '/v1/users/me/companies/following', options)
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.managing(options = {})
|
42
|
+
request(:get, '/v1/users/me/companies/managing', options)
|
43
|
+
end
|
32
44
|
end
|
33
45
|
end
|
34
46
|
end
|
data/lib/xing_api/version.rb
CHANGED
data/lib/xing_api.rb
CHANGED
@@ -11,6 +11,9 @@ require 'xing_api/activity'
|
|
11
11
|
require 'xing_api/activity/comment'
|
12
12
|
require 'xing_api/activity/like'
|
13
13
|
require 'xing_api/bookmark'
|
14
|
+
require 'xing_api/company'
|
15
|
+
require 'xing_api/company/update'
|
16
|
+
require 'xing_api/company/update/comment'
|
14
17
|
require 'xing_api/contact'
|
15
18
|
require 'xing_api/contact/tag'
|
16
19
|
require 'xing_api/contact_request'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xing_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Schmidt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
@@ -98,6 +98,9 @@ files:
|
|
98
98
|
- lib/xing_api/base.rb
|
99
99
|
- lib/xing_api/bookmark.rb
|
100
100
|
- lib/xing_api/client.rb
|
101
|
+
- lib/xing_api/company.rb
|
102
|
+
- lib/xing_api/company/update.rb
|
103
|
+
- lib/xing_api/company/update/comment.rb
|
101
104
|
- lib/xing_api/contact.rb
|
102
105
|
- lib/xing_api/contact/tag.rb
|
103
106
|
- lib/xing_api/contact_request.rb
|