cleanup & small fixes. Added some more IBinaryContainer implementations which are used by plugins which aren't rolled out yet. (but I didn't want to loose the code)

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2524 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-03-07 10:08:57 +00:00
commit b7b89ade04
7 changed files with 167 additions and 38 deletions

View file

@ -66,10 +66,12 @@ namespace GreenshotDropboxPlugin {
// Try to get a URL to the uploaded image
try {
string responseString = oAuth.MakeOAuthRequest(HTTPMethod.GET, "https://api.dropbox.com/1/shares/sandbox/" + OAuthSession.UrlEncode3986(filename), null, null, null);
LOG.DebugFormat("Parsing output: {0}", responseString);
IDictionary<string, object> returnValues = JSONHelper.JsonDecode(responseString);
if (returnValues.ContainsKey("url")) {
return returnValues["url"] as string;
if (responseString != null) {
LOG.DebugFormat("Parsing output: {0}", responseString);
IDictionary<string, object> returnValues = JSONHelper.JsonDecode(responseString);
if (returnValues.ContainsKey("url")) {
return returnValues["url"] as string;
}
}
} catch (Exception ex) {
LOG.Error("Can't parse response.", ex);