Created
July 14, 2012 06:38
-
-
Save axemclion/3109735 to your computer and use it in GitHub Desktop.
Aviary - Filter Effects
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
var secret = "7e58cceaf"; | |
var params = { | |
api_key: "c92a196a2", | |
app_version: "1.0", | |
backgroundcolor: "", | |
calltype: "render", | |
cellheight: 300, | |
cellwidth: 300, | |
cols: 1, | |
filepath: encodeURIComponent("http://ec2-50-19-59-245.compute-1.amazonaws.com/upload/41681e2c-2232-4f14-a39f-c699b71a91a4.jpg"), | |
filterid: 20, | |
format: "png", | |
hardware_version: 1, | |
platform: "web", | |
quality: "100", | |
renderparameters: "", | |
rows: 1, | |
scale: 1, | |
software_version: 1, | |
ts: new Date().getTime() / 1000, | |
version: "0.2" | |
}; | |
function avPost(){ | |
var url = ["http://cartonapi.aviary.com/services/ostrich/render?"]; | |
var msg = []; | |
for (key in params) { | |
url.push(key + "=" + params[key]); | |
msg.push(key); | |
msg.push(params[key]); | |
} | |
url.push("api_sig=" + CryptoJS.MD5(secret + msg.join(""))); | |
console.log(url.join("&")); | |
window.open(url.join("&")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment