Skip to content

Instantly share code, notes, and snippets.

@rileytg
Last active December 18, 2015 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileytg/5809242 to your computer and use it in GitHub Desktop.
Save rileytg/5809242 to your computer and use it in GitHub Desktop.
example api call into ruby obj
require 'json'
require 'rest-client'
response = RestClient.get "/gem/#{name}.json"
version = JSON.parse(response)['version']
@rileytg
Copy link
Author

rileytg commented Jun 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment