module EzLinkedin::Api::UpdateMethods

Public Instance Methods

join_group(id) click to toggle source

Join a group @param id [Fixnum] number representing group id

@return [HTTP:Response] response of put call

# 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) click to toggle source

post a share to Linkedin @param share [Hash] a hash containing at least the required

attributes for a share.
post_share({:comment => "I'm a comment",
            :content => { :title => "A title!",
                          :description => "A description",
                          :submitted_url => "http...",
                          :submitted_image_url => "http..."
                          },
            :visibility => { :code => "anyone"}
            })

@return [HTTP::Response] response of post call

# 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