diff --git a/static/sdk.js b/static/sdk.js index 1df061d..db436d9 100644 --- a/static/sdk.js +++ b/static/sdk.js @@ -65,13 +65,24 @@ var contented = (function() { }, "getPreviewURL": function(id) { - return baseURL + "get/" + id; // n.b. there's no better preview URL yet + return baseURL + "get/" + encodeURIComponent(id); // n.b. there's no better preview URL yet }, "getDownloadURL": function(id) { - return baseURL + "get/" + id; + return baseURL + "get/" + encodeURIComponent(id); }, "getInfoJSONURL": function(id) { - return baseURL + "info/" + id; + return baseURL + "info/" + encodeURIComponent(id); + }, + "getThumbnailURL": function(thumbnailType, id) { + return baseURL + "thumb/" + encodeURIComponent(thumbnailType) + "/" + encodeURIComponent(id); + }, + "thumbnail": { + "small_square": "s", + "medium_square": "b", + "medium": "t", + "large": "m", + "xlarge": "l", + "xxlarge": "h" } };