From be60426031294be2917257bde652357a2922235e Mon Sep 17 00:00:00 2001 From: Joe Ecob Date: Mon, 25 Sep 2017 20:52:43 +0100 Subject: [PATCH] Rename Mondo => Monzo --- Mondo/Properties/AssemblyInfo.cs | 3 -- .../Extensions/DateTimeExtensionsTests.cs | 4 +- .../Messages/MerchantJsonConverterTests.cs | 4 +- .../Monzo.Tests.csproj | 12 +++--- .../MonzoAuthorizationClientTests.cs | 14 +++---- .../MonzoClientTests.cs | 30 ++++++------- .../PaginationOptionsTests.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +- {Mondo.Tests => Monzo.Tests}/packages.config | 0 Mondo.sln => Monzo.sln | 4 +- {Mondo => Monzo}/AccessToken.cs | 4 +- {Mondo => Monzo}/Account.cs | 2 +- {Mondo => Monzo}/Attachment.cs | 4 +- {Mondo => Monzo}/Balance.cs | 2 +- {Mondo => Monzo}/ErrorResponse.cs | 4 +- .../Extensions/DateTimeExtensions.cs | 2 +- .../IMonzoAuthorizationClient.cs | 10 ++--- .../IMondoClient.cs => Monzo/IMonzoClient.cs | 8 ++-- {Mondo => Monzo}/Merchant.cs | 2 +- {Mondo => Monzo}/MerchantAddress.cs | 2 +- .../Messages/AnnotateTransactionResponse.cs | 2 +- .../Messages/ListAccountsResponse.cs | 2 +- .../Messages/ListTransactionsResponse.cs | 2 +- .../Messages/ListWebhooksResponse.cs | 2 +- .../Messages/MerchantJsonConverter.cs | 2 +- .../Messages/RegisterAttachmentResponse.cs | 2 +- .../Messages/RegisterWebhookResponse.cs | 2 +- .../Messages/RetrieveTransactionResponse.cs | 2 +- .../Messages/UploadAttachmentResponse.cs | 2 +- Mondo/Mondo.csproj => Monzo/Monzo.csproj | 12 +++--- .../MonzoAuthorizationClient.cs | 24 +++++------ Mondo/MondoClient.cs => Monzo/MonzoClient.cs | 42 +++++++++---------- .../MonzoException.cs | 16 +++---- {Mondo => Monzo}/PaginationOptions.cs | 4 +- Monzo/Properties/AssemblyInfo.cs | 3 ++ {Mondo => Monzo}/Transaction.cs | 6 +-- {Mondo => Monzo}/Webhook.cs | 2 +- README.md | 26 ++++++------ appveyor.yml | 4 +- 39 files changed, 137 insertions(+), 137 deletions(-) delete mode 100644 Mondo/Properties/AssemblyInfo.cs rename {Mondo.Tests => Monzo.Tests}/Extensions/DateTimeExtensionsTests.cs (84%) rename {Mondo.Tests => Monzo.Tests}/Messages/MerchantJsonConverterTests.cs (95%) rename Mondo.Tests/Mondo.Tests.csproj => Monzo.Tests/Monzo.Tests.csproj (93%) rename Mondo.Tests/MondoAuthorizationClientTests.cs => Monzo.Tests/MonzoAuthorizationClientTests.cs (91%) rename Mondo.Tests/MondoClientTests.cs => Monzo.Tests/MonzoClientTests.cs (96%) rename {Mondo.Tests => Monzo.Tests}/PaginationOptionsTests.cs (97%) rename {Mondo.Tests => Monzo.Tests}/Properties/AssemblyInfo.cs (93%) rename {Mondo.Tests => Monzo.Tests}/packages.config (100%) rename Mondo.sln => Monzo.sln (84%) rename {Mondo => Monzo}/AccessToken.cs (96%) rename {Mondo => Monzo}/Account.cs (97%) rename {Mondo => Monzo}/Attachment.cs (95%) rename {Mondo => Monzo}/Balance.cs (98%) rename {Mondo => Monzo}/ErrorResponse.cs (94%) rename {Mondo => Monzo}/Extensions/DateTimeExtensions.cs (90%) rename Mondo/IMondoAuthorizationClient.cs => Monzo/IMonzoAuthorizationClient.cs (92%) rename Mondo/IMondoClient.cs => Monzo/IMonzoClient.cs (97%) rename {Mondo => Monzo}/Merchant.cs (99%) rename {Mondo => Monzo}/MerchantAddress.cs (98%) rename {Mondo => Monzo}/Messages/AnnotateTransactionResponse.cs (88%) rename {Mondo => Monzo}/Messages/ListAccountsResponse.cs (89%) rename {Mondo => Monzo}/Messages/ListTransactionsResponse.cs (89%) rename {Mondo => Monzo}/Messages/ListWebhooksResponse.cs (89%) rename {Mondo => Monzo}/Messages/MerchantJsonConverter.cs (97%) rename {Mondo => Monzo}/Messages/RegisterAttachmentResponse.cs (87%) rename {Mondo => Monzo}/Messages/RegisterWebhookResponse.cs (87%) rename {Mondo => Monzo}/Messages/RetrieveTransactionResponse.cs (88%) rename {Mondo => Monzo}/Messages/UploadAttachmentResponse.cs (94%) rename Mondo/Mondo.csproj => Monzo/Monzo.csproj (71%) rename Mondo/MondoAuthorizationClient.cs => Monzo/MonzoAuthorizationClient.cs (89%) rename Mondo/MondoClient.cs => Monzo/MonzoClient.cs (93%) rename Mondo/MondoException.cs => Monzo/MonzoException.cs (71%) rename {Mondo => Monzo}/PaginationOptions.cs (96%) create mode 100644 Monzo/Properties/AssemblyInfo.cs rename {Mondo => Monzo}/Transaction.cs (97%) rename {Mondo => Monzo}/Webhook.cs (97%) diff --git a/Mondo/Properties/AssemblyInfo.cs b/Mondo/Properties/AssemblyInfo.cs deleted file mode 100644 index 609d3bb..0000000 --- a/Mondo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Mondo.Tests")] diff --git a/Mondo.Tests/Extensions/DateTimeExtensionsTests.cs b/Monzo.Tests/Extensions/DateTimeExtensionsTests.cs similarity index 84% rename from Mondo.Tests/Extensions/DateTimeExtensionsTests.cs rename to Monzo.Tests/Extensions/DateTimeExtensionsTests.cs index 13f7bf8..8338dc9 100644 --- a/Mondo.Tests/Extensions/DateTimeExtensionsTests.cs +++ b/Monzo.Tests/Extensions/DateTimeExtensionsTests.cs @@ -1,8 +1,8 @@ using System; using NUnit.Framework; -using Mondo.Extensions; +using Monzo.Extensions; -namespace Mondo.Tests.Extensions +namespace Monzo.Tests.Extensions { [TestFixture] public sealed class DateTimeExtensionsTests diff --git a/Mondo.Tests/Messages/MerchantJsonConverterTests.cs b/Monzo.Tests/Messages/MerchantJsonConverterTests.cs similarity index 95% rename from Mondo.Tests/Messages/MerchantJsonConverterTests.cs rename to Monzo.Tests/Messages/MerchantJsonConverterTests.cs index 09bc3ea..6985bf2 100644 --- a/Mondo.Tests/Messages/MerchantJsonConverterTests.cs +++ b/Monzo.Tests/Messages/MerchantJsonConverterTests.cs @@ -1,8 +1,8 @@ -using Mondo.Messages; +using Monzo.Messages; using Newtonsoft.Json; using NUnit.Framework; -namespace Mondo.Tests.Messages +namespace Monzo.Tests.Messages { [TestFixture] public sealed class MerchantJsonConverterTests diff --git a/Mondo.Tests/Mondo.Tests.csproj b/Monzo.Tests/Monzo.Tests.csproj similarity index 93% rename from Mondo.Tests/Mondo.Tests.csproj rename to Monzo.Tests/Monzo.Tests.csproj index d2f7127..6632790 100644 --- a/Mondo.Tests/Mondo.Tests.csproj +++ b/Monzo.Tests/Monzo.Tests.csproj @@ -7,8 +7,8 @@ {25B2F959-FD51-4B9B-BEF1-FAD94E1FE74F} Library Properties - Mondo.Tests - Mondo.Tests + Monzo.Tests + Monzo.Tests v4.5.2 512 @@ -61,8 +61,8 @@ - - + + @@ -70,9 +70,9 @@ - + {ce64e281-a9d8-43c8-bd1a-a2f095a99252} - Mondo + Monzo diff --git a/Mondo.Tests/MondoAuthorizationClientTests.cs b/Monzo.Tests/MonzoAuthorizationClientTests.cs similarity index 91% rename from Mondo.Tests/MondoAuthorizationClientTests.cs rename to Monzo.Tests/MonzoAuthorizationClientTests.cs index 1f043b2..367f022 100644 --- a/Mondo.Tests/MondoAuthorizationClientTests.cs +++ b/Monzo.Tests/MonzoAuthorizationClientTests.cs @@ -2,19 +2,19 @@ using NUnit.Framework; using Owin; -namespace Mondo.Tests +namespace Monzo.Tests { [TestFixture] - public sealed class MondoAuthorizationClientTests + public sealed class MonzoAuthorizationClientTests { [Test] public void GetLoginPageUrl() { - using (var client = new MondoAuthorizationClient("testClientId", "testClientSecret", "http://foo")) + using (var client = new MonzoAuthorizationClient("testClientId", "testClientSecret", "http://foo")) { var loginPageUrl = client.GetAuthorizeUrl("testState", "testRedirectUri"); - Assert.AreEqual("https://auth.getmondo.co.uk/?response_type=code&client_id=testClientId&state=testState&redirect_uri=testRedirectUri", loginPageUrl); + Assert.AreEqual("https://auth.monzo.com/?response_type=code&client_id=testClientId&state=testState&redirect_uri=testRedirectUri", loginPageUrl); } } @@ -48,7 +48,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) + using (var client = new MonzoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) { var accessToken = await client.GetAccessTokenAsync("testCode", "testRedirectUri"); @@ -90,7 +90,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) + using (var client = new MonzoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) { var accessToken = await client.AuthenticateAsync("testUsername", "testPassword"); @@ -131,7 +131,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) + using (var client = new MonzoAuthorizationClient(server.HttpClient, "testClientId", "testClientSecret")) { var accessToken = await client.RefreshAccessTokenAsync("testAccessToken1"); diff --git a/Mondo.Tests/MondoClientTests.cs b/Monzo.Tests/MonzoClientTests.cs similarity index 96% rename from Mondo.Tests/MondoClientTests.cs rename to Monzo.Tests/MonzoClientTests.cs index 1d88303..acc4d3c 100644 --- a/Mondo.Tests/MondoClientTests.cs +++ b/Monzo.Tests/MonzoClientTests.cs @@ -5,10 +5,10 @@ using NUnit.Framework; using Owin; -namespace Mondo.Tests +namespace Monzo.Tests { [TestFixture] - public sealed class MondoApiClientTests + public sealed class MonzoApiClientTests { [Test] public async void GetAccounts() @@ -35,7 +35,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var accounts = await client.GetAccountsAsync(); @@ -68,7 +68,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var balance = await client.GetBalanceAsync("1"); @@ -128,7 +128,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var transactions = await client.GetTransactionsAsync("1"); @@ -198,7 +198,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var transactions = await client.GetTransactionsAsync("1", null, new PaginationOptions { SinceTime = new DateTime(2015, 4, 5, 18, 1, 32, DateTimeKind.Utc), Limit = 40, BeforeTime = new DateTime(2015, 12, 25, 18, 1, 32, DateTimeKind.Utc) }); @@ -251,7 +251,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var transaction = await client.GetTransactionAsync("1"); @@ -319,7 +319,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var transaction = await client.GetTransactionAsync("1", "merchant"); @@ -390,7 +390,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var transaction = await client.AnnotateTransactionAsync("1", new Dictionary { { "key1", "value1" }, {"key2", "" } }); @@ -421,7 +421,7 @@ public async void CreateFeedItem() }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { await client.CreateFeedItemAsync("1", "basic", new Dictionary { {"title", "My custom item" } }, "https://www.example.com/a_page_to_open_on_tap.html"); } @@ -455,7 +455,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var webhook = await client.CreateWebhookAsync("1", "http://example.com"); @@ -491,7 +491,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var webhooks = await client.GetWebhooksAsync("1"); @@ -519,7 +519,7 @@ public async void DeleteWebhook() }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { await client.DeleteWebhookAsync("1"); } @@ -558,7 +558,7 @@ await context.Response.WriteAsync( }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { var attachment = await client.CreateAttachmentAsync("tx_00008zIcpb1TB4yeIFXMzx", "https://s3-eu-west-1.amazonaws.com/mondo-image-uploads/user_00009237hliZellUicKuG1/LcCu4ogv1xW28OCcvOTL-foo.png", "image/png"); @@ -591,7 +591,7 @@ public async void DeleteAttachment() }); })) { - using (var client = new MondoClient(server.HttpClient, "testAccessToken")) + using (var client = new MonzoClient(server.HttpClient, "testAccessToken")) { await client.DeleteAttachmentAsync("attach_00009238aOAIvVqfb9LrZh"); } diff --git a/Mondo.Tests/PaginationOptionsTests.cs b/Monzo.Tests/PaginationOptionsTests.cs similarity index 97% rename from Mondo.Tests/PaginationOptionsTests.cs rename to Monzo.Tests/PaginationOptionsTests.cs index 6fa7d1f..cb62dbf 100644 --- a/Mondo.Tests/PaginationOptionsTests.cs +++ b/Monzo.Tests/PaginationOptionsTests.cs @@ -1,7 +1,7 @@ using System; using NUnit.Framework; -namespace Mondo.Tests +namespace Monzo.Tests { [TestFixture] public sealed class PaginationOptionsTests diff --git a/Mondo.Tests/Properties/AssemblyInfo.cs b/Monzo.Tests/Properties/AssemblyInfo.cs similarity index 93% rename from Mondo.Tests/Properties/AssemblyInfo.cs rename to Monzo.Tests/Properties/AssemblyInfo.cs index 1259194..c9f062c 100644 --- a/Mondo.Tests/Properties/AssemblyInfo.cs +++ b/Monzo.Tests/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Mondo.Client.Tests")] +[assembly: AssemblyTitle("Monzo.Client.Tests")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Mondo.Client.Tests")] +[assembly: AssemblyProduct("Monzo.Client.Tests")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Mondo.Tests/packages.config b/Monzo.Tests/packages.config similarity index 100% rename from Mondo.Tests/packages.config rename to Monzo.Tests/packages.config diff --git a/Mondo.sln b/Monzo.sln similarity index 84% rename from Mondo.sln rename to Monzo.sln index a1d97a2..86de93c 100644 --- a/Mondo.sln +++ b/Monzo.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mondo.Tests", "Mondo.Tests\Mondo.Tests.csproj", "{25B2F959-FD51-4B9B-BEF1-FAD94E1FE74F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monzo.Tests", "Monzo.Tests\Monzo.Tests.csproj", "{25B2F959-FD51-4B9B-BEF1-FAD94E1FE74F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mondo", "Mondo\Mondo.csproj", "{CE64E281-A9D8-43C8-BD1A-A2F095A99252}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monzo", "Monzo\Monzo.csproj", "{CE64E281-A9D8-43C8-BD1A-A2F095A99252}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4D96586C-1BF7-4C81-9050-62CD68AF8C8D}" ProjectSection(SolutionItems) = preProject diff --git a/Mondo/AccessToken.cs b/Monzo/AccessToken.cs similarity index 96% rename from Mondo/AccessToken.cs rename to Monzo/AccessToken.cs index dd68782..7921433 100644 --- a/Mondo/AccessToken.cs +++ b/Monzo/AccessToken.cs @@ -1,10 +1,10 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// Mondo access token response. + /// Monzo access token response. /// [DebuggerDisplay("[{Value,nq}]")] public sealed class AccessToken diff --git a/Mondo/Account.cs b/Monzo/Account.cs similarity index 97% rename from Mondo/Account.cs rename to Monzo/Account.cs index ec0c425..4c2e335 100644 --- a/Mondo/Account.cs +++ b/Monzo/Account.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// Accounts represent a store of funds, and have a list of transactions. diff --git a/Mondo/Attachment.cs b/Monzo/Attachment.cs similarity index 95% rename from Mondo/Attachment.cs rename to Monzo/Attachment.cs index 7c26c93..596b7d0 100644 --- a/Mondo/Attachment.cs +++ b/Monzo/Attachment.cs @@ -2,10 +2,10 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// Images (eg. receipts) can be attached to transactions by uploading these via the attachment API. Once an attachment is registered against a transaction, the image will be shown in the transaction detail screen within the Mondo app. + /// Images (eg. receipts) can be attached to transactions by uploading these via the attachment API. Once an attachment is registered against a transaction, the image will be shown in the transaction detail screen within the Monzo app. /// [DebuggerDisplay("[{Id,nq}]")] public sealed class Attachment diff --git a/Mondo/Balance.cs b/Monzo/Balance.cs similarity index 98% rename from Mondo/Balance.cs rename to Monzo/Balance.cs index 8f33908..202241c 100644 --- a/Mondo/Balance.cs +++ b/Monzo/Balance.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// Information about an account’s balance. diff --git a/Mondo/ErrorResponse.cs b/Monzo/ErrorResponse.cs similarity index 94% rename from Mondo/ErrorResponse.cs rename to Monzo/ErrorResponse.cs index b2322cb..d238aa5 100644 --- a/Mondo/ErrorResponse.cs +++ b/Monzo/ErrorResponse.cs @@ -2,10 +2,10 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// Mondo API error response message. + /// Monzo API error response message. /// [DebuggerDisplay("[{Error}]")] public sealed class ErrorResponse diff --git a/Mondo/Extensions/DateTimeExtensions.cs b/Monzo/Extensions/DateTimeExtensions.cs similarity index 90% rename from Mondo/Extensions/DateTimeExtensions.cs rename to Monzo/Extensions/DateTimeExtensions.cs index bff8f2d..7b4c17e 100644 --- a/Mondo/Extensions/DateTimeExtensions.cs +++ b/Monzo/Extensions/DateTimeExtensions.cs @@ -1,6 +1,6 @@ using System; -namespace Mondo.Extensions +namespace Monzo.Extensions { internal static class DateTimeExtensions { diff --git a/Mondo/IMondoAuthorizationClient.cs b/Monzo/IMonzoAuthorizationClient.cs similarity index 92% rename from Mondo/IMondoAuthorizationClient.cs rename to Monzo/IMonzoAuthorizationClient.cs index 3100abb..6b217df 100644 --- a/Mondo/IMondoAuthorizationClient.cs +++ b/Monzo/IMonzoAuthorizationClient.cs @@ -2,12 +2,12 @@ using System.Threading; using System.Threading.Tasks; -namespace Mondo +namespace Monzo { /// - /// Mondo API authorization client. + /// Monzo API authorization client. /// - public interface IMondoAuthorizationClient : IDisposable + public interface IMonzoAuthorizationClient : IDisposable { /// /// Your client ID. @@ -20,7 +20,7 @@ public interface IMondoAuthorizationClient : IDisposable string ClientSecret { get; } /// - /// Generates a Mondo OAuth authorization URL based on state and redirect. + /// Generates a Monzo OAuth authorization URL based on state and redirect. /// /// State which will be passed back to you to prevent tampering. /// The URI we will redirect back to after an authorization by the resource owner. @@ -37,7 +37,7 @@ public interface IMondoAuthorizationClient : IDisposable Task GetAccessTokenAsync(string authorizationCode, string redirectUri, CancellationToken cancellationToken = new CancellationToken()); /// - /// Acquires an OAuth2.0 access token. An access token is tied to both your application (the client) and an individual Mondo user and is valid for several hours. + /// Acquires an OAuth2.0 access token. An access token is tied to both your application (the client) and an individual Monzo user and is valid for several hours. /// /// The user’s email address. /// The user’s password. diff --git a/Mondo/IMondoClient.cs b/Monzo/IMonzoClient.cs similarity index 97% rename from Mondo/IMondoClient.cs rename to Monzo/IMonzoClient.cs index dd4e82f..996ca95 100644 --- a/Mondo/IMondoClient.cs +++ b/Monzo/IMonzoClient.cs @@ -4,12 +4,12 @@ using System.Threading; using System.Threading.Tasks; -namespace Mondo +namespace Monzo { /// - /// An authenticated Mondo API client. + /// An authenticated Monzo API client. /// - public interface IMondoClient : IDisposable + public interface IMonzoClient : IDisposable { /// /// Your OAuth 2.0 access token. @@ -93,7 +93,7 @@ public interface IMondoClient : IDisposable Task UploadAttachmentAsync(string filename, string fileType, string externalId, Stream stream, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Mondo app. + /// Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Monzo app. /// /// The id of the transaction to associate the attachment with. /// The URL of the uploaded attachment. diff --git a/Mondo/Merchant.cs b/Monzo/Merchant.cs similarity index 99% rename from Mondo/Merchant.cs rename to Monzo/Merchant.cs index 9c45013..21a5000 100644 --- a/Mondo/Merchant.cs +++ b/Monzo/Merchant.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// The merchant a transaction wasd made at. diff --git a/Mondo/MerchantAddress.cs b/Monzo/MerchantAddress.cs similarity index 98% rename from Mondo/MerchantAddress.cs rename to Monzo/MerchantAddress.cs index 8bda7e3..3be725f 100644 --- a/Mondo/MerchantAddress.cs +++ b/Monzo/MerchantAddress.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// The merchant's address. diff --git a/Mondo/Messages/AnnotateTransactionResponse.cs b/Monzo/Messages/AnnotateTransactionResponse.cs similarity index 88% rename from Mondo/Messages/AnnotateTransactionResponse.cs rename to Monzo/Messages/AnnotateTransactionResponse.cs index d845dc8..6f334a3 100644 --- a/Mondo/Messages/AnnotateTransactionResponse.cs +++ b/Monzo/Messages/AnnotateTransactionResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class AnnotateTransactionResponse { diff --git a/Mondo/Messages/ListAccountsResponse.cs b/Monzo/Messages/ListAccountsResponse.cs similarity index 89% rename from Mondo/Messages/ListAccountsResponse.cs rename to Monzo/Messages/ListAccountsResponse.cs index 49a3760..4fe6de1 100644 --- a/Mondo/Messages/ListAccountsResponse.cs +++ b/Monzo/Messages/ListAccountsResponse.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class ListAccountsResponse { diff --git a/Mondo/Messages/ListTransactionsResponse.cs b/Monzo/Messages/ListTransactionsResponse.cs similarity index 89% rename from Mondo/Messages/ListTransactionsResponse.cs rename to Monzo/Messages/ListTransactionsResponse.cs index e5e3dae..7fca795 100644 --- a/Mondo/Messages/ListTransactionsResponse.cs +++ b/Monzo/Messages/ListTransactionsResponse.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class ListTransactionsResponse { diff --git a/Mondo/Messages/ListWebhooksResponse.cs b/Monzo/Messages/ListWebhooksResponse.cs similarity index 89% rename from Mondo/Messages/ListWebhooksResponse.cs rename to Monzo/Messages/ListWebhooksResponse.cs index da691ed..a9e51e8 100644 --- a/Mondo/Messages/ListWebhooksResponse.cs +++ b/Monzo/Messages/ListWebhooksResponse.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class ListWebhooksResponse { diff --git a/Mondo/Messages/MerchantJsonConverter.cs b/Monzo/Messages/MerchantJsonConverter.cs similarity index 97% rename from Mondo/Messages/MerchantJsonConverter.cs rename to Monzo/Messages/MerchantJsonConverter.cs index 5505967..9a4ff1d 100644 --- a/Mondo/Messages/MerchantJsonConverter.cs +++ b/Monzo/Messages/MerchantJsonConverter.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class MerchantJsonConverter : JsonConverter { diff --git a/Mondo/Messages/RegisterAttachmentResponse.cs b/Monzo/Messages/RegisterAttachmentResponse.cs similarity index 87% rename from Mondo/Messages/RegisterAttachmentResponse.cs rename to Monzo/Messages/RegisterAttachmentResponse.cs index 1536b87..75a9afd 100644 --- a/Mondo/Messages/RegisterAttachmentResponse.cs +++ b/Monzo/Messages/RegisterAttachmentResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class RegisterAttachmentResponse { diff --git a/Mondo/Messages/RegisterWebhookResponse.cs b/Monzo/Messages/RegisterWebhookResponse.cs similarity index 87% rename from Mondo/Messages/RegisterWebhookResponse.cs rename to Monzo/Messages/RegisterWebhookResponse.cs index 26f7480..908a16e 100644 --- a/Mondo/Messages/RegisterWebhookResponse.cs +++ b/Monzo/Messages/RegisterWebhookResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class RegisterWebhookResponse { diff --git a/Mondo/Messages/RetrieveTransactionResponse.cs b/Monzo/Messages/RetrieveTransactionResponse.cs similarity index 88% rename from Mondo/Messages/RetrieveTransactionResponse.cs rename to Monzo/Messages/RetrieveTransactionResponse.cs index 4399850..1fa2c15 100644 --- a/Mondo/Messages/RetrieveTransactionResponse.cs +++ b/Monzo/Messages/RetrieveTransactionResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class RetrieveTransactionResponse { diff --git a/Mondo/Messages/UploadAttachmentResponse.cs b/Monzo/Messages/UploadAttachmentResponse.cs similarity index 94% rename from Mondo/Messages/UploadAttachmentResponse.cs rename to Monzo/Messages/UploadAttachmentResponse.cs index 222dc55..2fcc163 100644 --- a/Mondo/Messages/UploadAttachmentResponse.cs +++ b/Monzo/Messages/UploadAttachmentResponse.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Mondo.Messages +namespace Monzo.Messages { internal sealed class UploadAttachmentResponse { diff --git a/Mondo/Mondo.csproj b/Monzo/Monzo.csproj similarity index 71% rename from Mondo/Mondo.csproj rename to Monzo/Monzo.csproj index 988c57b..fa07037 100644 --- a/Mondo/Mondo.csproj +++ b/Monzo/Monzo.csproj @@ -2,17 +2,17 @@ netstandard1.1 - Mondo - Mondo.NET + Monzo + Monzo.NET 0.6.0 Richard Dingwall Copyright © Richard Dingwall 2015 - en-US + en-GB false - Mondo.NET is a .NET client library for the Mondo bank HTTP API. Use it to build apps and view your accounts, balances and transactions, create feed items, manage webhooks and attachments, and more! https://getmondo.co.uk + Monzo.NET is a .NET client library for the Monzo bank HTTP API. Use it to build apps and view your accounts, balances and transactions, create feed items, manage webhooks and attachments, and more! https://monzo.com/ monzo monzobank mondo mondobank bank api - https://raw.githubusercontent.com/rdingwall/mondo.net/master/LICENSE - https://github.com/rdingwall/mondo.net + https://raw.githubusercontent.com/rdingwall/monzo.net/master/LICENSE + https://github.com/rdingwall/monzo.net https://twitter.com/monzo/profile_image?size=original diff --git a/Mondo/MondoAuthorizationClient.cs b/Monzo/MonzoAuthorizationClient.cs similarity index 89% rename from Mondo/MondoAuthorizationClient.cs rename to Monzo/MonzoAuthorizationClient.cs index f8671cb..ada33d6 100644 --- a/Mondo/MondoAuthorizationClient.cs +++ b/Monzo/MonzoAuthorizationClient.cs @@ -7,12 +7,12 @@ using System.Threading.Tasks; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// Mondo API authorization client. + /// Monzo API authorization client. /// - public sealed class MondoAuthorizationClient : IMondoAuthorizationClient + public sealed class MonzoAuthorizationClient : IMonzoAuthorizationClient { private readonly HttpClient _httpClient; @@ -27,23 +27,23 @@ public sealed class MondoAuthorizationClient : IMondoAuthorizationClient public string ClientSecret { get; } /// - /// Initialises a new + /// Initialises a new /// /// Your client ID. /// Tour client secret. - /// URL of the Mondo API to use, defaults to production. - public MondoAuthorizationClient(string clientId, string clientSecret, string baseUri = "https://api.getmondo.co.uk") + /// URL of the Monzo API to use, defaults to production. + public MonzoAuthorizationClient(string clientId, string clientSecret, string baseUri = "https://api.monzo.com") : this(new HttpClient { BaseAddress = new Uri(baseUri) }, clientId, clientSecret) { } /// - /// Initialises a new + /// Initialises a new /// /// HttpClient to use. /// Your client ID. /// Tour client secret. - internal MondoAuthorizationClient(HttpClient httpClient, string clientId, string clientSecret) + internal MonzoAuthorizationClient(HttpClient httpClient, string clientId, string clientSecret) { if (httpClient == null) throw new ArgumentNullException(nameof(httpClient)); if (string.IsNullOrWhiteSpace(clientId)) throw new ArgumentException("Parameter is required", nameof(clientId)); @@ -55,14 +55,14 @@ internal MondoAuthorizationClient(HttpClient httpClient, string clientId, string } /// - /// Generates a Mondo OAuth authorization URL based on state and redirect. + /// Generates a Monzo OAuth authorization URL based on state and redirect. /// /// State which will be passed back to you to prevent tampering. /// The URI we will redirect back to after an authorization by the resource owner. /// Returns the OAuth authorization URL. public string GetAuthorizeUrl(string state = null, string redirectUri = null) { - var sb = new StringBuilder("https://auth.getmondo.co.uk/?response_type=code&client_id="); + var sb = new StringBuilder("https://auth.monzo.com/?response_type=code&client_id="); sb.Append(ClientId); if (!string.IsNullOrWhiteSpace(state)) @@ -102,7 +102,7 @@ public string GetAuthorizeUrl(string state = null, string redirectUri = null) } /// - /// Acquires an OAuth2.0 access token. An access token is tied to both your application (the client) and an individual Mondo user and is valid for several hours. + /// Acquires an OAuth2.0 access token. An access token is tied to both your application (the client) and an individual Monzo user and is valid for several hours. /// /// The user’s email address. /// The user’s password. @@ -150,7 +150,7 @@ public string GetAuthorizeUrl(string state = null, string redirectUri = null) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body); diff --git a/Mondo/MondoClient.cs b/Monzo/MonzoClient.cs similarity index 93% rename from Mondo/MondoClient.cs rename to Monzo/MonzoClient.cs index 1a2e782..4ac852c 100644 --- a/Mondo/MondoClient.cs +++ b/Monzo/MonzoClient.cs @@ -6,29 +6,29 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using Mondo.Messages; +using Monzo.Messages; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// An authenticated Mondo API client. + /// An authenticated Monzo API client. /// - public sealed class MondoClient : IMondoClient + public sealed class MonzoClient : IMonzoClient { private readonly HttpClient _httpClient; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// URL of the Mondo API to use, defaults to production. + /// URL of the Monzo API to use, defaults to production. /// Your access token. - public MondoClient(string accessToken, string baseUri = "https://api.getmondo.co.uk") + public MonzoClient(string accessToken, string baseUri = "https://api.monzo.com") : this(new HttpClient {BaseAddress = new Uri(baseUri)}, accessToken) { } - internal MondoClient(HttpClient httpClient, string accessToken) + internal MonzoClient(HttpClient httpClient, string accessToken) { if (httpClient == null) throw new ArgumentNullException(nameof(httpClient)); @@ -51,7 +51,7 @@ public async Task> GetAccountsAsync() if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Accounts; @@ -70,7 +70,7 @@ public async Task GetBalanceAsync(string accountId) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body); @@ -96,7 +96,7 @@ public async Task GetTransactionAsync(string transactionId, string if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Transaction; @@ -123,7 +123,7 @@ public async Task> GetTransactionsAsync(string accountId, str if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Transactions; @@ -157,7 +157,7 @@ public async Task> GetTransactionsAsync(string accountId, str if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Transaction; @@ -198,7 +198,7 @@ public async Task> GetTransactionsAsync(string accountId, str if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } } @@ -224,7 +224,7 @@ public async Task> GetTransactionsAsync(string accountId, str if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Webhook; @@ -243,7 +243,7 @@ public async Task> GetWebhooksAsync(string accountId) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Webhooks; @@ -263,7 +263,7 @@ public async Task> GetWebhooksAsync(string accountId) /// - /// Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Mondo app. + /// Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Monzo app. /// /// The id of the transaction to associate the attachment with. /// The URL of the uploaded attachment. @@ -287,7 +287,7 @@ public async Task> GetWebhooksAsync(string accountId) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } return JsonConvert.DeserializeObject(body).Attachment; @@ -321,7 +321,7 @@ public async Task> GetWebhooksAsync(string accountId) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } // 2. Once you have obtained a URL for an attachment upload to the upload_url @@ -337,7 +337,7 @@ public async Task> GetWebhooksAsync(string accountId) if (!streamUploadResponse.IsSuccessStatusCode) { var errorMessage = await streamUploadResponse.Content.ReadAsStringAsync(); - throw new MondoException(streamUploadResponse.StatusCode, $"Error uploading file: {errorMessage}"); + throw new MonzoException(streamUploadResponse.StatusCode, $"Error uploading file: {errorMessage}"); } } @@ -364,7 +364,7 @@ public async Task> GetWebhooksAsync(string accountId) if (!response.IsSuccessStatusCode) { - throw MondoException.CreateFromApiResponse(response, body); + throw MonzoException.CreateFromApiResponse(response, body); } } diff --git a/Mondo/MondoException.cs b/Monzo/MonzoException.cs similarity index 71% rename from Mondo/MondoException.cs rename to Monzo/MonzoException.cs index de138eb..b4869f2 100644 --- a/Mondo/MondoException.cs +++ b/Monzo/MonzoException.cs @@ -3,20 +3,20 @@ using System.Net.Http; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// - /// Represents an error response from the Mondo API. + /// Represents an error response from the Monzo API. /// - public sealed class MondoException : Exception + public sealed class MonzoException : Exception { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// HTTP status code. /// The message that describes the error. /// The error response returned from the API. - public MondoException(HttpStatusCode statusCode, string message, ErrorResponse response = null) :base(message) + public MonzoException(HttpStatusCode statusCode, string message, ErrorResponse response = null) :base(message) { StatusCode = statusCode; Response = response; @@ -32,16 +32,16 @@ public MondoException(HttpStatusCode statusCode, string message, ErrorResponse r /// public ErrorResponse Response { get; } - internal static MondoException CreateFromApiResponse(HttpResponseMessage response, string body) + internal static MonzoException CreateFromApiResponse(HttpResponseMessage response, string body) { try { var errorResponse = JsonConvert.DeserializeObject(body); - return new MondoException(response.StatusCode, body, errorResponse); + return new MonzoException(response.StatusCode, body, errorResponse); } catch { - return new MondoException(response.StatusCode, body); + return new MonzoException(response.StatusCode, body); } } } diff --git a/Mondo/PaginationOptions.cs b/Monzo/PaginationOptions.cs similarity index 96% rename from Mondo/PaginationOptions.cs rename to Monzo/PaginationOptions.cs index f3bedb2..e47973b 100644 --- a/Mondo/PaginationOptions.cs +++ b/Monzo/PaginationOptions.cs @@ -1,7 +1,7 @@ using System; -using Mondo.Extensions; +using Monzo.Extensions; -namespace Mondo +namespace Monzo { /// /// Endpoints which enumerate objects support time-based and cursor-based pagination. diff --git a/Monzo/Properties/AssemblyInfo.cs b/Monzo/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b8f42ed --- /dev/null +++ b/Monzo/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Monzo.Tests")] diff --git a/Mondo/Transaction.cs b/Monzo/Transaction.cs similarity index 97% rename from Mondo/Transaction.cs rename to Monzo/Transaction.cs index 9c364e0..0d39b38 100644 --- a/Mondo/Transaction.cs +++ b/Monzo/Transaction.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using Mondo.Messages; +using Monzo.Messages; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// Transactions are movements of funds into or out of an account. Negative transactions represent debits (ie. spending money) and positive transactions represent credits (ie. receiving money). @@ -86,7 +86,7 @@ public sealed class Transaction public string Settled { get; set; } /// - /// The category can be set for each transaction by the user. Over time we learn which merchant goes in which category and auto-assign the category of a transaction. If the user hasn’t set a category, we’ll return the default category of the merchant on this transactions. Top-ups have category “mondo”. Valid values are general, eating_out, expenses, transport, cash, bills, entertainment, shopping, holidays, groceries + /// The category can be set for each transaction by the user. Over time we learn which merchant goes in which category and auto-assign the category of a transaction. If the user hasn’t set a category, we’ll return the default category of the merchant on this transactions. Top-ups have category “monzo”. Valid values are general, eating_out, expenses, transport, cash, bills, entertainment, shopping, holidays, groceries /// [JsonProperty("category")] public string Category { get; set; } diff --git a/Mondo/Webhook.cs b/Monzo/Webhook.cs similarity index 97% rename from Mondo/Webhook.cs rename to Monzo/Webhook.cs index e157251..8b7cdac 100644 --- a/Mondo/Webhook.cs +++ b/Monzo/Webhook.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using Newtonsoft.Json; -namespace Mondo +namespace Monzo { /// /// Web hooks allow your application to receive real-time, push notification of events in an account. diff --git a/README.md b/README.md index 075a8b9..ed2336d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Mondo.NET +# Monzo.NET -![Mondo](https://twitter.com/getmondo/profile_image?size=original) +![Monzo](https://twitter.com/monzo/profile_image?size=original) -[![NuGet version](https://img.shields.io/nuget/v/Mondo.svg)](http://nuget.org/List/Packages/Mondo) [![NuGet downloads](https://img.shields.io/nuget/dt/Mondo.svg)](http://nuget.org/List/Packages/Mondo) [![Build status](https://ci.appveyor.com/api/projects/status/p26nu5fypp5c4qon?svg=true)](https://ci.appveyor.com/project/rdingwall/mondotnet) [![License](http://img.shields.io/:license-MIT-blue.svg)](https://raw.githubusercontent.com/rdingwall/mondo.net/master/LICENSE) +[![NuGet version](https://img.shields.io/nuget/v/Monzo.svg)](http://nuget.org/List/Packages/Monzo) [![NuGet downloads](https://img.shields.io/nuget/dt/Monzo.svg)](http://nuget.org/List/Packages/Monzo) [![Build status](https://ci.appveyor.com/api/projects/status/p26nu5fypp5c4qon?svg=true)](https://ci.appveyor.com/project/rdingwall/monzotnet) [![License](http://img.shields.io/:license-MIT-blue.svg)](https://raw.githubusercontent.com/rdingwall/monzo.net/master/LICENSE) -Mondo.NET is a .NET client library for the [Mondo bank API](https://getmondo.co.uk/docs/). Use it to build apps and view your accounts, balances and transactions, create feed items, manage webhooks and attachments, and more! +Monzo.NET is a .NET client library for the [Monzo bank API](https://monzo.com/docs/). Use it to build apps and view your accounts, balances and transactions, create feed items, manage webhooks and attachments, and more! -### [>>> Get Mondo.NET via NuGet](http://nuget.org/List/Packages/Mondo) +### [>>> Get Monzo.NET via NuGet](http://nuget.org/List/Packages/Monzo) ``` -Install-Package Mondo +Install-Package Monzo ``` Supported target frameworks: .NET 4.5, ASP.NET Core 5.0, Windows 8, Windows Phone 8.1 @@ -35,7 +35,7 @@ To authenticate using OAuth 2.0 **Web application flow (Authorization Code Grant ```csharp public class HomeController : Controller { - IMondoAuthorizationClient _authClient = new MondoAuthorizationClient(YOUR_CLIENT_ID, YOUR_CLIENT_SECRET); + IMonzoAuthorizationClient _authClient = new MonzoAuthorizationClient(YOUR_CLIENT_ID, YOUR_CLIENT_SECRET); [HttpGet] public ActionResult Login() @@ -43,13 +43,13 @@ public class HomeController : Controller // an unguessable random string which is used to protect against cross-site request forgery attacks string state = ...; - // the URL the user should be redirected back to following a successful Mondo login + // the URL the user should be redirected back to following a successful Monzo login string redirectUrl = Url.Action("OAuthCallback", "Home", null, Request.Url.Scheme); - string mondoLoginPageUrl = _authClient.GetAuthorizeUrl(state, redirectUrl); + string monzoLoginPageUrl = _authClient.GetAuthorizeUrl(state, redirectUrl); - // 1. Send user to Mondo's login page - return Redirect(mondoLoginPageUrl); + // 1. Send user to Monzo's login page + return Redirect(monzoLoginPageUrl); } [HttpGet] @@ -62,7 +62,7 @@ public class HomeController : Controller AccessToken accessToken = await _authClient.GetAccessTokenAsync(code, redirectUrl); // 3. Begin fetching accounts, transactions etc - using (var client = new MondoClient(accessToken.Value)) + using (var client = new MonzoClient(accessToken.Value)) { IList accounts = await client.GetAccountsAsync(); @@ -147,7 +147,7 @@ https://github.com/rdingwall/MondoAspNetMvcSample ![screenshot](http://i.imgur.com/jNL2lUL.png) #### Universal Windows -Also the Universal Windows Sample application using Mondo.NET, Rx and MVVM: +Also the Universal Windows Sample application using Monzo.NET, Rx and MVVM: https://github.com/rdingwall/MondoUniversalWindowsSample diff --git a/appveyor.yml b/appveyor.yml index b1514d3..cac1fae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,12 +9,12 @@ dotnet_csproj: before_build: - nuget restore -DisableParallelProcessing build: - project: Mondo.sln + project: Monzo.sln verbosity: minimal publish_nuget: true publish_nuget_symbols: true test: - assemblies: Mondo.Tests\bin\Release\Mondo.Tests.dll + assemblies: Monzo.Tests\bin\Release\Monzo.Tests.dll nuget: project_feed: true disable_publish_on_pr: true