lib/groupme/messages.rb
def create_message(group_id, text, attachments = [])
      data = {
        :message => {
          :source_guid => Time.now.to_s,
          :text => text
        }
      }
      data[:message][:attachments] = attachments if attachments.any?
      post("/groups/#{group_id}/messages", data).message
    end
# Create a message for a group
#
# @return [Hashie::Mash] Hash representing the message
# @see https://dev.groupme.com/docs/v3#messages_create
# @param group_id [String, Integer] Id of the group
# @param text [String] Text of the message
# @param attachments [Array<Hash>] Array of attachments
Create a message for a group
Create a message for a group
def create_message(group_id, text, attachments = [])
      data = {
        :message => {
          :source_guid => Time.now.to_s,
          :text => text
        }
      }
      data[:message][:attachments] = attachments if attachments.any?
      post("/groups/#{group_id}/messages", data).message
    end
def create_message ( group_id , text , attachments = [ ] ) data = { :message => { :source_guid => Time . now . to_s , :text => text } } data [ :message ] [ :attachments ] = attachments if attachments . any? post ( "/groups/#{group_id}/messages" , data ) . message end
Create a message for a group
Create a message for a group
Hash representing the message
Hash representing the message
Hashie::Mash
group_id
Id of the group
Id of the group
text
Text of the message
Text of the message
attachments
Array of attachments
Array of attachments
see
None