Skip to content

Instantly share code, notes, and snippets.

@charly-palencia
Created January 13, 2017 14:18
Show Gist options
  • Save charly-palencia/e8c3a7f1018d9d4de9607fbc275fd186 to your computer and use it in GitHub Desktop.
Save charly-palencia/e8c3a7f1018d9d4de9607fbc275fd186 to your computer and use it in GitHub Desktop.
require 'digest'
require 'date'
require 'faraday'
key = "----"
id = "..."
datetime = Time.now.utc.strftime('%Y%m%d%H%M%S')
digest = Digest::MD5.hexdigest("#{id}createsession#{key}#{datetime}")
# url = URI("http://api.smitegame.com/smiteapi.svc/createsessionJson/#{id}/#{digest}/#{datetime}")
#
response = Faraday.get "http://api.smitegame.com/smiteapi.svc/createsessionJson/#{id}/#{digest}/#{datetime}"
p response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment