Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ctolkien committed Sep 7, 2016
1 parent dc3a42b commit 573e19c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/ctolkien/TinyPNG.svg?maxAge=2592000)]()


This is a .NET wrapper around the [TinyPng.com](http://tinypng.com) image compression service. This is not an official TinyPNG.com product.
This is a .NET wrapper around the [TinyPNG.com](http://tinypng.com) image compression service. This is not an official TinyPNG.com product.

* Supports .Net Core and full .Net Framework
* Non-blocking async turtles all the way down
Expand Down Expand Up @@ -136,5 +136,5 @@ on the result of any operation you've performed. This is useful for keeping tabs

```csharp
var compressedCat = await png.Compress("cat.jpg");
compressedCat.CompressionCount;
compressedCat.CompressionCount; // = 5
```
12 changes: 6 additions & 6 deletions src/TinyPNG/TinyPng.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TinyPngClient : IDisposable
/// Wrapper for the tinypng.com API
/// </summary>
/// <param name="apiKey">Your tinypng.com API key, signup here: https://tinypng.com/developers </param>
public TinyPngClient(string apiKey)
public TinyPngClient(string apiKey)
{
if (string.IsNullOrEmpty(apiKey))
throw new ArgumentNullException(nameof(apiKey));
Expand All @@ -39,8 +39,8 @@ public TinyPngClient(string apiKey)
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
jsonSettings.Converters.Add(new StringEnumConverter {CamelCaseText = true });
jsonSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true });

}

/// <summary>
Expand Down Expand Up @@ -186,7 +186,7 @@ public async Task<Uri> SaveCompressedImageToAmazonS3(TinyPngCompressResponse res

amazonSettings.Path = pathBucket;

var amazonSettingsAsJson = JsonConvert.SerializeObject(new { store = amazonSettings });
var amazonSettingsAsJson = JsonConvert.SerializeObject(new { store = amazonSettings }, jsonSettings);

var msg = new HttpRequestMessage(HttpMethod.Post, result.Output.Url);
msg.Content = new StringContent(amazonSettingsAsJson, System.Text.Encoding.UTF8, "application/json");
Expand Down Expand Up @@ -222,7 +222,7 @@ public async Task<Uri> SaveCompressedImageToAmazonS3(TinyPngCompressResponse res

if (!string.IsNullOrEmpty(regionOverride))
amazonSettings.Region = regionOverride;

return await SaveCompressedImageToAmazonS3(result, amazonSettings, pathBucket);
}

Expand All @@ -242,5 +242,5 @@ protected virtual void Dispose(bool disposing)
}
#endregion
}

}

0 comments on commit 573e19c

Please sign in to comment.