Skip to content

Instantly share code, notes, and snippets.

Created January 28, 2016 16:44
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 anonymous/36ca8987b54acdb8422d to your computer and use it in GitHub Desktop.
Save anonymous/36ca8987b54acdb8422d to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'httparty'
class UrlApi
auth = {:username => "nottellingyou", :password => "******"}
@apiresponse = HTTParty.get("link_im_paring_goes_here", :basic_auth => auth)
def get_uri
@response = JSON.parse(@apiresponse.body)
@uri = response['uri']
end
end
download_url = UrlApi.new
puts download_url.get_uri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment