Module: LinkedIn::Api::Communications
- Included in:
- Client
- Defined in:
- lib/linked_in/api/communications.rb
Overview
Communications APIs
Instance Method Summary collapse
-
#send_message(subject, body, recipient_paths) ⇒ void
(Create) send a message from the authenticated user to a connection.
Instance Method Details
#send_message(subject, body, recipient_paths) ⇒ void
This method returns an undefined value.
(Create) send a message from the authenticated user to a connection
Permissions: w_messages
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/linked_in/api/communications.rb', line 26 def (subject, body, recipient_paths) path = '/people/~/mailbox' = { 'subject' => subject, 'body' => body, 'recipients' => { 'values' => recipient_paths.map do |profile_path| { 'person' => { '_path' => "/people/#{profile_path}" } } end } } post(path, MultiJson.dump(), "Content-Type" => "application/json") end |