Created
January 28, 2016 16:44
-
-
Save anonymous/36ca8987b54acdb8422d to your computer and use it in GitHub Desktop.
This file contains 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
#!/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