Module: EzLinkedin::Api::UpdateMethods
- Included in:
- Client
- Defined in:
- lib/ezlinkedin/api/update_methods.rb
Instance Method Summary collapse
-
#join_group(id) ⇒ HTTP:Response
Join a group.
-
#post_share(share) ⇒ HTTP::Response
post a share to Linkedin.
Instance Method Details
#join_group(id) ⇒ HTTP:Response
Join a group
31 32 33 34 35 |
# File 'lib/ezlinkedin/api/update_methods.rb', line 31 def join_group(id) path = "/people/~/group-memberships/#{id}" body = {'membership-state' => {'code' => 'member'}} put(path, body.to_json, "Content-Type" => "application/json") end |
#post_share(share) ⇒ HTTP::Response
post a share to Linkedin
19 20 21 22 23 |
# File 'lib/ezlinkedin/api/update_methods.rb', line 19 def post_share(share) path = "/people/~/shares" defaults = { visibility: { code: 'anyone' } } post(path, defaults.merge(share).to_json, "Content-Type" => "application/json") end |