lib/yammer/api/message.rb in yam-2.3.0 vs lib/yammer/api/message.rb in yam-2.4.0
- old
+ new
@@ -31,9 +31,15 @@
# @option opts [Array<Integer>] :pending_attachment_ids
# @example Create a new message
# msg1 = Yammer.create_message('what are you workings on?')
#
# msg2 = Yammer.create_message('building a yammer client', :replied_to_id => msg.id)
+ #
+ # @example Attaching files
+ # file1 = File.open('test1.txt')
+ # file2 = File.open('test2.txt')
+ # msg3 = Yammer.create_message('building a yammer client', :attachment1 => file1, :attachment2 => file2 )
+ #
def create_message(body, opts={})
opts[:body] = body
post("/api/v1/messages", opts)
end