Skip to content

Commit

Permalink
rename and namespace update
Browse files Browse the repository at this point in the history
  • Loading branch information
ctolkien committed Jan 28, 2016
1 parent efd03a1 commit 53e76aa
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Install via Nuget
## Compressing Image

```csharp
using (var png = new TinyPng("yourSecretApiKey"))
using (var png = new TinyPngClient("yourSecretApiKey"))
{
var compressResult = await png.Compress("pathToFile or byte array or stream)");

Expand All @@ -33,7 +33,7 @@ using (var png = new TinyPng("yourSecretApiKey"))
}
```

Further details about the result of the compression are also available on the `Input` and `Output` properties.
Further details about the result of the compression are also available on the `Input` and `Output` properties. Some examples:
```csharp

//old size
Expand All @@ -50,7 +50,7 @@ Further details about the result of the compression are also available on the `I
## Resizing Images

```csharp
using (var png = new TinyPng("yourSecretApiKey"))
using (var png = new TinyPngClient("yourSecretApiKey"))
{
var compressResult = await png.Compress("pathToFile or byte array or stream)");

Expand All @@ -68,7 +68,7 @@ TinyPNG. We also include strongly type resize operations,
depending on the type of resize you want to do.

```csharp
using (var png = new TinyPng("yourSecretApiKey"))
using (var png = new TinyPngClient("yourSecretApiKey"))
{
var compressResult = await png.Compress("pathToFile or byte array or stream)");

Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/ResizeOperation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace TinyPngApi
namespace TinyPng
{

public class ScaleWidthResizeOperation : ResizeOperation
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/Responses/ApiErrorResponse.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

namespace TinyPngApi.Responses
namespace TinyPng.Responses
{
public class ApiErrorResponse
{
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/Responses/TinyPngCompressResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

namespace TinyPngApi.Responses
namespace TinyPng.Responses
{
public class TinyPngCompressResponse : TinyPngResponse
{
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/Responses/TinyPngResizeResponse.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.Http;

namespace TinyPngApi.Responses
namespace TinyPng.Responses
{
public class TinyPngResizeResponse : TinyPngResponse
{
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/Responses/TinyPngResponse.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.Http;

namespace TinyPngApi
namespace TinyPng.Responses
{
public class TinyPngResponse
{
Expand Down
8 changes: 4 additions & 4 deletions src/TinyPNG/TinyPng.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using TinyPngApi.Responses;
using TinyPng.Responses;

namespace TinyPngApi
namespace TinyPng
{
public class TinyPng : IDisposable
public class TinyPngClient : IDisposable
{
private readonly string _apiKey;
private const string ApiEndpoint = "https://api.tinify.com/shrink";
Expand All @@ -21,7 +21,7 @@ public class TinyPng : IDisposable
/// Wrapper for the tinypng.com API
/// </summary>
/// <param name="apiKey">Your tinypng.com API key, signup here: https://tinypng.com/developers </param>
public TinyPng(string apiKey)
public TinyPngClient(string apiKey)
{
if (string.IsNullOrEmpty(apiKey))
throw new ArgumentNullException(nameof(apiKey));
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/TinyPngApiException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace TinyPngApi
namespace TinyPng
{
public class TinyPngApiException : Exception
{
Expand Down
2 changes: 1 addition & 1 deletion src/TinyPNG/TinyPngApiResult.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace TinyPngApi
namespace TinyPng
{

public class TinyPngApiResult
Expand Down
7 changes: 4 additions & 3 deletions tests/TinyPng.Tests/TinyPngTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Threading.Tasks;
using TinyPng;
using Xunit;

namespace TinyPngApi.Tests
namespace TinyPng.Tests
{
public class TinyPngTests
{
Expand All @@ -10,7 +11,7 @@ public class TinyPngTests
[Fact(Skip ="integration")]
public async Task Compression()
{
var pngx = new TinyPng(apiKey);
var pngx = new TinyPngClient(apiKey);

var result = await pngx.Compress("Resources/cat.jpg");

Expand All @@ -24,7 +25,7 @@ public async Task Compression()
[Fact(Skip = "integration")]
public async Task Resizing()
{
var pngx = new TinyPng(apiKey);
var pngx = new TinyPngClient(apiKey);

var result = await pngx.Compress("Resources/cat.jpg");

Expand Down

0 comments on commit 53e76aa

Please sign in to comment.