Created
January 31, 2012 14:38
-
-
Save uemuraj/1710823 to your computer and use it in GitHub Desktop.
さくらのクラウドのAPIを試してみた
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 groovy | |
def apikey = "99999999999999999999999" | |
def secret = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" | |
Authenticator.default = new Authenticator() { | |
public PasswordAuthentication getPasswordAuthentication () { | |
return new PasswordAuthentication (apikey, secret.toCharArray()); | |
} | |
} | |
def spec = "https://secure.sakura.ad.jp/cloud/api/cloud/0.2/server" | |
println groovy.json.JsonOutput.prettyPrint(new URL(spec).getText()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment