Class: LinkedIn::Communications
- Inherits:
-
APIResource
- Object
- APIResource
- LinkedIn::Communications
- Defined in:
- lib/linked_in/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.
Methods inherited from APIResource
Constructor Details
This class inherits a constructor from LinkedIn::APIResource
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
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/linked_in/communications.rb', line 24 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, ) end |