* @param format of thumbnail
*
* @return special objects that provides different ways to access thumbnail
*/
public ThumbnailDownload getThumbnail(String path, ThumbnailSize size, ThumbnailFormat format) {
OAuthRequest request = new OAuthRequest(Verb.GET, THUMBNAILS_URL + encode(path));
if (size != THUMBNAIL_SIZE) {
request.addQuerystringParameter("size", size.toString());
}
if (format != THUMBNAIL_FORMAT) {
request.addQuerystringParameter("format", format.toString());
}
service.signRequest(accessToken, request);
Response response = checkThumbnails(request.send());
return new ThumbnailDownload(response, path, size, format);
}