Created
April 6, 2011 21:36
-
-
Save therabidbanana/906588 to your computer and use it in GitHub Desktop.
A Simple HTTP script to automate finding grid spaces. (For http://therabidbanana.github.com/apiwars)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this script's occupy method didn't work very well. HTTParty isn't good at PUTs. | |
# | |
# Try rest-client gem instead: | |
# | |
# | |
# $ gem install rest-client | |
# $ restclient 'http://apiwars.heroku.com' | |
# > get '/grid/123', {:params => {:api => '...', :pin => '2222'}} | |
# ---> {...} | |
# > put '/grid/123', {:api => '...', :pin => '...', :unit => 'testunit'} | |
# ---> 201 successful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment