var sdk = (function(){ var sdk = {} sdk.env = "development" var endpoint = window.location.origin sdk.init = function(opt){ switch (sdk.env = opt.env || "development") { case 'test': break default: case 'development': break case 'production': break } } sdk.path = function(api){ return endpoint + api } sdk.image = function(file, size){ return "https://i.asdf.us/bucky/data/" + file.thread + "/" + file.id } // $.ajaxSetup({ // // possibly: application/json; charset=utf-8" // contentType: "application/json", // }) return sdk })()