Skip to content

Instantly share code, notes, and snippets.

View Mamadou888's full-sized avatar

Mamadou Diallo Mamadou888

View GitHub Profile
#The contents of the message_reader.rb
require "httparty"
def get_new_messages(last_message_id)
url = "http://messengr.herokuapp.com/messages.json"
return HTTParty.get(url, :query => {:last_message_id => last_message_id})
end
last_message_id = 970
#The contents of the message_reader.rb
require "httparty"
def get_new_messages(last_message_id)
url = "http://messengr.herokuapp.com/messages.json"
return HTTParty.get(url, :query => {:last_message_id => last_message_id})
end
last_message_id = 970