Sha256: 5e0f248f0a28ef5e92d5a4f3a9b4ada500f31e8f54305ee8a8d7b50c69e83a48

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

module EzLinkedin
	module Api

		module UpdateMethods
			
			# 
			# 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
			def post_share(share)
				path = "/people/~/shares"
				defaults = { visibility: { code: 'anyone' } }
				post(path, defaults.merge(share).to_json, "Content-Type" => "application/json")
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ezlinkedin-0.0.1 lib/ezlinkedin/api/update_methods.rb