diff --git a/src/Untappd.Net.UnitTests/Authentication/TestAuthenticatedUntappdCredentials.cs b/src/Untappd.Net.UnitTests/Authentication/TestAuthenticatedUntappdCredentials.cs index 4105378..a4fbf01 100644 --- a/src/Untappd.Net.UnitTests/Authentication/TestAuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net.UnitTests/Authentication/TestAuthenticatedUntappdCredentials.cs @@ -4,24 +4,25 @@ using Untappd.Net.Authentication; namespace Untappd.Net.UnitTests.Authentication { - [TestFixture] - public class TestAuthenticatedUntappdCredentials - { - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void ExpectException() - { - var t = new AuthenticatedUntappdCredentials(null); - } - [Test] - public void ExpectValid() - { - var token = "awesome"; - var t = new AuthenticatedUntappdCredentials(token); - Assert.AreEqual(token, "awesome"); - token = "newString"; - //Make sure the reference is not copied over - Assert.AreEqual("awesome", t.AuthenticationData["access_token"]); - } - } -} + [TestFixture] + public class TestAuthenticatedUntappdCredentials + { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ExpectException() + { + var t = new AuthenticatedUntappdCredentials(null); + } + + [Test] + public void ExpectValid() + { + var token = "awesome"; + var t = new AuthenticatedUntappdCredentials(token); + Assert.AreEqual(token, "awesome"); + token = "newString"; + //Make sure the reference is not copied over + Assert.AreEqual("awesome", t.AuthenticationData["access_token"]); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Authentication/TestAuthenticationHelper.cs b/src/Untappd.Net.UnitTests/Authentication/TestAuthenticationHelper.cs index 32c1741..7ea41a8 100644 --- a/src/Untappd.Net.UnitTests/Authentication/TestAuthenticationHelper.cs +++ b/src/Untappd.Net.UnitTests/Authentication/TestAuthenticationHelper.cs @@ -5,60 +5,56 @@ using Untappd.Net.OAuth; namespace Untappd.Net.UnitTests.Authentication { - [TestFixture] - public class TestAuthenticationHelper - { - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void TestRedirectUserToException1() - { + [TestFixture] + public class TestAuthenticationHelper + { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void TestRedirectUserToException1() + { + AuthenticationHelper.RedirectUserTo(null, "url"); + } - AuthenticationHelper.RedirectUserTo(null, "url"); - } - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void TestRedirectUserToException2() - { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void TestRedirectUserToException2() + { + AuthenticationHelper.RedirectUserTo(new UnAuthenticatedUntappdCredentials("d", "d"), string.Empty); + } - AuthenticationHelper.RedirectUserTo(new UnAuthenticatedUntappdCredentials("d", "d"), string.Empty); - } - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void TestTokenUrlException1() - { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void TestTokenUrlException1() + { + AuthenticationHelper.TokenUrl(null, "some", "code"); + } - AuthenticationHelper.TokenUrl(null, "some", "code"); - } - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void TestTokenUrlException2() - { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void TestTokenUrlException2() + { + AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), string.Empty, "code"); + } - AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), string.Empty, "code"); - } - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void TestTokenUrlException3() - { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void TestTokenUrlException3() + { + AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), "ds", string.Empty); + } - AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), "ds", string.Empty); - } + [Test] + public void TestTokenUrl() + { + var s = AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), "ds", "code"); + Assert.AreEqual(s, Constants.OAuthTokenEndPoint + "/?client_id=d&client_secret=d&response_type=code&redirect_url=ds&code=code"); + } - [Test] - public void TestTokenUrl() - { - - var s = AuthenticationHelper.TokenUrl(new UnAuthenticatedUntappdCredentials("d", "d"), "ds", "code"); - Assert.AreEqual(s, Constants.OAuthTokenEndPoint + "/?client_id=d&client_secret=d&response_type=code&redirect_url=ds&code=code"); - - } - [Test] - public void TestRedirectUrl() - { - - var s = AuthenticationHelper.RedirectUserTo(new UnAuthenticatedUntappdCredentials("d", "d"), "ds"); - Assert.AreEqual(s, Constants.BaseRequestString + "/?client_id=d&response_type=code&redirect_url=ds"); - - } - } -} + [Test] + public void TestRedirectUrl() + { + var s = AuthenticationHelper.RedirectUserTo(new UnAuthenticatedUntappdCredentials("d", "d"), "ds"); + Assert.AreEqual(s, Constants.BaseRequestString + "/?client_id=d&response_type=code&redirect_url=ds"); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Authentication/TestUnAuthenticatedUntappdCredentials.cs b/src/Untappd.Net.UnitTests/Authentication/TestUnAuthenticatedUntappdCredentials.cs index 3202d18..05fb8ef 100644 --- a/src/Untappd.Net.UnitTests/Authentication/TestUnAuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net.UnitTests/Authentication/TestUnAuthenticatedUntappdCredentials.cs @@ -4,20 +4,21 @@ using Untappd.Net.Authentication; namespace Untappd.Net.UnitTests.Authentication { - [TestFixture] - public class TestUnAuthenticatedUntappdCredentials - { - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void ExpectClientIdException() - { - var t = new UnAuthenticatedUntappdCredentials(string.Empty, "t"); - } - [Test] - [ExpectedException(typeof(ArgumentNullException))] - public void ExpectClientSecretException() - { - var t = new UnAuthenticatedUntappdCredentials("t", string.Empty); - } - } -} + [TestFixture] + public class TestUnAuthenticatedUntappdCredentials + { + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ExpectClientIdException() + { + var t = new UnAuthenticatedUntappdCredentials(string.Empty, "t"); + } + + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ExpectClientSecretException() + { + var t = new UnAuthenticatedUntappdCredentials("t", string.Empty); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Exception/TestBaseUntappdException.cs b/src/Untappd.Net.UnitTests/Exception/TestBaseUntappdException.cs index b115a88..30e21e2 100644 --- a/src/Untappd.Net.UnitTests/Exception/TestBaseUntappdException.cs +++ b/src/Untappd.Net.UnitTests/Exception/TestBaseUntappdException.cs @@ -1,29 +1,30 @@ using NUnit.Framework; using Untappd.Net.Exception; + namespace Untappd.Net.UnitTests.Exception { - [TestFixture] - public class TestBaseUntappdException - { - [ExpectedException(typeof (BaseUntappdException))] - [Test] - public void TestStandardException() - { - throw new BaseUntappdException(); - } - [ExpectedException(typeof(BaseUntappdException), ExpectedMessage = "messageHere")] - [Test] - public void TestStandardExceptionWithMessage() - { - throw new BaseUntappdException("messageHere"); - } - [ExpectedException(typeof(BaseUntappdException), ExpectedMessage = "messageHere")] - [Test] - public void TestStandardExceptionWithInner() - { - throw new BaseUntappdException("messageHere", new System.Exception("innerException!")); - } + [TestFixture] + public class TestBaseUntappdException + { + [ExpectedException(typeof(BaseUntappdException))] + [Test] + public void TestStandardException() + { + throw new BaseUntappdException(); + } + [ExpectedException(typeof(BaseUntappdException), ExpectedMessage = "messageHere")] + [Test] + public void TestStandardExceptionWithMessage() + { + throw new BaseUntappdException("messageHere"); + } - } -} + [ExpectedException(typeof(BaseUntappdException), ExpectedMessage = "messageHere")] + [Test] + public void TestStandardExceptionWithInner() + { + throw new BaseUntappdException("messageHere", new System.Exception("innerException!")); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Exception/TestEndpointConfigurationException.cs b/src/Untappd.Net.UnitTests/Exception/TestEndpointConfigurationException.cs index 3102af2..ff8f289 100644 --- a/src/Untappd.Net.UnitTests/Exception/TestEndpointConfigurationException.cs +++ b/src/Untappd.Net.UnitTests/Exception/TestEndpointConfigurationException.cs @@ -3,15 +3,14 @@ using Untappd.Net.Exception; namespace Untappd.Net.UnitTests.Exception { - [TestFixture] - public class TestEndpointConfigurationException - { - [Test] - [ExpectedException(typeof(EndpointConfigurationException), ExpectedMessage = "Invalid endpoint configured")] - public void TestThrownExeption() - { - throw new EndpointConfigurationException(); - } - - } -} + [TestFixture] + public class TestEndpointConfigurationException + { + [Test] + [ExpectedException(typeof(EndpointConfigurationException), ExpectedMessage = "Invalid endpoint configured")] + public void TestThrownExeption() + { + throw new EndpointConfigurationException(); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Exception/TestHttpErrorException.cs b/src/Untappd.Net.UnitTests/Exception/TestHttpErrorException.cs index e4b59e2..cff07ab 100644 --- a/src/Untappd.Net.UnitTests/Exception/TestHttpErrorException.cs +++ b/src/Untappd.Net.UnitTests/Exception/TestHttpErrorException.cs @@ -1,32 +1,30 @@ using System; -using NUnit.Framework; -using Untappd.Net.Exception; using Moq; +using NUnit.Framework; using RestSharp; - +using Untappd.Net.Exception; namespace Untappd.Net.UnitTests.Exception { - [TestFixture] - public class TestHttpErrorException - { - [Test] - public void ConfirmNullExceptions() - { - var mockRequest = new Mock(); - var mockResponse = new Mock(); - - Assert.Throws(()=>{ - var t = new HttpErrorException(mockRequest.Object, null); - Console.WriteLine(t); - - }); - Assert.Throws(()=>{ - var t = new HttpErrorException(null, mockResponse.Object); - Console.WriteLine(t); - - }); - } - } -} + [TestFixture] + public class TestHttpErrorException + { + [Test] + public void ConfirmNullExceptions() + { + var mockRequest = new Mock(); + var mockResponse = new Mock(); + Assert.Throws(() => + { + var t = new HttpErrorException(mockRequest.Object, null); + Console.WriteLine(t); + }); + Assert.Throws(() => + { + var t = new HttpErrorException(null, mockResponse.Object); + Console.WriteLine(t); + }); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs b/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs index 9c38891..f02ca71 100644 --- a/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs +++ b/src/Untappd.Net.UnitTests/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// 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("Untappd.Net.UnitTests")] @@ -13,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -24,12 +24,12 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Request/TestRepository.cs b/src/Untappd.Net.UnitTests/Request/TestRepository.cs index 890411f..5e65f58 100644 --- a/src/Untappd.Net.UnitTests/Request/TestRepository.cs +++ b/src/Untappd.Net.UnitTests/Request/TestRepository.cs @@ -6,102 +6,103 @@ using Moq; using NUnit.Framework; using RestSharp; using Untappd.Net.Authentication; +using Untappd.Net.Exception; using Untappd.Net.Request; using Untappd.Net.Responses.Actions; using Untappd.Net.Responses.BeerInfo; -using Untappd.Net.Exception; namespace Untappd.Net.UnitTests.Request { - [TestFixture] - public class TestRepository - { - [Test] - public void ConfirmRequestWorks() - { - var mockCreds = new Mock(); - mockCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() - { - {"client_id", "id"}, - {"client_secret", "secret"} - })); - var bodyParam = new Dictionary {{"key", "value"}}; - var client = new Mock(); - var request = new Mock(); - request.Setup(a => a.AddParameter(It.IsAny(), It.IsAny())); - request.Setup(a => a.AddParameter(It.IsAny(), It.IsAny())); - - var response = new Mock(); - response.Setup(a => a.Content).Returns(File.ReadAllText("../../Responses/Json/BeerInfo.json")); - client.Setup(a => a.Execute(It.IsAny())).Callback(() => - { - }).Returns(response.Object); - client.Setup(a => a.ExecuteTaskAsync(It.IsAny())).Callback(() => - { - }).Returns(Task.Run(()=> response.Object)); - var repository = new Repository(client.Object, request.Object); - - repository.Get(mockCreds.Object, "awesome", bodyParam); - request.Verify(a => a.AddParameter("client_id", mockCreds.Object.AuthenticationData["client_id"])); - request.Verify(a => a.AddParameter("client_secret", mockCreds.Object.AuthenticationData["client_secret"])); - request.Verify(a => a.AddParameter("key", "value")); - repository.GetAsync(mockCreds.Object, "awesome", bodyParam).Wait(); - request.Verify(a => a.AddParameter("client_id", mockCreds.Object.AuthenticationData["client_id"])); - request.Verify(a => a.AddParameter("client_secret", mockCreds.Object.AuthenticationData["client_secret"])); - request.Verify(a => a.AddParameter("key", "value")); + [TestFixture] + public class TestRepository + { + [Test] + public void ConfirmRequestWorks() + { + var mockCreds = new Mock(); + mockCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() + { + {"client_id", "id"}, + {"client_secret", "secret"} + })); + var bodyParam = new Dictionary { { "key", "value" } }; + var client = new Mock(); + var request = new Mock(); + request.Setup(a => a.AddParameter(It.IsAny(), It.IsAny())); + request.Setup(a => a.AddParameter(It.IsAny(), It.IsAny())); - var mockAuthCreds = new Mock(); - mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() - { - {"access_token", "accessToken"} - })); + var response = new Mock(); + response.Setup(a => a.Content).Returns(File.ReadAllText("../../Responses/Json/BeerInfo.json")); + client.Setup(a => a.Execute(It.IsAny())).Callback(() => + { + }).Returns(response.Object); + client.Setup(a => a.ExecuteTaskAsync(It.IsAny())).Callback(() => + { + }).Returns(Task.Run(() => response.Object)); + var repository = new Repository(client.Object, request.Object); - repository.Get(mockAuthCreds.Object, "awesome", bodyParam); - request.Verify(a => a.AddParameter("key", "value")); - request.Verify(a => a.AddParameter("access_token", "accessToken")); - repository.GetAsync(mockAuthCreds.Object, "awesome", bodyParam).Wait(); - request.Verify(a => a.AddParameter("key", "value")); - request.Verify(a => a.AddParameter("access_token", "accessToken")); + repository.Get(mockCreds.Object, "awesome", bodyParam); + request.Verify(a => a.AddParameter("client_id", mockCreds.Object.AuthenticationData["client_id"])); + request.Verify(a => a.AddParameter("client_secret", mockCreds.Object.AuthenticationData["client_secret"])); + request.Verify(a => a.AddParameter("key", "value")); + repository.GetAsync(mockCreds.Object, "awesome", bodyParam).Wait(); + request.Verify(a => a.AddParameter("client_id", mockCreds.Object.AuthenticationData["client_id"])); + request.Verify(a => a.AddParameter("client_secret", mockCreds.Object.AuthenticationData["client_secret"])); + request.Verify(a => a.AddParameter("key", "value")); - mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() - { - {"access_token", "PostaccessToken"} - })); - var checkin = new CheckIn("-5", "EST", 1044097) { Shout = "Awesome Brew", Rating = 4 }; - repository.FailFast = true; - repository.OnExceptionThrown += (sender, e) => - { - Assert.IsNotNull(sender); - Assert.IsNotNull(e); - }; - Assert.Throws(()=>repository.Post(mockAuthCreds.Object, checkin)); - repository.FailFast = false; - repository.Post(mockAuthCreds.Object, checkin); - request.Verify(a => a.AddParameter("access_token", "PostaccessToken")); + var mockAuthCreds = new Mock(); + mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() + { + {"access_token", "accessToken"} + })); - mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() - { - {"access_token", "PostAsyncaccessToken"} - })); - repository.PostAsync(mockAuthCreds.Object, checkin).Wait(); - request.Verify(a => a.AddParameter("access_token", "PostAsyncaccessToken")); - } + repository.Get(mockAuthCreds.Object, "awesome", bodyParam); + request.Verify(a => a.AddParameter("key", "value")); + request.Verify(a => a.AddParameter("access_token", "accessToken")); + repository.GetAsync(mockAuthCreds.Object, "awesome", bodyParam).Wait(); + request.Verify(a => a.AddParameter("key", "value")); + request.Verify(a => a.AddParameter("access_token", "accessToken")); - [Test] - public void ConfirmBasicConstructorWorks() - { - var constructorTest = new Repository(); - Assert.IsTrue(constructorTest.Client != null); - Assert.IsTrue(constructorTest.Request != null); - } - [Test] - public void ConfirmConfigureGetRequestClearsParams() - { - var constructorTest = new Repository(); - constructorTest.Request.Parameters.Add(new Parameter {Name = "param"}); - Assert.IsTrue(constructorTest.Request.Parameters.Count > 0); - constructorTest.ConfigureRequest("endpoint"); - Assert.IsTrue(constructorTest.Request.Parameters.Count == 0); - } - } -} + mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() + { + {"access_token", "PostaccessToken"} + })); + var checkin = new CheckIn("-5", "EST", 1044097) { Shout = "Awesome Brew", Rating = 4 }; + repository.FailFast = true; + repository.OnExceptionThrown += (sender, e) => + { + Assert.IsNotNull(sender); + Assert.IsNotNull(e); + }; + Assert.Throws(() => repository.Post(mockAuthCreds.Object, checkin)); + repository.FailFast = false; + repository.Post(mockAuthCreds.Object, checkin); + request.Verify(a => a.AddParameter("access_token", "PostaccessToken")); + + mockAuthCreds.Setup(a => a.AuthenticationData).Returns(new ReadOnlyDictionary(new Dictionary() + { + {"access_token", "PostAsyncaccessToken"} + })); + repository.PostAsync(mockAuthCreds.Object, checkin).Wait(); + request.Verify(a => a.AddParameter("access_token", "PostAsyncaccessToken")); + } + + [Test] + public void ConfirmBasicConstructorWorks() + { + var constructorTest = new Repository(); + Assert.IsTrue(constructorTest.Client != null); + Assert.IsTrue(constructorTest.Request != null); + } + + [Test] + public void ConfirmConfigureGetRequestClearsParams() + { + var constructorTest = new Repository(); + constructorTest.Request.Parameters.Add(new Parameter { Name = "param" }); + Assert.IsTrue(constructorTest.Request.Parameters.Count > 0); + constructorTest.ConfigureRequest("endpoint"); + Assert.IsTrue(constructorTest.Request.Parameters.Count == 0); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Responses/Actions/TestCheckInAction.cs b/src/Untappd.Net.UnitTests/Responses/Actions/TestCheckInAction.cs index 4c71942..5eb8d63 100644 --- a/src/Untappd.Net.UnitTests/Responses/Actions/TestCheckInAction.cs +++ b/src/Untappd.Net.UnitTests/Responses/Actions/TestCheckInAction.cs @@ -4,58 +4,54 @@ using Untappd.Net.Responses.Actions; namespace Untappd.Net.UnitTests.Responses.Actions { - [TestFixture] - public class TestCheckInAction - { - [Test] - public void TestAccessors() - { - Assert.Throws(() => { new CheckIn(string.Empty, "timezone", 1); }); - Assert.Throws(() => { new CheckIn("1", string.Empty, 1); }); - var checkin = new CheckIn("offset", "timezone", 1); - Assert.IsNotNullOrEmpty(checkin.RequestMethod.ToString()); - Assert.Throws(() => { checkin.Rating = -1; }); - Assert.Throws(() => { checkin.Rating = 6; }); - Assert.Throws(() => { checkin.Shout = new String('d', 141); }); - checkin.Rating = 3; - Assert.AreEqual(3, checkin.Rating); - var t = "tst"; - checkin.Shout = t; - Assert.IsNotNullOrEmpty(checkin.EndPoint); - Assert.AreEqual(checkin.Shout, t); - } + [TestFixture] + public class TestCheckInAction + { + [Test] + public void TestAccessors() + { + Assert.Throws(() => { new CheckIn(string.Empty, "timezone", 1); }); + Assert.Throws(() => { new CheckIn("1", string.Empty, 1); }); + var checkin = new CheckIn("offset", "timezone", 1); + Assert.IsNotNullOrEmpty(checkin.RequestMethod.ToString()); + Assert.Throws(() => { checkin.Rating = -1; }); + Assert.Throws(() => { checkin.Rating = 6; }); + Assert.Throws(() => { checkin.Shout = new String('d', 141); }); + checkin.Rating = 3; + Assert.AreEqual(3, checkin.Rating); + var t = "tst"; + checkin.Shout = t; + Assert.IsNotNullOrEmpty(checkin.EndPoint); + Assert.AreEqual(checkin.Shout, t); + } - [Test] - public void TestDictionaryGeneration() - { - var checkin = new CheckIn("offset", "timezone", 1); - Assert.AreEqual(checkin.BodyParameters["gmt_offset"], "offset"); - Assert.AreEqual(checkin.BodyParameters["timezone"], "timezone"); - Assert.AreEqual(checkin.BodyParameters["bid"], 1); + [Test] + public void TestDictionaryGeneration() + { + var checkin = new CheckIn("offset", "timezone", 1); + Assert.AreEqual(checkin.BodyParameters["gmt_offset"], "offset"); + Assert.AreEqual(checkin.BodyParameters["timezone"], "timezone"); + Assert.AreEqual(checkin.BodyParameters["bid"], 1); - Assert.IsFalse(checkin.BodyParameters.ContainsKey("geolat")); - checkin.Geolat = 4; - Assert.IsTrue(checkin.BodyParameters.ContainsKey("geolat")); - Assert.AreEqual(checkin.BodyParameters["geolat"], 4); + Assert.IsFalse(checkin.BodyParameters.ContainsKey("geolat")); + checkin.Geolat = 4; + Assert.IsTrue(checkin.BodyParameters.ContainsKey("geolat")); + Assert.AreEqual(checkin.BodyParameters["geolat"], 4); - Assert.IsFalse(checkin.BodyParameters.ContainsKey("geolng")); - checkin.Geolng = 4; - Assert.IsTrue(checkin.BodyParameters.ContainsKey("geolng")); - Assert.AreEqual(checkin.BodyParameters["geolng"], 4); + Assert.IsFalse(checkin.BodyParameters.ContainsKey("geolng")); + checkin.Geolng = 4; + Assert.IsTrue(checkin.BodyParameters.ContainsKey("geolng")); + Assert.AreEqual(checkin.BodyParameters["geolng"], 4); - Assert.IsFalse(checkin.BodyParameters.ContainsKey("shout")); - checkin.Shout = "shout"; - Assert.IsTrue(checkin.BodyParameters.ContainsKey("shout")); - Assert.AreEqual(checkin.BodyParameters["shout"], "shout"); + Assert.IsFalse(checkin.BodyParameters.ContainsKey("shout")); + checkin.Shout = "shout"; + Assert.IsTrue(checkin.BodyParameters.ContainsKey("shout")); + Assert.AreEqual(checkin.BodyParameters["shout"], "shout"); - Assert.IsFalse(checkin.BodyParameters.ContainsKey("rating")); - checkin.Rating = 2; - Assert.IsTrue(checkin.BodyParameters.ContainsKey("rating")); - Assert.AreEqual(checkin.BodyParameters["rating"], 2); - - - - } - - } -} + Assert.IsFalse(checkin.BodyParameters.ContainsKey("rating")); + checkin.Rating = 2; + Assert.IsTrue(checkin.BodyParameters.ContainsKey("rating")); + Assert.AreEqual(checkin.BodyParameters["rating"], 2); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Responses/Actions/TestSimpleActions.cs b/src/Untappd.Net.UnitTests/Responses/Actions/TestSimpleActions.cs index 75adbb5..c64f411 100644 --- a/src/Untappd.Net.UnitTests/Responses/Actions/TestSimpleActions.cs +++ b/src/Untappd.Net.UnitTests/Responses/Actions/TestSimpleActions.cs @@ -4,74 +4,73 @@ using Untappd.Net.Responses.Actions; namespace Untappd.Net.UnitTests.Responses.Actions { - [TestFixture] - public class TestSimpleActions - { - [Test] - public void TestFriends() - { - var accept = new AcceptFriend("targetid"); - Assert.IsNotNullOrEmpty(accept.RequestMethod.ToString()); - Assert.IsTrue(accept.EndPoint.Contains("targetid")); - Assert.IsNotNull(accept.BodyParameters); + [TestFixture] + public class TestSimpleActions + { + [Test] + public void TestFriends() + { + var accept = new AcceptFriend("targetid"); + Assert.IsNotNullOrEmpty(accept.RequestMethod.ToString()); + Assert.IsTrue(accept.EndPoint.Contains("targetid")); + Assert.IsNotNull(accept.BodyParameters); - var add = new AddFriend("targetid"); - Assert.IsNotNullOrEmpty(add.RequestMethod.ToString()); - Assert.IsTrue(add.EndPoint.Contains("targetid")); - Assert.IsNotNull(add.BodyParameters); + var add = new AddFriend("targetid"); + Assert.IsNotNullOrEmpty(add.RequestMethod.ToString()); + Assert.IsTrue(add.EndPoint.Contains("targetid")); + Assert.IsNotNull(add.BodyParameters); - var toast = new ToastUntoast("targetid"); - Assert.IsNotNullOrEmpty(toast.RequestMethod.ToString()); - Assert.IsTrue(toast.EndPoint.Contains("targetid")); - Assert.IsNotNull(toast.BodyParameters); + var toast = new ToastUntoast("targetid"); + Assert.IsNotNullOrEmpty(toast.RequestMethod.ToString()); + Assert.IsTrue(toast.EndPoint.Contains("targetid")); + Assert.IsNotNull(toast.BodyParameters); - var remove = new RemoveFriend("targetid"); - Assert.IsNotNullOrEmpty(remove.RequestMethod.ToString()); - Assert.IsTrue(remove.EndPoint.Contains("targetid")); - Assert.IsNotNull(remove.BodyParameters); + var remove = new RemoveFriend("targetid"); + Assert.IsNotNullOrEmpty(remove.RequestMethod.ToString()); + Assert.IsTrue(remove.EndPoint.Contains("targetid")); + Assert.IsNotNull(remove.BodyParameters); - var removeWish = new RemoveFromWishList(1); - Assert.IsNotNullOrEmpty(removeWish.RequestMethod.ToString()); - Assert.IsNotNullOrEmpty(removeWish.EndPoint); - Assert.AreEqual(removeWish.BodyParameters["bid"], 1); + var removeWish = new RemoveFromWishList(1); + Assert.IsNotNullOrEmpty(removeWish.RequestMethod.ToString()); + Assert.IsNotNullOrEmpty(removeWish.EndPoint); + Assert.AreEqual(removeWish.BodyParameters["bid"], 1); + var addWish = new AddToWishList(1); + Assert.IsNotNullOrEmpty(addWish.RequestMethod.ToString()); + Assert.IsNotNullOrEmpty(addWish.EndPoint); + Assert.AreEqual(addWish.BodyParameters["bid"], 1); - var addWish = new AddToWishList(1); - Assert.IsNotNullOrEmpty(addWish.RequestMethod.ToString()); - Assert.IsNotNullOrEmpty(addWish.EndPoint); - Assert.AreEqual(addWish.BodyParameters["bid"], 1); + var comment = new AddComment("checkin", "shout"); + Assert.IsNotNullOrEmpty(comment.RequestMethod.ToString()); + Assert.IsTrue(comment.EndPoint.Contains("checkin")); + Assert.AreEqual(comment.BodyParameters["shout"], "shout"); + } - var comment = new AddComment("checkin", "shout"); - Assert.IsNotNullOrEmpty(comment.RequestMethod.ToString()); - Assert.IsTrue(comment.EndPoint.Contains("checkin")); - Assert.AreEqual(comment.BodyParameters["shout"], "shout"); - } + [Test] + public void TestPendingFriends() + { + var pending = new PendingFriends(); + Assert.IsNotNullOrEmpty(pending.RequestMethod.ToString()); + Assert.IsNotNullOrEmpty(pending.EndPoint); + Assert.IsNotNull(pending.BodyParameters); + Assert.IsFalse(pending.BodyParameters.ContainsKey("limit")); + pending.Limit = 1; + Assert.IsTrue(pending.BodyParameters.ContainsKey("limit")); + Assert.IsFalse(pending.BodyParameters.ContainsKey("offset")); + pending.Offset = 1; + Assert.IsTrue(pending.BodyParameters.ContainsKey("offset")); + } - [Test] - public void TestPendingFriends() - { - var pending = new PendingFriends(); - Assert.IsNotNullOrEmpty(pending.RequestMethod.ToString()); - Assert.IsNotNullOrEmpty(pending.EndPoint); - Assert.IsNotNull(pending.BodyParameters); - Assert.IsFalse(pending.BodyParameters.ContainsKey("limit")); - pending.Limit = 1; - Assert.IsTrue(pending.BodyParameters.ContainsKey("limit")); - Assert.IsFalse(pending.BodyParameters.ContainsKey("offset")); - pending.Offset = 1; - Assert.IsTrue(pending.BodyParameters.ContainsKey("offset")); - } - - [Test] - public void TestArgumentNull() - { - Assert.Throws(() => { new AcceptFriend(string.Empty); }); - Assert.Throws(() => { new AddFriend(string.Empty); }); - Assert.Throws(() => { new RemoveFriend(string.Empty); }); - Assert.Throws(() => { new ToastUntoast(string.Empty); }); - Assert.Throws(() => { new AddComment(string.Empty, "ds"); }); - Assert.Throws(() => { new AddComment("ds", string.Empty); }); - Assert.Throws(() => { new AddComment("ds", new String('d', 141)); }); - } - } -} + [Test] + public void TestArgumentNull() + { + Assert.Throws(() => { new AcceptFriend(string.Empty); }); + Assert.Throws(() => { new AddFriend(string.Empty); }); + Assert.Throws(() => { new RemoveFriend(string.Empty); }); + Assert.Throws(() => { new ToastUntoast(string.Empty); }); + Assert.Throws(() => { new AddComment(string.Empty, "ds"); }); + Assert.Throws(() => { new AddComment("ds", string.Empty); }); + Assert.Throws(() => { new AddComment("ds", new String('d', 141)); }); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs b/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs index 7088f99..752ce5f 100644 --- a/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs +++ b/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs @@ -20,121 +20,121 @@ using UserWishList = Untappd.Net.Responses.UserWishlist; namespace Untappd.Net.UnitTests.Responses { - [TestFixture] - public class TestDeserializer - { - private static string ResponsePath = "../../Responses/Json/{0}"; + [TestFixture] + public class TestDeserializer + { + private static string ResponsePath = "../../Responses/Json/{0}"; - [Test] - [Ignore] - public void GetActualJsonRequest() - { - var credentials = new AuthenticatedUntappdCredentials(""); + [Test] + [Ignore] + public void GetActualJsonRequest() + { + var credentials = new AuthenticatedUntappdCredentials(""); - Dictionary parameters = new Dictionary(); - parameters.Add("q", "wild rose"); + Dictionary parameters = new Dictionary(); + parameters.Add("q", "wild rose"); - var repo = new Repository(); - //var resp = repo.Get(credentials); - var resp3 = repo.Get(credentials, "", parameters); - var resp2 = repo.Get(credentials); - } + var repo = new Repository(); + //var resp = repo.Get(credentials); + var resp3 = repo.Get(credentials, "", parameters); + var resp2 = repo.Get(credentials); + } - [Test] - public void TestJsonDeserializeUserBadges() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserBadges.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializeUserBadges() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserBadges.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerBeerInfo() - { - var json = File.ReadAllText(string.Format(ResponsePath, "BeerInfo.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerBeerInfo() + { + var json = File.ReadAllText(string.Format(ResponsePath, "BeerInfo.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerBeerSearch() - { - var json = File.ReadAllText(string.Format(ResponsePath, "BeerSearch.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerBeerSearch() + { + var json = File.ReadAllText(string.Format(ResponsePath, "BeerSearch.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerBreweryInfo() - { - var json = File.ReadAllText(string.Format(ResponsePath, "BreweryInfo.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerBreweryInfo() + { + var json = File.ReadAllText(string.Format(ResponsePath, "BreweryInfo.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerBrewerySearch() - { - var json = File.ReadAllText(string.Format(ResponsePath, "BrewerySearch.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerBrewerySearch() + { + var json = File.ReadAllText(string.Format(ResponsePath, "BrewerySearch.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerUserDistinctBeers() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserDistinctBeers.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerUserDistinctBeers() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserDistinctBeers.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerUserFriends() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserFriends.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerUserFriends() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserFriends.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerUserInfo() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserInfo.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerUserInfo() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserInfo.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerUserWishList() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserWishList.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerUserWishList() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserWishList.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerVenueInfo() - { - var json = File.ReadAllText(string.Format(ResponsePath, "VenueInfo.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerVenueInfo() + { + var json = File.ReadAllText(string.Format(ResponsePath, "VenueInfo.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerActivityFeed() - { - var json = File.ReadAllText(string.Format(ResponsePath, "ActivityFeed.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerActivityFeed() + { + var json = File.ReadAllText(string.Format(ResponsePath, "ActivityFeed.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - public void TestJsonDeserializerUserActivityFeed() - { - var json = File.ReadAllText(string.Format(ResponsePath, "UserActivityFeed.json")); - var jsonresult = JsonConvert.DeserializeObject(json); - } + [Test] + public void TestJsonDeserializerUserActivityFeed() + { + var json = File.ReadAllText(string.Format(ResponsePath, "UserActivityFeed.json")); + var jsonresult = JsonConvert.DeserializeObject(json); + } - [Test] - [ExpectedException(typeof(NotImplementedException))] - public void testNotImplementedException() - { - new SingleObjectArrayConverter().WriteJson(null, null, null); - } + [Test] + [ExpectedException(typeof(NotImplementedException))] + public void testNotImplementedException() + { + new SingleObjectArrayConverter().WriteJson(null, null, null); + } - [Test] - public void testTypeValid() - { - Assert.IsTrue(new SingleObjectArrayConverter().CanConvert(typeof(UserActivityFeed))); - } - } -} + [Test] + public void testTypeValid() + { + Assert.IsTrue(new SingleObjectArrayConverter().CanConvert(typeof(UserActivityFeed))); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs b/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs index d4eba9d..96fc14c 100644 --- a/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs +++ b/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs @@ -6,33 +6,31 @@ using Untappd.Net.Request; namespace Untappd.Net.UnitTests.Responses { - [TestFixture] - public class TestResponseEndpoints - { + [TestFixture] + public class TestResponseEndpoints + { + /// + /// Run through all the endpoints to make sure they all atleast do not error out. + /// This is so we can get a high code coverage, while also covering new types that get added. + /// + [Test] + public void RunAllEndpoints() + { + var objects = Assembly.GetAssembly(typeof(IRequest)).GetTypes().Where(myType => + myType.IsClass + && !myType.IsAbstract + && myType.GetInterface("IRequest") != null).Select(type => (IRequest)Activator.CreateInstance(type)).ToList(); + objects.ForEach(a => Assert.IsNotNullOrEmpty(a.EndPoint("t"))); + } - /// - /// Run through all the endpoints to make sure they all atleast do not error out. - /// This is so we can get a high code coverage, while also covering new types that get added. - /// - [Test] - public void RunAllEndpoints() - { - - var objects = Assembly.GetAssembly(typeof (IRequest)).GetTypes().Where(myType => - myType.IsClass - && !myType.IsAbstract - && myType.GetInterface("IRequest") != null).Select(type => (IRequest) Activator.CreateInstance(type)).ToList(); - objects.ForEach(a=>Assert.IsNotNullOrEmpty(a.EndPoint("t"))); - } - [Test] - public void RunAllEndpointsWithEmptyString() - { - - var objects = Assembly.GetAssembly(typeof (IRequest)).GetTypes().Where(myType => - myType.IsClass - && !myType.IsAbstract - && myType.GetInterface("IRequest") != null).Select(type => (IRequest) Activator.CreateInstance(type)).ToList(); - objects.ForEach(a=>Assert.IsNotNullOrEmpty(a.EndPoint(string.Empty))); - } - } -} + [Test] + public void RunAllEndpointsWithEmptyString() + { + var objects = Assembly.GetAssembly(typeof(IRequest)).GetTypes().Where(myType => + myType.IsClass + && !myType.IsAbstract + && myType.GetInterface("IRequest") != null).Select(type => (IRequest)Activator.CreateInstance(type)).ToList(); + objects.ForEach(a => Assert.IsNotNullOrEmpty(a.EndPoint(string.Empty))); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net.UnitTests/packages.config b/src/Untappd.Net.UnitTests/packages.config index 079df90..2daf6d4 100644 --- a/src/Untappd.Net.UnitTests/packages.config +++ b/src/Untappd.Net.UnitTests/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/AuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Authentication/AuthenticatedUntappdCredentials.cs index 415e888..4fcdae1 100644 --- a/src/Untappd.Net/Authentication/AuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/AuthenticatedUntappdCredentials.cs @@ -4,22 +4,22 @@ using System.Collections.ObjectModel; namespace Untappd.Net.Authentication { - public sealed class AuthenticatedUntappdCredentials : UntappdCredentials, IAuthenticatedUntappdCredentials - { - /// - /// Pass your authenticated access token - /// - /// - public AuthenticatedUntappdCredentials(string accessToken) - { - if (string.IsNullOrWhiteSpace(accessToken)) - { - throw new ArgumentNullException("accessToken"); - } - AuthenticationData = new ReadOnlyDictionary(new Dictionary() - { - {"access_token", accessToken} - }); - } - } -} + public sealed class AuthenticatedUntappdCredentials : UntappdCredentials, IAuthenticatedUntappdCredentials + { + /// + /// Pass your authenticated access token + /// + /// + public AuthenticatedUntappdCredentials(string accessToken) + { + if (string.IsNullOrWhiteSpace(accessToken)) + { + throw new ArgumentNullException("accessToken"); + } + AuthenticationData = new ReadOnlyDictionary(new Dictionary() + { + {"access_token", accessToken} + }); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/IAuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Authentication/IAuthenticatedUntappdCredentials.cs index 9e0900c..2c7f951 100644 --- a/src/Untappd.Net/Authentication/IAuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/IAuthenticatedUntappdCredentials.cs @@ -1,6 +1,6 @@ namespace Untappd.Net.Authentication { - public interface IAuthenticatedUntappdCredentials : IUntappdCredentials - { - } -} + public interface IAuthenticatedUntappdCredentials : IUntappdCredentials + { + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/IUnAuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Authentication/IUnAuthenticatedUntappdCredentials.cs index b2ff2fb..6c200e8 100644 --- a/src/Untappd.Net/Authentication/IUnAuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/IUnAuthenticatedUntappdCredentials.cs @@ -1,7 +1,6 @@ - -namespace Untappd.Net.Authentication +namespace Untappd.Net.Authentication { - public interface IUnAuthenticatedUntappdCredentials : IUntappdCredentials - { - } -} + public interface IUnAuthenticatedUntappdCredentials : IUntappdCredentials + { + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/IUntappdCredentials.cs b/src/Untappd.Net/Authentication/IUntappdCredentials.cs index 1c43b11..42a684d 100644 --- a/src/Untappd.Net/Authentication/IUntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/IUntappdCredentials.cs @@ -2,8 +2,8 @@ namespace Untappd.Net.Authentication { - public interface IUntappdCredentials - { - IReadOnlyDictionary AuthenticationData { get; } - } -} + public interface IUntappdCredentials + { + IReadOnlyDictionary AuthenticationData { get; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/UnAuthenticatedUntappdCredentials.cs b/src/Untappd.Net/Authentication/UnAuthenticatedUntappdCredentials.cs index a86468d..165de5c 100644 --- a/src/Untappd.Net/Authentication/UnAuthenticatedUntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/UnAuthenticatedUntappdCredentials.cs @@ -4,27 +4,27 @@ using System.Collections.ObjectModel; namespace Untappd.Net.Authentication { - public sealed class UnAuthenticatedUntappdCredentials : UntappdCredentials, IUnAuthenticatedUntappdCredentials - { - /// - /// UnAuthenticated request. Pass your API id and secret - /// - /// - /// - public UnAuthenticatedUntappdCredentials(string clientId, string clientSecret) - { - if (string.IsNullOrWhiteSpace(clientId)) - { - throw new ArgumentNullException("clientId"); - } - if (string.IsNullOrWhiteSpace(clientSecret)) - { - throw new ArgumentNullException("clientSecret"); - } - AuthenticationData = new ReadOnlyDictionary(new Dictionary() - { - {"client_id", clientId}, {"client_secret", clientSecret} - }); - } - } -} + public sealed class UnAuthenticatedUntappdCredentials : UntappdCredentials, IUnAuthenticatedUntappdCredentials + { + /// + /// UnAuthenticated request. Pass your API id and secret + /// + /// + /// + public UnAuthenticatedUntappdCredentials(string clientId, string clientSecret) + { + if (string.IsNullOrWhiteSpace(clientId)) + { + throw new ArgumentNullException("clientId"); + } + if (string.IsNullOrWhiteSpace(clientSecret)) + { + throw new ArgumentNullException("clientSecret"); + } + AuthenticationData = new ReadOnlyDictionary(new Dictionary() + { + {"client_id", clientId}, {"client_secret", clientSecret} + }); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Authentication/UntappdCredentials.cs b/src/Untappd.Net/Authentication/UntappdCredentials.cs index 8e265e6..93be032 100644 --- a/src/Untappd.Net/Authentication/UntappdCredentials.cs +++ b/src/Untappd.Net/Authentication/UntappdCredentials.cs @@ -2,8 +2,8 @@ namespace Untappd.Net.Authentication { - public abstract class UntappdCredentials : IUntappdCredentials - { - public IReadOnlyDictionary AuthenticationData { get; protected set; } - } -} + public abstract class UntappdCredentials : IUntappdCredentials + { + public IReadOnlyDictionary AuthenticationData { get; protected set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Constants.cs b/src/Untappd.Net/Constants.cs index 1c72c24..f163998 100644 --- a/src/Untappd.Net/Constants.cs +++ b/src/Untappd.Net/Constants.cs @@ -1,8 +1,8 @@ namespace Untappd.Net { - public struct Constants - { - public const string BaseRequestString = "https://api.untappd.com"; - public const string OAuthTokenEndPoint = "https://untappd.com/oauth/authorize"; - } -} + public struct Constants + { + public const string BaseRequestString = "https://api.untappd.com"; + public const string OAuthTokenEndPoint = "https://untappd.com/oauth/authorize"; + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Exception/BaseUntappdException.cs b/src/Untappd.Net/Exception/BaseUntappdException.cs index eb59dc2..b2f0869 100644 --- a/src/Untappd.Net/Exception/BaseUntappdException.cs +++ b/src/Untappd.Net/Exception/BaseUntappdException.cs @@ -2,19 +2,19 @@ namespace Untappd.Net.Exception { - [Serializable] - public class BaseUntappdException : System.Exception - { - public BaseUntappdException() - { - } - - public BaseUntappdException(string message) : base(message) - { - } + [Serializable] + public class BaseUntappdException : System.Exception + { + public BaseUntappdException() + { + } - public BaseUntappdException(string message, System.Exception inner) : base(message, inner) - { - } - } -} + public BaseUntappdException(string message) : base(message) + { + } + + public BaseUntappdException(string message, System.Exception inner) : base(message, inner) + { + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Exception/EndpointConfigurationException.cs b/src/Untappd.Net/Exception/EndpointConfigurationException.cs index 432a918..33b79ea 100644 --- a/src/Untappd.Net/Exception/EndpointConfigurationException.cs +++ b/src/Untappd.Net/Exception/EndpointConfigurationException.cs @@ -2,17 +2,16 @@ namespace Untappd.Net.Exception { - [Serializable] - public sealed class EndpointConfigurationException : BaseUntappdException - { - /// - /// Called when a class has an empty endpoint - /// - /// - public EndpointConfigurationException() - :base("Invalid endpoint configured") - { - - } - } -} + [Serializable] + public sealed class EndpointConfigurationException : BaseUntappdException + { + /// + /// Called when a class has an empty endpoint + /// + /// + public EndpointConfigurationException() + : base("Invalid endpoint configured") + { + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Exception/HttpErrorException.cs b/src/Untappd.Net/Exception/HttpErrorException.cs index 7be45eb..946171b 100644 --- a/src/Untappd.Net/Exception/HttpErrorException.cs +++ b/src/Untappd.Net/Exception/HttpErrorException.cs @@ -4,39 +4,40 @@ using RestSharp; namespace Untappd.Net.Exception { - [Serializable] - public sealed class HttpErrorException : BaseUntappdException - { - public override string Message - { - get - { - return _message; - } - } + [Serializable] + public sealed class HttpErrorException : BaseUntappdException + { + public override string Message + { + get + { + return _message; + } + } - private readonly string _message; - public HttpErrorException(IRestRequest request, IRestResponse response) - { - if(request == null) - { - throw new ArgumentNullException("request"); - } - if (response == null) - { - throw new ArgumentNullException("response"); - } - var code = (int) response.StatusCode; - if (code == 200) - { - throw new BaseUntappdException( - "HttpError is being throw with a 200 error. Something has gone horribly wrong"); - } + private readonly string _message; - _message = string.Format("HttpError {0} was returned with Message: {1}{2}", code, Environment.NewLine, - response.ErrorMessage); - Data.Add("Request Object", JsonConvert.SerializeObject(request)); - Data.Add("Response Object", JsonConvert.SerializeObject(response)); - } - } -} + public HttpErrorException(IRestRequest request, IRestResponse response) + { + if (request == null) + { + throw new ArgumentNullException("request"); + } + if (response == null) + { + throw new ArgumentNullException("response"); + } + var code = (int)response.StatusCode; + if (code == 200) + { + throw new BaseUntappdException( + "HttpError is being throw with a 200 error. Something has gone horribly wrong"); + } + + _message = string.Format("HttpError {0} was returned with Message: {1}{2}", code, Environment.NewLine, + response.ErrorMessage); + Data.Add("Request Object", JsonConvert.SerializeObject(request)); + Data.Add("Response Object", JsonConvert.SerializeObject(response)); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/OAuth/AuthenticationHelper.cs b/src/Untappd.Net/OAuth/AuthenticationHelper.cs index 198f210..73a1caa 100644 --- a/src/Untappd.Net/OAuth/AuthenticationHelper.cs +++ b/src/Untappd.Net/OAuth/AuthenticationHelper.cs @@ -3,58 +3,58 @@ using Untappd.Net.Authentication; namespace Untappd.Net.OAuth { - public static class AuthenticationHelper - { - /// - /// Redirect the user to this string. - /// - /// - /// The URL to redirect back to your application. Should listen on code as a string param - /// - public static string RedirectUserTo(IUnAuthenticatedUntappdCredentials credentials, string redirectUrl) - { - if (credentials == null) - { - throw new ArgumentNullException("credentials"); - } + public static class AuthenticationHelper + { + /// + /// Redirect the user to this string. + /// + /// + /// The URL to redirect back to your application. Should listen on code as a string param + /// + public static string RedirectUserTo(IUnAuthenticatedUntappdCredentials credentials, string redirectUrl) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } - if (string.IsNullOrWhiteSpace(redirectUrl)) - { - throw new ArgumentNullException("redirectUrl"); - } - - return string.Format("{0}/?client_id={1}&response_type=code&redirect_url={2}", Constants.BaseRequestString, - credentials.AuthenticationData["client_id"], redirectUrl); - } + if (string.IsNullOrWhiteSpace(redirectUrl)) + { + throw new ArgumentNullException("redirectUrl"); + } - /// - /// Url to get the OAuth token. - /// - /// - /// - /// Data returned by the initial request(see: RedirectUserTo) - /// - public static string TokenUrl(IUnAuthenticatedUntappdCredentials credentials, string redirectUrl, string code) - { - if (credentials == null) - { - throw new ArgumentNullException("credentials"); - } + return string.Format("{0}/?client_id={1}&response_type=code&redirect_url={2}", Constants.BaseRequestString, + credentials.AuthenticationData["client_id"], redirectUrl); + } - if (string.IsNullOrWhiteSpace(redirectUrl)) - { - throw new ArgumentNullException("redirectUrl"); - } - if (string.IsNullOrWhiteSpace(code)) - { - throw new ArgumentNullException("code"); - } - return string.Format("{0}/?client_id={1}&client_secret={2}&response_type=code&redirect_url={3}&code={4}", - Constants.OAuthTokenEndPoint, - credentials.AuthenticationData["client_id"], - credentials.AuthenticationData["client_secret"], - redirectUrl, - code); - } - } -} + /// + /// Url to get the OAuth token. + /// + /// + /// + /// Data returned by the initial request(see: RedirectUserTo) + /// + public static string TokenUrl(IUnAuthenticatedUntappdCredentials credentials, string redirectUrl, string code) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + + if (string.IsNullOrWhiteSpace(redirectUrl)) + { + throw new ArgumentNullException("redirectUrl"); + } + if (string.IsNullOrWhiteSpace(code)) + { + throw new ArgumentNullException("code"); + } + return string.Format("{0}/?client_id={1}&client_secret={2}&response_type=code&redirect_url={3}&code={4}", + Constants.OAuthTokenEndPoint, + credentials.AuthenticationData["client_id"], + credentials.AuthenticationData["client_secret"], + redirectUrl, + code); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Properties/AssemblyInfo.cs b/src/Untappd.Net/Properties/AssemblyInfo.cs index 703b1ff..dabbb91 100644 --- a/src/Untappd.Net/Properties/AssemblyInfo.cs +++ b/src/Untappd.Net/Properties/AssemblyInfo.cs @@ -1,12 +1,10 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following +// 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. using System; - +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; [assembly: AssemblyTitle("Untappd.Net")] [assembly: AssemblyDescription("C# Untappd Wrapper")] @@ -18,8 +16,8 @@ using System; [assembly: AssemblyCulture("")] [assembly: CLSCompliantAttribute(true)] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -29,14 +27,14 @@ using System; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.2.*")] -//If AssemblyFileVersion is not explicitly set, it takes its value from the AssemblyVersion attribute. +//If AssemblyFileVersion is not explicitly set, it takes its value from the AssemblyVersion attribute. //[assembly: AssemblyFileVersion("0.2.*")] [assembly: InternalsVisibleTo("Untappd.Net.UnitTests")] \ No newline at end of file diff --git a/src/Untappd.Net/Request/BasicRequest.cs b/src/Untappd.Net/Request/BasicRequest.cs index 24cfb70..a5cc3bf 100644 --- a/src/Untappd.Net/Request/BasicRequest.cs +++ b/src/Untappd.Net/Request/BasicRequest.cs @@ -2,22 +2,23 @@ namespace Untappd.Net.Request { - public abstract class BasicRequest - { - protected abstract string EndPointWithConfiguration { get; } - /// - /// Pass in the parameter into the request...ie username, brewery, etc. - /// - /// - /// - public string EndPoint(string parameter = "") - { - if (!String.IsNullOrEmpty(parameter)) - { - parameter = string.Format("/{0}", parameter); - return string.Format(EndPointWithConfiguration, parameter); - } - return string.Format(EndPointWithConfiguration, string.Empty); - } - } -} + public abstract class BasicRequest + { + protected abstract string EndPointWithConfiguration { get; } + + /// + /// Pass in the parameter into the request...ie username, brewery, etc. + /// + /// + /// + public string EndPoint(string parameter = "") + { + if (!String.IsNullOrEmpty(parameter)) + { + parameter = string.Format("/{0}", parameter); + return string.Format(EndPointWithConfiguration, parameter); + } + return string.Format(EndPointWithConfiguration, string.Empty); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/IAction.cs b/src/Untappd.Net/Request/IAction.cs index c169757..595eba8 100644 --- a/src/Untappd.Net/Request/IAction.cs +++ b/src/Untappd.Net/Request/IAction.cs @@ -3,10 +3,10 @@ using RestSharp; namespace Untappd.Net.Request { - public interface IAction - { - Method RequestMethod { get; } - string EndPoint { get; } - IDictionary BodyParameters { get; } - } -} + public interface IAction + { + Method RequestMethod { get; } + string EndPoint { get; } + IDictionary BodyParameters { get; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/IAuthenticatedRequest.cs b/src/Untappd.Net/Request/IAuthenticatedRequest.cs index 3ec9ffd..3f9e604 100644 --- a/src/Untappd.Net/Request/IAuthenticatedRequest.cs +++ b/src/Untappd.Net/Request/IAuthenticatedRequest.cs @@ -1,6 +1,6 @@ namespace Untappd.Net.Request { - public interface IAuthenticatedRequest : IRequest - { - } -} + public interface IAuthenticatedRequest : IRequest + { + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/IRequest.cs b/src/Untappd.Net/Request/IRequest.cs index 1283f2f..3c4836e 100644 --- a/src/Untappd.Net/Request/IRequest.cs +++ b/src/Untappd.Net/Request/IRequest.cs @@ -1,7 +1,7 @@ namespace Untappd.Net.Request { - public interface IRequest - { - string EndPoint(string parameter); - } -} + public interface IRequest + { + string EndPoint(string parameter); + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/IUnAuthenticatedRequest.cs b/src/Untappd.Net/Request/IUnAuthenticatedRequest.cs index 86e287c..db7b6fd 100644 --- a/src/Untappd.Net/Request/IUnAuthenticatedRequest.cs +++ b/src/Untappd.Net/Request/IUnAuthenticatedRequest.cs @@ -1,6 +1,6 @@ namespace Untappd.Net.Request { - public interface IUnAuthenticatedRequest : IRequest - { - } -} + public interface IUnAuthenticatedRequest : IRequest + { + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/Repository.cs b/src/Untappd.Net/Request/Repository.cs index 4de41a8..9dc8b51 100644 --- a/src/Untappd.Net/Request/Repository.cs +++ b/src/Untappd.Net/Request/Repository.cs @@ -9,113 +9,114 @@ using Untappd.Net.Exception; namespace Untappd.Net.Request { - public sealed partial class Repository - { - internal IRestClient Client; - internal IRestRequest Request; - public bool FailFast { get; set; } - /// - /// Event to listen to when failFast is set to false - /// This allows you to capture the excpetion, before its swallowed - /// - public event UnhandledExceptionEventHandler OnExceptionThrown; + public sealed partial class Repository + { + internal IRestClient Client; + internal IRestRequest Request; + public bool FailFast { get; set; } - /// - /// Make a repository - /// - /// Should we throw exceptions? or just return null - public Repository(bool failFast = true) - { - Client = new RestClient(Constants.BaseRequestString); - Request = new RestRequest(); - FailFast = failFast; - } + /// + /// Event to listen to when failFast is set to false + /// This allows you to capture the excpetion, before its swallowed + /// + public event UnhandledExceptionEventHandler OnExceptionThrown; - [Obsolete("This constructor is used for mocking purposes only", false)] - internal Repository(IRestClient client, IRestRequest request) - { - Client = client; - Request = request; - } + /// + /// Make a repository + /// + /// Should we throw exceptions? or just return null + public Repository(bool failFast = true) + { + Client = new RestClient(Constants.BaseRequestString); + Request = new RestRequest(); + FailFast = failFast; + } - internal Repository ConfigureRequest(string endPoint, IDictionary bodyParameters = null, Method webMethod = Method.GET) - { - Request.Resource = endPoint; - Request.Method = webMethod; - if (Request.Parameters != null && Request.Parameters.Count > 0) - { - Request.Parameters.Clear(); - } + [Obsolete("This constructor is used for mocking purposes only", false)] + internal Repository(IRestClient client, IRestRequest request) + { + Client = client; + Request = request; + } - if (bodyParameters == null) return this; - foreach (var param in bodyParameters) - { - Request.AddParameter(param.Key, param.Value); - } - return this; - } + internal Repository ConfigureRequest(string endPoint, IDictionary bodyParameters = null, Method webMethod = Method.GET) + { + Request.Resource = endPoint; + Request.Method = webMethod; + if (Request.Parameters != null && Request.Parameters.Count > 0) + { + Request.Parameters.Clear(); + } - internal Repository ConfigureRequest(IUntappdCredentials credentials, string endPoint, IDictionary bodyParameters = null, Method webMethod = Method.GET) - { - ConfigureRequest(endPoint, bodyParameters, webMethod); - foreach (var untappdCredential in credentials.AuthenticationData) - { - Request.AddParameter(untappdCredential.Key, untappdCredential.Value); - } - return this; - } + if (bodyParameters == null) return this; + foreach (var param in bodyParameters) + { + Request.AddParameter(param.Key, param.Value); + } + return this; + } - TResult ExecuteRequest() - where TResult : class - { - return ProcessExecution(Client.Execute(Request)); - } + internal Repository ConfigureRequest(IUntappdCredentials credentials, string endPoint, IDictionary bodyParameters = null, Method webMethod = Method.GET) + { + ConfigureRequest(endPoint, bodyParameters, webMethod); + foreach (var untappdCredential in credentials.AuthenticationData) + { + Request.AddParameter(untappdCredential.Key, untappdCredential.Value); + } + return this; + } - async Task ExecuteRequestAsync() - where TResult : class - { - return ProcessExecution(await Client.ExecuteTaskAsync(Request)); - } + private TResult ExecuteRequest() + where TResult : class + { + return ProcessExecution(Client.Execute(Request)); + } - TResult ProcessExecution(IRestResponse response) - where TResult : class - { - //if the return type is not 200 throw errors - if (response.StatusCode != HttpStatusCode.OK) - { - var excpetion = new HttpErrorException(Request, response); - var eventThrow = OnExceptionThrown; + private async Task ExecuteRequestAsync() + where TResult : class + { + return ProcessExecution(await Client.ExecuteTaskAsync(Request)); + } - if (eventThrow != null) - { - eventThrow(this, new UnhandledExceptionEventArgs(excpetion, FailFast)); - } - if (FailFast) - { - throw excpetion; - } - return null; - } - //try to deserialize - try - { - return JsonConvert.DeserializeObject(response.Content); - } - catch(System.Exception e) - { - var eventThrow = OnExceptionThrown; + private TResult ProcessExecution(IRestResponse response) + where TResult : class + { + //if the return type is not 200 throw errors + if (response.StatusCode != HttpStatusCode.OK) + { + var excpetion = new HttpErrorException(Request, response); + var eventThrow = OnExceptionThrown; - if (eventThrow != null) - { - eventThrow(this, new UnhandledExceptionEventArgs(e, FailFast)); - } - if (FailFast) - { - throw; - } - - return null; - } - } - } -} + if (eventThrow != null) + { + eventThrow(this, new UnhandledExceptionEventArgs(excpetion, FailFast)); + } + if (FailFast) + { + throw excpetion; + } + return null; + } + //try to deserialize + try + { + return JsonConvert.DeserializeObject(response.Content); + } + catch (System.Exception e) + { + var eventThrow = OnExceptionThrown; + + if (eventThrow != null) + { + eventThrow(this, new UnhandledExceptionEventArgs(e, FailFast)); + } + if (FailFast) + { + throw; + } + + return null; + } + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/RepositoryGet.cs b/src/Untappd.Net/Request/RepositoryGet.cs index a34e428..40454a4 100644 --- a/src/Untappd.Net/Request/RepositoryGet.cs +++ b/src/Untappd.Net/Request/RepositoryGet.cs @@ -1,78 +1,77 @@ using System.Collections.Generic; using System.Threading.Tasks; using Untappd.Net.Authentication; -using Untappd.Net.Exception; namespace Untappd.Net.Request { - public sealed partial class Repository - { - /// - /// Get the things! - /// - /// What you want to request - /// Pass in a credentials object - /// this is the main parameter for a request. ie v4/user/checkins/urlParameter. Consult the untappd docs, this can be null for a few requests - /// Any additional params you wish to add to the request - /// - /// - public TResult Get(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) - where TResult : class, IUnAuthenticatedRequest, new() - { - var result = new TResult(); - return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) - .ExecuteRequest(); - } + public sealed partial class Repository + { + /// + /// Get the things! + /// + /// What you want to request + /// Pass in a credentials object + /// this is the main parameter for a request. ie v4/user/checkins/urlParameter. Consult the untappd docs, this can be null for a few requests + /// Any additional params you wish to add to the request + /// + /// + public TResult Get(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) + where TResult : class, IUnAuthenticatedRequest, new() + { + var result = new TResult(); + return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) + .ExecuteRequest(); + } - /// - /// Get the things! Async! - /// - /// - /// - /// - /// - /// - /// - public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) - where TResult : class, IUnAuthenticatedRequest, new() - { - var result = new TResult(); - return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) - .ExecuteRequestAsync(); - } + /// + /// Get the things! Async! + /// + /// + /// + /// + /// + /// + /// + public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) + where TResult : class, IUnAuthenticatedRequest, new() + { + var result = new TResult(); + return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) + .ExecuteRequestAsync(); + } - /// - /// Get the things! authenticated! - /// - /// - /// Pass in a credentials object - /// this is the main parameter for a request. ie v4/user/checkins/urlParameter. Consult the untappd docs, this can be null for a few requests - /// Any additional params you wish to add to the request - /// - /// - public TResult Get(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) - where TResult : class,IAuthenticatedRequest, new() - { - var result = new TResult(); - return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) - .ExecuteRequest(); - } + /// + /// Get the things! authenticated! + /// + /// + /// Pass in a credentials object + /// this is the main parameter for a request. ie v4/user/checkins/urlParameter. Consult the untappd docs, this can be null for a few requests + /// Any additional params you wish to add to the request + /// + /// + public TResult Get(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) + where TResult : class, IAuthenticatedRequest, new() + { + var result = new TResult(); + return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) + .ExecuteRequest(); + } - /// - /// Get the things Authenticated! Async!! - /// - /// - /// - /// - /// - /// - /// - public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) - where TResult : class,IAuthenticatedRequest, new() - { - var result = new TResult(); - return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) - .ExecuteRequestAsync(); - } - } -} + /// + /// Get the things Authenticated! Async!! + /// + /// + /// + /// + /// + /// + /// + public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) + where TResult : class, IAuthenticatedRequest, new() + { + var result = new TResult(); + return ConfigureRequest(credentials, result.EndPoint(urlParameter), bodyParameters) + .ExecuteRequestAsync(); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Request/RepositoryPost.cs b/src/Untappd.Net/Request/RepositoryPost.cs index b971364..fae1e80 100644 --- a/src/Untappd.Net/Request/RepositoryPost.cs +++ b/src/Untappd.Net/Request/RepositoryPost.cs @@ -1,51 +1,51 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using Untappd.Net.Authentication; -using System; namespace Untappd.Net.Request { - public sealed partial class Repository - { - /// - /// do a post with actions - /// - /// - /// - /// returns dynamic since often the return doesn't matter - public dynamic Post(IAuthenticatedUntappdCredentials credentials, IAction action) - { - if (credentials == null) - { - throw new ArgumentNullException("credentials"); - } - if (action == null) - { - throw new ArgumentNullException("action"); - } + public sealed partial class Repository + { + /// + /// do a post with actions + /// + /// + /// + /// returns dynamic since often the return doesn't matter + public dynamic Post(IAuthenticatedUntappdCredentials credentials, IAction action) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + if (action == null) + { + throw new ArgumentNullException("action"); + } - return ConfigureRequest(credentials, action.EndPoint, action.BodyParameters, action.RequestMethod) - .ExecuteRequest(); - } + return ConfigureRequest(credentials, action.EndPoint, action.BodyParameters, action.RequestMethod) + .ExecuteRequest(); + } - /// - /// do a post with actions, Async! - /// - /// - /// - /// returns dynamic since often the return doesn't matter - public Task PostAsync(IAuthenticatedUntappdCredentials credentials, IAction action) - { - if (credentials == null) - { - throw new ArgumentNullException("credentials"); - } - if (action == null) - { - throw new ArgumentNullException("action"); - } + /// + /// do a post with actions, Async! + /// + /// + /// + /// returns dynamic since often the return doesn't matter + public Task PostAsync(IAuthenticatedUntappdCredentials credentials, IAction action) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + if (action == null) + { + throw new ArgumentNullException("action"); + } - return ConfigureRequest(credentials, action.EndPoint, action.BodyParameters, action.RequestMethod) - .ExecuteRequestAsync(); - } - } -} + return ConfigureRequest(credentials, action.EndPoint, action.BodyParameters, action.RequestMethod) + .ExecuteRequestAsync(); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/AcceptFriend.cs b/src/Untappd.Net/Responses/Actions/AcceptFriend.cs index 7003de0..e422f66 100644 --- a/src/Untappd.Net/Responses/Actions/AcceptFriend.cs +++ b/src/Untappd.Net/Responses/Actions/AcceptFriend.cs @@ -5,18 +5,19 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class AcceptFriend : IAction - { - public Method RequestMethod { get { return Method.GET; } } - public string EndPoint { get; private set; } - public IDictionary BodyParameters { get { return new Dictionary(); } } - public AcceptFriend(string target_id) - { - if (string.IsNullOrWhiteSpace(target_id)) - { - throw new ArgumentNullException("target_id"); - } - EndPoint = string.Format("v4/friend/accept/{0}", target_id); - } - } -} + public class AcceptFriend : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get; private set; } + public IDictionary BodyParameters { get { return new Dictionary(); } } + + public AcceptFriend(string target_id) + { + if (string.IsNullOrWhiteSpace(target_id)) + { + throw new ArgumentNullException("target_id"); + } + EndPoint = string.Format("v4/friend/accept/{0}", target_id); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/AddComment.cs b/src/Untappd.Net/Responses/Actions/AddComment.cs index 7c088f4..02ee8cc 100644 --- a/src/Untappd.Net/Responses/Actions/AddComment.cs +++ b/src/Untappd.Net/Responses/Actions/AddComment.cs @@ -5,28 +5,28 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class AddComment : IAction - { - public Method RequestMethod { get {return Method.POST;} } - public string EndPoint { get; private set; } - public IDictionary BodyParameters { get; private set; } - public AddComment(string checkinId, string shout) - { - if (string.IsNullOrWhiteSpace(checkinId)) - { - throw new ArgumentNullException("checkinId"); - } - if (string.IsNullOrWhiteSpace(shout)) - { - throw new ArgumentNullException("shout"); - } - if (shout.Length > 140) - { - throw new ArgumentOutOfRangeException("shout", shout, "Shout cannot be more than 140 characters"); - } - EndPoint = string.Format("v4/checkin/addcomment/{0}", checkinId); - BodyParameters = new Dictionary {{shout, shout}}; + public class AddComment : IAction + { + public Method RequestMethod { get { return Method.POST; } } + public string EndPoint { get; private set; } + public IDictionary BodyParameters { get; private set; } - } - } -} + public AddComment(string checkinId, string shout) + { + if (string.IsNullOrWhiteSpace(checkinId)) + { + throw new ArgumentNullException("checkinId"); + } + if (string.IsNullOrWhiteSpace(shout)) + { + throw new ArgumentNullException("shout"); + } + if (shout.Length > 140) + { + throw new ArgumentOutOfRangeException("shout", shout, "Shout cannot be more than 140 characters"); + } + EndPoint = string.Format("v4/checkin/addcomment/{0}", checkinId); + BodyParameters = new Dictionary { { shout, shout } }; + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/AddFriend.cs b/src/Untappd.Net/Responses/Actions/AddFriend.cs index c67fca6..5501414 100644 --- a/src/Untappd.Net/Responses/Actions/AddFriend.cs +++ b/src/Untappd.Net/Responses/Actions/AddFriend.cs @@ -5,18 +5,19 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class AddFriend : IAction - { - public Method RequestMethod { get{return Method.GET;} } - public string EndPoint { get; private set; } - public IDictionary BodyParameters { get{ return new Dictionary();} } - public AddFriend(string target_id) - { - if (string.IsNullOrWhiteSpace(target_id)) - { - throw new ArgumentNullException("target_id"); - } - EndPoint = string.Format("v4/friend/request/{0}", target_id); - } - } -} + public class AddFriend : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get; private set; } + public IDictionary BodyParameters { get { return new Dictionary(); } } + + public AddFriend(string target_id) + { + if (string.IsNullOrWhiteSpace(target_id)) + { + throw new ArgumentNullException("target_id"); + } + EndPoint = string.Format("v4/friend/request/{0}", target_id); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/AddToWishList.cs b/src/Untappd.Net/Responses/Actions/AddToWishList.cs index 991fb3f..baeff0f 100644 --- a/src/Untappd.Net/Responses/Actions/AddToWishList.cs +++ b/src/Untappd.Net/Responses/Actions/AddToWishList.cs @@ -4,15 +4,15 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class AddToWishList : IAction - { - public Method RequestMethod { get {return Method.GET;} } - public string EndPoint { get { return "v4/user/wishlist/add"; } } - public IDictionary BodyParameters { get; private set; } - public AddToWishList(int beerId) - { - BodyParameters = new Dictionary() { { "bid", beerId } }; + public class AddToWishList : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get { return "v4/user/wishlist/add"; } } + public IDictionary BodyParameters { get; private set; } - } - } -} + public AddToWishList(int beerId) + { + BodyParameters = new Dictionary() { { "bid", beerId } }; + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/CheckIn.cs b/src/Untappd.Net/Responses/Actions/CheckIn.cs index 5989a57..ac90840 100644 --- a/src/Untappd.Net/Responses/Actions/CheckIn.cs +++ b/src/Untappd.Net/Responses/Actions/CheckIn.cs @@ -5,93 +5,92 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class CheckIn : IAction - { - private short _rating; - private string _shout; - public Method RequestMethod { get{ return Method.POST;} } - public string EndPoint { get { return "v4/checkin/add"; } } + public class CheckIn : IAction + { + private short _rating; + private string _shout; + public Method RequestMethod { get { return Method.POST; } } + public string EndPoint { get { return "v4/checkin/add"; } } - public IDictionary BodyParameters - { - get - { - var dict = new Dictionary - { - {"gmt_offset", GmtOffset}, - {"timezone", Timezone}, - {"bid", Bid} - }; - if (Geolat.HasValue) - { - dict.Add("geolat", Geolat.Value); - } - if (Geolng.HasValue) - { - dict.Add("geolng", Geolng.Value); - } - if (!string.IsNullOrWhiteSpace(Shout) && Shout.Length <= 140) - { - dict.Add("shout", Shout); - } - if (Rating > 0 && Rating < 6) - { - dict.Add("rating", Rating); - } - return dict; - } - } + public IDictionary BodyParameters + { + get + { + var dict = new Dictionary + { + {"gmt_offset", GmtOffset}, + {"timezone", Timezone}, + {"bid", Bid} + }; + if (Geolat.HasValue) + { + dict.Add("geolat", Geolat.Value); + } + if (Geolng.HasValue) + { + dict.Add("geolng", Geolng.Value); + } + if (!string.IsNullOrWhiteSpace(Shout) && Shout.Length <= 140) + { + dict.Add("shout", Shout); + } + if (Rating > 0 && Rating < 6) + { + dict.Add("rating", Rating); + } + return dict; + } + } - public string GmtOffset { get; private set; } - public string Timezone { get; private set; } - public int Bid { get; private set; } - public int? Geolat { get; set; } - public int? Geolng { get; set; } + public string GmtOffset { get; private set; } + public string Timezone { get; private set; } + public int Bid { get; private set; } + public int? Geolat { get; set; } + public int? Geolng { get; set; } - public string Shout - { - get { return _shout; } - set - { - if (value == null) - { - throw new ArgumentNullException("value"); - } - if (value.Length > 140) - { - throw new ArgumentOutOfRangeException("value", value,"Shout can be no more than 140 characters"); - } - _shout = string.Copy(value); - } - } + public string Shout + { + get { return _shout; } + set + { + if (value == null) + { + throw new ArgumentNullException("value"); + } + if (value.Length > 140) + { + throw new ArgumentOutOfRangeException("value", value, "Shout can be no more than 140 characters"); + } + _shout = string.Copy(value); + } + } - public short Rating - { - get { return _rating; } - set - { - if (value < 1 || value > 5) - { - throw new ArgumentOutOfRangeException("value", value, "Ratings should be between 1 and 5"); - } - _rating = value; - } - } + public short Rating + { + get { return _rating; } + set + { + if (value < 1 || value > 5) + { + throw new ArgumentOutOfRangeException("value", value, "Ratings should be between 1 and 5"); + } + _rating = value; + } + } - - public CheckIn(string gmtOffset, string timezone, int bid) - { - if (string.IsNullOrWhiteSpace(gmtOffset)) - { - throw new ArgumentNullException("gmtOffset"); - } - if (string.IsNullOrWhiteSpace(timezone)) - { - throw new ArgumentNullException("timezone"); - } - GmtOffset = string.Copy(gmtOffset); - Timezone = string.Copy(timezone); - Bid = bid; - } - } -} + public CheckIn(string gmtOffset, string timezone, int bid) + { + if (string.IsNullOrWhiteSpace(gmtOffset)) + { + throw new ArgumentNullException("gmtOffset"); + } + if (string.IsNullOrWhiteSpace(timezone)) + { + throw new ArgumentNullException("timezone"); + } + GmtOffset = string.Copy(gmtOffset); + Timezone = string.Copy(timezone); + Bid = bid; + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/PendingFriends.cs b/src/Untappd.Net/Responses/Actions/PendingFriends.cs index aec06d3..299a6e2 100644 --- a/src/Untappd.Net/Responses/Actions/PendingFriends.cs +++ b/src/Untappd.Net/Responses/Actions/PendingFriends.cs @@ -4,29 +4,29 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class PendingFriends : IAction - { - public Method RequestMethod { get {return Method.GET;} } - public string EndPoint { get { return "v4/user/pending"; }} + public class PendingFriends : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get { return "v4/user/pending"; } } - public IDictionary BodyParameters - { - get - { - var dict = new Dictionary(); - if (Offset.HasValue) - { - dict.Add("offset", Offset.Value); - } - if (Limit.HasValue) - { - dict.Add("limit", Limit.Value); - } - return dict; - } - } + public IDictionary BodyParameters + { + get + { + var dict = new Dictionary(); + if (Offset.HasValue) + { + dict.Add("offset", Offset.Value); + } + if (Limit.HasValue) + { + dict.Add("limit", Limit.Value); + } + return dict; + } + } - public int? Offset { get; set; } - public int? Limit { get; set; } - } -} + public int? Offset { get; set; } + public int? Limit { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/RemoveFriend.cs b/src/Untappd.Net/Responses/Actions/RemoveFriend.cs index 0463da6..ee71f42 100644 --- a/src/Untappd.Net/Responses/Actions/RemoveFriend.cs +++ b/src/Untappd.Net/Responses/Actions/RemoveFriend.cs @@ -5,18 +5,19 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class RemoveFriend : IAction - { - public Method RequestMethod { get { return Method.GET; } } - public string EndPoint { get; private set; } - public IDictionary BodyParameters { get { return new Dictionary(); } } - public RemoveFriend(string target_id) - { - if (string.IsNullOrWhiteSpace(target_id)) - { - throw new ArgumentNullException("target_id"); - } - EndPoint = string.Format("v4/friend/reject/{0}", target_id); - } - } -} + public class RemoveFriend : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get; private set; } + public IDictionary BodyParameters { get { return new Dictionary(); } } + + public RemoveFriend(string target_id) + { + if (string.IsNullOrWhiteSpace(target_id)) + { + throw new ArgumentNullException("target_id"); + } + EndPoint = string.Format("v4/friend/reject/{0}", target_id); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/RemoveFromWishList.cs b/src/Untappd.Net/Responses/Actions/RemoveFromWishList.cs index 39586c3..a0b74e6 100644 --- a/src/Untappd.Net/Responses/Actions/RemoveFromWishList.cs +++ b/src/Untappd.Net/Responses/Actions/RemoveFromWishList.cs @@ -4,15 +4,15 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class RemoveFromWishList : IAction - { - public Method RequestMethod { get {return Method.GET;} } - public string EndPoint { get { return "v4/user/wishlist/delete"; } } - public IDictionary BodyParameters { get; private set; } - public RemoveFromWishList(int beerId) - { - BodyParameters = new Dictionary() { { "bid", beerId } }; + public class RemoveFromWishList : IAction + { + public Method RequestMethod { get { return Method.GET; } } + public string EndPoint { get { return "v4/user/wishlist/delete"; } } + public IDictionary BodyParameters { get; private set; } - } - } -} + public RemoveFromWishList(int beerId) + { + BodyParameters = new Dictionary() { { "bid", beerId } }; + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Actions/ToastUntoast.cs b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs index 3fee33c..e8483bf 100644 --- a/src/Untappd.Net/Responses/Actions/ToastUntoast.cs +++ b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs @@ -5,23 +5,24 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Actions { - public class ToastUntoast : IAction - { - public Method RequestMethod { get { return Method.POST; } } - public IDictionary BodyParameters { get { return new Dictionary(); } } - public string EndPoint { get; private set; } - /// - /// - /// - /// - /// - public ToastUntoast(string checkinId) - { - if (string.IsNullOrWhiteSpace(checkinId)) - { - throw new ArgumentNullException("checkinId"); - } - EndPoint = string.Format("v4/checkin/toast/{0}", checkinId); - } - } -} + public class ToastUntoast : IAction + { + public Method RequestMethod { get { return Method.POST; } } + public IDictionary BodyParameters { get { return new Dictionary(); } } + public string EndPoint { get; private set; } + + /// + /// + /// + /// + /// + public ToastUntoast(string checkinId) + { + if (string.IsNullOrWhiteSpace(checkinId)) + { + throw new ArgumentNullException("checkinId"); + } + EndPoint = string.Format("v4/checkin/toast/{0}", checkinId); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/BeerInfo.cs b/src/Untappd.Net/Responses/BeerInfo.cs index 24c1f1a..8003541 100644 --- a/src/Untappd.Net/Responses/BeerInfo.cs +++ b/src/Untappd.Net/Responses/BeerInfo.cs @@ -4,949 +4,900 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.BeerInfo { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Stats + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("monthly_count")] + public int MonthlyCount { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("total_user_count")] + public int TotalUserCount { get; set; } - public class Notifications - { + [JsonProperty("user_count")] + public int UserCount { get; set; } + } - [JsonProperty("type")] - public string Type { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("facebook")] + public string Facebook { get; set; } - public class Stats - { + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("monthly_count")] - public int MonthlyCount { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("total_user_count")] - public int TotalUserCount { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("user_count")] - public int UserCount { get; set; } - } + [JsonProperty("lng")] + public double Lng { get; set; } + } - public class Contact - { + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("country_name")] + public string CountryName { get; set; } - public class Location - { + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact Contact { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } + } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - public class Brewery - { + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + public class Beer2 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact Contact { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } - } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - public class Photo - { + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("beer_style_id")] + public int BeerStyleId { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - public class Beer2 - { + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + public class Contact2 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + public class Location2 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("beer_style_id")] - public int BeerStyleId { get; set; } + public class Brewery2 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("country_name")] + public string CountryName { get; set; } - public class Contact2 - { + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact2 Contact { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("location")] + public Location2 Location { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("url")] - public string Url { get; set; } - } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class Location2 - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("relationship")] + public string Relationship { get; set; } - public class Brewery2 - { + [JsonProperty("is_private")] + public int IsPrivate { get; set; } + } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + public class Item + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("photo")] + public Photo Photo { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("beer")] + public Beer2 Beer { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact2 Contact { get; set; } + [JsonProperty("brewery")] + public Brewery2 Brewery { get; set; } - [JsonProperty("location")] - public Location2 Location { get; set; } + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("venue")] + public IList Venue { get; set; } + } - public class User - { + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class User2 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } - } + [JsonProperty("url")] + public string Url { get; set; } - public class Item - { + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } - [JsonProperty("beer")] - public Beer2 Beer { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public object Contact { get; set; } + } - [JsonProperty("brewery")] - public Brewery2 Brewery { get; set; } + public class Beer3 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("user")] - public User User { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("venue")] - public IList Venue { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Media - { + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - public class User2 - { + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("beer_style_id")] + public int BeerStyleId { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("url")] - public string Url { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + public class Contact3 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + public class Location3 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public object Contact { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Beer3 - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("bid")] - public int Bid { get; set; } + public class Brewery3 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact3 Contact { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("location")] + public Location3 Location { get; set; } - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("beer_style_id")] - public int BeerStyleId { get; set; } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + public class User3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("user_name")] + public string UserName { get; set; } - public class Contact3 - { + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class Location3 - { + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("user_link")] + public string UserLink { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class Item3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class Brewery3 - { + [JsonProperty("user")] + public User3 User { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("like_id")] + public int LikeId { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("like_owner")] + public bool LikeOwner { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact3 Contact { get; set; } + [JsonProperty("auth_toast")] + public bool AuthToast { get; set; } - [JsonProperty("location")] - public Location3 Location { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + public class Photo2 + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - public class Comments - { + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class Item4 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - public class User3 - { + [JsonProperty("photo")] + public Photo2 Photo { get; set; } + } - [JsonProperty("uid")] - public int Uid { get; set; } + public class Media2 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("first_name")] - public string FirstName { get; set; } + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("bio")] - public string Bio { get; set; } + public class BadgeImage + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("user_link")] - public string UserLink { get; set; } + public class Item5 + { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - public class Item3 - { + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("user")] - public User3 User { get; set; } + [JsonProperty("badge_image")] + public BadgeImage BadgeImage { get; set; } + } - [JsonProperty("like_id")] - public int LikeId { get; set; } + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("like_owner")] - public bool LikeOwner { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + public class Item2 + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - public class Toasts - { + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("auth_toast")] - public bool AuthToast { get; set; } + [JsonProperty("user")] + public User2 User { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer")] + public Beer3 Beer { get; set; } - public class Photo2 - { + [JsonProperty("brewery")] + public Brewery3 Brewery { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("venue")] + public object Venue { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("comments")] + public Comments Comments { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("media")] + public Media2 Media { get; set; } - public class Item4 - { + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - [JsonProperty("photo")] - public Photo2 Photo { get; set; } - } + public class Checkins + { + [JsonProperty("count")] + public int Count { get; set; } - public class Media2 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Beer4 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - public class Source - { + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("app_name")] - public string AppName { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - public class BadgeImage - { + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } + } - [JsonProperty("lg")] - public string Lg { get; set; } - } + public class Contact4 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - public class Item5 - { + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + public class Location4 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("badge_image")] - public BadgeImage BadgeImage { get; set; } - } + [JsonProperty("lng")] + public double Lng { get; set; } + } - public class Badges - { + public class Brewery4 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - public class Item2 - { + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact4 Contact { get; set; } - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } + [JsonProperty("location")] + public Location4 Location { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("user")] - public User2 User { get; set; } + public class Friends + { + [JsonProperty("items")] + public IList Items { get; set; } - [JsonProperty("beer")] - public Beer3 Beer { get; set; } + [JsonProperty("count")] + public int Count { get; set; } + } - [JsonProperty("brewery")] - public Brewery3 Brewery { get; set; } + public class Item6 + { + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("venue")] - public object Venue { get; set; } + [JsonProperty("beer")] + public Beer4 Beer { get; set; } - [JsonProperty("comments")] - public Comments Comments { get; set; } + [JsonProperty("brewery")] + public Brewery4 Brewery { get; set; } - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } + [JsonProperty("friends")] + public Friends Friends { get; set; } + } - [JsonProperty("media")] - public Media2 Media { get; set; } + public class Similar + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("source")] - public Source Source { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("badges")] - public Badges Badges { get; set; } - } + public class Friends2 + { + [JsonProperty("count")] + public int Count { get; set; } - public class Checkins - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Beer5 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Beer4 - { + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("is_vintage")] + public int IsVintage { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("is_variant")] + public int IsVariant { get; set; } + } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + public class Item7 + { + [JsonProperty("beer")] + public Beer5 Beer { get; set; } + } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + public class Vintages + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } - } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - public class Contact4 - { + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - public class Location4 - { + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("is_homebrew")] + public int IsHomebrew { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("rating_count")] + public int RatingCount { get; set; } - public class Brewery4 - { + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("stats")] + public Stats Stats { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact4 Contact { get; set; } + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } - [JsonProperty("location")] - public Location4 Location { get; set; } + [JsonProperty("similar")] + public Similar Similar { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("friends")] + public Friends2 Friends { get; set; } - public class Friends - { + [JsonProperty("vintages")] + public Vintages Vintages { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } + public class Response + { + [JsonProperty("beer")] + public Beer Beer { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } - } + public class BeerInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/beer/info{0}"; } } - public class Item6 - { + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("beer")] - public Beer4 Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery4 Brewery { get; set; } - - [JsonProperty("friends")] - public Friends Friends { get; set; } - } - - public class Similar - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Friends2 - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Beer5 - { - - [JsonProperty("bid")] - public int Bid { get; set; } - - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } - - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } - - [JsonProperty("beer_name")] - public string BeerName { get; set; } - - [JsonProperty("is_vintage")] - public int IsVintage { get; set; } - - [JsonProperty("is_variant")] - public int IsVariant { get; set; } - } - - public class Item7 - { - - [JsonProperty("beer")] - public Beer5 Beer { get; set; } - } - - public class Vintages - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Beer - { - - [JsonProperty("bid")] - public int Bid { get; set; } - - [JsonProperty("beer_name")] - public string BeerName { get; set; } - - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } - - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } - - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } - - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } - - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } - - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } - - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } - - [JsonProperty("is_homebrew")] - public int IsHomebrew { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("rating_count")] - public int RatingCount { get; set; } - - [JsonProperty("rating_score")] - public double RatingScore { get; set; } - - [JsonProperty("stats")] - public Stats Stats { get; set; } - - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } - - [JsonProperty("wish_list")] - public bool WishList { get; set; } - - [JsonProperty("media")] - public Media Media { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - - [JsonProperty("similar")] - public Similar Similar { get; set; } - - [JsonProperty("friends")] - public Friends2 Friends { get; set; } - - [JsonProperty("vintages")] - public Vintages Vintages { get; set; } - } - - public class Response - { - - [JsonProperty("beer")] - public Beer Beer { get; set; } - } - - public class BeerInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/beer/info{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/BeerSearch.cs b/src/Untappd.Net/Responses/BeerSearch.cs index 302283d..a67086f 100644 --- a/src/Untappd.Net/Responses/BeerSearch.cs +++ b/src/Untappd.Net/Responses/BeerSearch.cs @@ -4,270 +4,255 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.BeerSearch { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Notifications - { + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - public class Beer - { + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("in_production")] + public int InProduction { get; set; } + } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("in_production")] - public int InProduction { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Contact - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("twitter")] - public string Twitter { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - public class Location - { + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class Item + { + [JsonProperty("checkin_count")] + public int CheckinCount { get; set; } - public class Brewery - { + [JsonProperty("have_had")] + public bool HaveHad { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("your_count")] + public int YourCount { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } + } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + public class Beers + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("contact")] - public Contact Contact { get; set; } + public class Homebrew + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + public class Breweries + { + [JsonProperty("items")] + public IList Items { get; set; } - public class Item - { + [JsonProperty("count")] + public int Count { get; set; } + } - [JsonProperty("checkin_count")] - public int CheckinCount { get; set; } + public class Response + { + [JsonProperty("message")] + public string Message { get; set; } - [JsonProperty("have_had")] - public bool HaveHad { get; set; } + [JsonProperty("brewery_id")] + public bool BreweryId { get; set; } - [JsonProperty("your_count")] - public int YourCount { get; set; } + [JsonProperty("search_type")] + public string SearchType { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("type_id")] + public int TypeId { get; set; } - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - } + [JsonProperty("search_version")] + public int SearchVersion { get; set; } - public class Beers - { + [JsonProperty("found")] + public int Found { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("offset")] + public int Offset { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("limit")] + public int Limit { get; set; } - public class Homebrew - { + [JsonProperty("term")] + public string Term { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("parsed_term")] + public string ParsedTerm { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beers")] + public Beers Beers { get; set; } - public class Breweries - { + [JsonProperty("homebrew")] + public Homebrew Homebrew { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } + [JsonProperty("breweries")] + public Breweries Breweries { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } - } + public class BeerSearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/search/beer"; } } - public class Response - { + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("message")] - public string Message { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("brewery_id")] - public bool BreweryId { get; set; } - - [JsonProperty("search_type")] - public string SearchType { get; set; } - - [JsonProperty("type_id")] - public int TypeId { get; set; } - - [JsonProperty("search_version")] - public int SearchVersion { get; set; } - - [JsonProperty("found")] - public int Found { get; set; } - - [JsonProperty("offset")] - public int Offset { get; set; } - - [JsonProperty("limit")] - public int Limit { get; set; } - - [JsonProperty("term")] - public string Term { get; set; } - - [JsonProperty("parsed_term")] - public string ParsedTerm { get; set; } - - [JsonProperty("beers")] - public Beers Beers { get; set; } - - [JsonProperty("homebrew")] - public Homebrew Homebrew { get; set; } - - [JsonProperty("breweries")] - public Breweries Breweries { get; set; } - } - - public class BeerSearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/search/beer"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/BreweryInfo.cs b/src/Untappd.Net/Responses/BreweryInfo.cs index bedc3c1..b06947b 100644 --- a/src/Untappd.Net/Responses/BreweryInfo.cs +++ b/src/Untappd.Net/Responses/BreweryInfo.cs @@ -4,920 +4,874 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.BreweryInfo { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class ClaimedStatus + { + [JsonProperty("is_claimed")] + public bool IsClaimed { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("claimed_slug")] + public string ClaimedSlug { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("follow_status")] + public bool FollowStatus { get; set; } - public class Notifications - { + [JsonProperty("follower_count")] + public int FollowerCount { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("mute_status")] + public string MuteStatus { get; set; } + } - public class ClaimedStatus - { + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("is_claimed")] - public bool IsClaimed { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("claimed_slug")] - public string ClaimedSlug { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("follow_status")] - public bool FollowStatus { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("follower_count")] - public int FollowerCount { get; set; } + public class Location + { + [JsonProperty("brewery_address")] + public string BreweryAddress { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("mute_status")] - public string MuteStatus { get; set; } - } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - public class Contact - { + [JsonProperty("brewery_lat")] + public double BreweryLat { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("brewery_lng")] + public double BreweryLng { get; set; } + } - [JsonProperty("facebook")] - public string Facebook { get; set; } + public class Rating + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } + } - [JsonProperty("url")] - public string Url { get; set; } - } + public class Stats + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - public class Location - { + [JsonProperty("unique_count")] + public int UniqueCount { get; set; } - [JsonProperty("brewery_address")] - public string BreweryAddress { get; set; } + [JsonProperty("monthly_count")] + public int MonthlyCount { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("weekly_count")] + public int WeeklyCount { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("user_count")] + public int UserCount { get; set; } - [JsonProperty("brewery_lat")] - public double BreweryLat { get; set; } + [JsonProperty("age_on_service")] + public double AgeOnService { get; set; } + } - [JsonProperty("brewery_lng")] - public double BreweryLng { get; set; } - } + public class Owners + { + [JsonProperty("count")] + public int Count { get; set; } - public class Rating - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } - } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - public class Stats - { + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("unique_count")] - public int UniqueCount { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("monthly_count")] - public int MonthlyCount { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("weekly_count")] - public int WeeklyCount { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("user_count")] - public int UserCount { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("age_on_service")] - public double AgeOnService { get; set; } - } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - public class Owners - { + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class Contact2 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - public class Photo - { + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + public class Location2 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - public class Beer - { + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + public class Brewery2 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } - } + [JsonProperty("contact")] + public Contact2 Contact { get; set; } - public class Contact2 - { + [JsonProperty("location")] + public Location2 Location { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("facebook")] - public string Facebook { get; set; } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("first_name")] + public string FirstName { get; set; } - public class Location2 - { + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class Item + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - public class Brewery2 - { + [JsonProperty("photo")] + public Photo Photo { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("brewery")] + public Brewery2 Brewery { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("contact")] - public Contact2 Contact { get; set; } + [JsonProperty("venue")] + public object Venue { get; set; } + } - [JsonProperty("location")] - public Location2 Location { get; set; } + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class User - { + public class User2 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("url")] + public string Url { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } - } + [JsonProperty("bio")] + public string Bio { get; set; } - public class Item - { + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("contact")] + public object Contact { get; set; } + } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + public class Beer2 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("brewery")] - public Brewery2 Brewery { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("user")] - public User User { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("venue")] - public object Venue { get; set; } - } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - public class Media - { + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - public class User2 - { + public class Contact3 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("last_name")] - public string LastName { get; set; } + public class Location3 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("url")] - public string Url { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("bio")] - public string Bio { get; set; } + public class Brewery3 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("contact")] - public object Contact { get; set; } - } + [JsonProperty("country_name")] + public string CountryName { get; set; } - public class Beer2 - { + [JsonProperty("contact")] + public Contact3 Contact { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("location")] + public Location3 Location { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + public class User3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("first_name")] + public string FirstName { get; set; } - public class Contact3 - { + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("user_link")] + public string UserLink { get; set; } - public class Location3 - { + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + public class Item3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("user")] + public User3 User { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("like_id")] + public int LikeId { get; set; } - public class Brewery3 - { + [JsonProperty("like_owner")] + public bool LikeOwner { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("auth_toast")] + public bool AuthToast { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("contact")] - public Contact3 Contact { get; set; } + public class Photo2 + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("location")] - public Location3 Location { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - public class Comments - { + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + public class Item4 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("photo")] + public Photo2 Photo { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class Media2 + { + [JsonProperty("count")] + public int Count { get; set; } - public class User3 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("uid")] - public int Uid { get; set; } + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("first_name")] - public string FirstName { get; set; } + public class BadgeImage + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class Item5 + { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("user_link")] - public string UserLink { get; set; } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - public class Item3 - { + [JsonProperty("badge_image")] + public BadgeImage BadgeImage { get; set; } + } - [JsonProperty("uid")] - public int Uid { get; set; } + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("user")] - public User3 User { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("like_id")] - public int LikeId { get; set; } + public class Item2 + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("like_owner")] - public bool LikeOwner { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - public class Toasts - { + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("user")] + public User2 User { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("beer")] + public Beer2 Beer { get; set; } - [JsonProperty("auth_toast")] - public bool AuthToast { get; set; } + [JsonProperty("brewery")] + public Brewery3 Brewery { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("venue")] + public object Venue { get; set; } - public class Photo2 - { + [JsonProperty("comments")] + public Comments Comments { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("media")] + public Media2 Media { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - public class Item4 - { + public class Checkins + { + [JsonProperty("mem")] + public bool Mem { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("photo")] - public Photo2 Photo { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Media2 - { + public class Beer3 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Source - { + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("app_name")] - public string AppName { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - public class BadgeImage - { + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - public class Item5 - { + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + [JsonProperty("rating_count")] + public int RatingCount { get; set; } + } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + public class Contact4 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("badge_image")] - public BadgeImage BadgeImage { get; set; } - } + [JsonProperty("instagram")] + public string Instagram { get; set; } - public class Badges - { + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Location4 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - public class Item2 - { + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + public class Brewery4 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("user")] - public User2 User { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer")] - public Beer2 Beer { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("brewery")] - public Brewery3 Brewery { get; set; } + [JsonProperty("contact")] + public Contact4 Contact { get; set; } - [JsonProperty("venue")] - public object Venue { get; set; } + [JsonProperty("location")] + public Location4 Location { get; set; } - [JsonProperty("comments")] - public Comments Comments { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } + public class Item6 + { + [JsonProperty("has_had")] + public bool HasHad { get; set; } - [JsonProperty("media")] - public Media2 Media { get; set; } + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("source")] - public Source Source { get; set; } + [JsonProperty("beer")] + public Beer3 Beer { get; set; } - [JsonProperty("badges")] - public Badges Badges { get; set; } - } + [JsonProperty("brewery")] + public Brewery4 Brewery { get; set; } - public class Checkins - { + [JsonProperty("friends")] + public IList Friends { get; set; } + } - [JsonProperty("mem")] - public bool Mem { get; set; } + public class BeerList + { + [JsonProperty("is_super")] + public bool IsSuper { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("sort")] + public string Sort { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("filter")] + public string Filter { get; set; } - public class Beer3 - { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("beer_count")] + public int BeerCount { get; set; } + } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("brewery_in_production")] + public int BreweryInProduction { get; set; } - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } + [JsonProperty("is_independent")] + public int IsIndependent { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("claimed_status")] + public ClaimedStatus ClaimedStatus { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("beer_count")] + public int BeerCount { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("brewery_type")] + public string BreweryType { get; set; } - [JsonProperty("rating_count")] - public int RatingCount { get; set; } - } + [JsonProperty("brewery_type_id")] + public int BreweryTypeId { get; set; } - public class Contact4 - { + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("rating")] + public Rating Rating { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_description")] + public string BreweryDescription { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("stats")] + public Stats Stats { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("owners")] + public Owners Owners { get; set; } - public class Location4 - { + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("beer_list")] + public BeerList BeerList { get; set; } + } - [JsonProperty("lat")] - public double Lat { get; set; } + public class Response + { + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class BreweryInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/brewery/info{0}"; } } - public class Brewery4 - { + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } - - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } - - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } - - [JsonProperty("country_name")] - public string CountryName { get; set; } - - [JsonProperty("contact")] - public Contact4 Contact { get; set; } - - [JsonProperty("location")] - public Location4 Location { get; set; } - - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } - - public class Item6 - { - - [JsonProperty("has_had")] - public bool HasHad { get; set; } - - [JsonProperty("total_count")] - public int TotalCount { get; set; } - - [JsonProperty("beer")] - public Beer3 Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery4 Brewery { get; set; } - - [JsonProperty("friends")] - public IList Friends { get; set; } - } - - public class BeerList - { - - [JsonProperty("is_super")] - public bool IsSuper { get; set; } - - [JsonProperty("sort")] - public string Sort { get; set; } - - [JsonProperty("filter")] - public string Filter { get; set; } - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - - [JsonProperty("beer_count")] - public int BeerCount { get; set; } - } - - public class Brewery - { - - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } - - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } - - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } - - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } - - [JsonProperty("country_name")] - public string CountryName { get; set; } - - [JsonProperty("brewery_in_production")] - public int BreweryInProduction { get; set; } - - [JsonProperty("is_independent")] - public int IsIndependent { get; set; } - - [JsonProperty("claimed_status")] - public ClaimedStatus ClaimedStatus { get; set; } - - [JsonProperty("beer_count")] - public int BeerCount { get; set; } - - [JsonProperty("contact")] - public Contact Contact { get; set; } - - [JsonProperty("brewery_type")] - public string BreweryType { get; set; } - - [JsonProperty("brewery_type_id")] - public int BreweryTypeId { get; set; } - - [JsonProperty("location")] - public Location Location { get; set; } - - [JsonProperty("rating")] - public Rating Rating { get; set; } - - [JsonProperty("brewery_description")] - public string BreweryDescription { get; set; } - - [JsonProperty("stats")] - public Stats Stats { get; set; } - - [JsonProperty("owners")] - public Owners Owners { get; set; } - - [JsonProperty("media")] - public Media Media { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - - [JsonProperty("beer_list")] - public BeerList BeerList { get; set; } - } - - public class Response - { - - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - } - - public class BreweryInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/brewery/info{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/BrewerySearch.cs b/src/Untappd.Net/Responses/BrewerySearch.cs index 0b3f615..0f9dfbf 100644 --- a/src/Untappd.Net/Responses/BrewerySearch.cs +++ b/src/Untappd.Net/Responses/BrewerySearch.cs @@ -4,158 +4,147 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.BrewerySearch { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("lat")] + public int Lat { get; set; } - public class Notifications - { + [JsonProperty("lng")] + public int Lng { get; set; } + } - [JsonProperty("type")] - public string Type { get; set; } + public class Brewery2 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("beer_count")] + public int BeerCount { get; set; } - public class Location - { + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("lat")] - public int Lat { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } + } - [JsonProperty("lng")] - public int Lng { get; set; } - } + public class Item + { + [JsonProperty("brewery")] + public Brewery2 Brewery { get; set; } + } - public class Brewery2 - { + public class Brewery + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("beer_count")] - public int BeerCount { get; set; } + public class Response + { + [JsonProperty("search_type")] + public string SearchType { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("sort")] + public string Sort { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("term")] + public string Term { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("key")] + public string Key { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } - } + [JsonProperty("found")] + public int Found { get; set; } - public class Item - { + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } + } - [JsonProperty("brewery")] - public Brewery2 Brewery { get; set; } - } + public class BrewerySearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/search/brewery"; } } - public class Brewery - { + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Response - { - - [JsonProperty("search_type")] - public string SearchType { get; set; } - - [JsonProperty("sort")] - public string Sort { get; set; } - - [JsonProperty("term")] - public string Term { get; set; } - - [JsonProperty("key")] - public string Key { get; set; } - - [JsonProperty("found")] - public int Found { get; set; } - - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - } - - public class BrewerySearch : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/search/brewery"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } -} + [JsonProperty("response")] + public Response Response { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Feeds/ActivityFeed.cs b/src/Untappd.Net/Responses/Feeds/ActivityFeed.cs index e52cea6..4e03a74 100644 --- a/src/Untappd.Net/Responses/Feeds/ActivityFeed.cs +++ b/src/Untappd.Net/Responses/Feeds/ActivityFeed.cs @@ -4,523 +4,496 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Feeds.ActivityFeed { - public class ResponseTime - { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("measure")] - public string Measure { get; set; } - } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class InitTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - public class Meta - { + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - [JsonProperty("code")] - public int Code { get; set; } + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("friends")] + public int Friends { get; set; } - public class UnreadCount - { + [JsonProperty("messages")] + public int Messages { get; set; } - [JsonProperty("comments")] - public int Comments { get; set; } + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("toasts")] - public int Toasts { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("friends")] - public int Friends { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("messages")] - public int Messages { get; set; } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("user_name")] + public string UserName { get; set; } - public class Notifications - { + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class User - { + [JsonProperty("url")] + public string Url { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("url")] - public string Url { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } - } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - public class Beer - { + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Contact - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("twitter")] - public string Twitter { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - public class Location - { + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class User2 + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class Brewery - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("contact")] - public Contact Contact { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("user_link")] + public string UserLink { get; set; } - public class User2 - { + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class Item2 + { + [JsonProperty("user")] + public User2 User { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("comment_id")] + public int CommentId { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("comment_owner")] + public bool CommentOwner { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("comment_editor")] + public bool CommentEditor { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("comment")] + public string Comment { get; set; } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("comment_source")] + public string CommentSource { get; set; } + } - [JsonProperty("user_link")] - public string UserLink { get; set; } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Item2 - { + public class User3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("user")] - public User2 User { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("comment_id")] - public int CommentId { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("comment_owner")] - public bool CommentOwner { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("comment_editor")] - public bool CommentEditor { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("comment")] - public string Comment { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("user_link")] + public string UserLink { get; set; } - [JsonProperty("comment_source")] - public string CommentSource { get; set; } - } + [JsonProperty("account_type")] + public string AccountType { get; set; } - public class Comments - { + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + public class Item3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("user")] + public User3 User { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("like_id")] + public int LikeId { get; set; } - public class User3 - { + [JsonProperty("like_owner")] + public bool LikeOwner { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("auth_toast", NullValueHandling = NullValueHandling.Ignore)] + public bool AuthToast { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("user_link")] - public string UserLink { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + public class Item4 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - public class Item3 - { + [JsonProperty("photo")] + public Photo Photo { get; set; } + } - [JsonProperty("uid")] - public int Uid { get; set; } + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("user")] - public User3 User { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("like_id")] - public int LikeId { get; set; } + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("like_owner")] - public bool LikeOwner { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + public class BadgeImage + { + [JsonProperty("sm")] + public string Sm { get; set; } - public class Toasts - { + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Item5 + { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("auth_toast", NullValueHandling = NullValueHandling.Ignore)] - public bool AuthToast { get; set; } + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - public class Photo - { + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("badge_image")] + public BadgeImage BadgeImage { get; set; } + } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Item4 - { + public class Item + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } - } + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - public class Media - { + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer")] + public Beer Beer { get; set; } - public class Source - { + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } - [JsonProperty("app_name")] - public string AppName { get; set; } + [JsonProperty("venue")] + public object Venue { get; set; } - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } + [JsonProperty("comments")] + public Comments Comments { get; set; } - public class BadgeImage - { + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - public class Item5 - { + public class Checkins + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + public class Pagination + { + [JsonProperty("next_url")] + public string NextUrl { get; set; } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + [JsonProperty("max_id")] + public int MaxId { get; set; } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + [JsonProperty("since_url")] + public string SinceUrl { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + public class Response + { + [JsonProperty("mg")] + public bool Mg { get; set; } - [JsonProperty("badge_image")] - public BadgeImage BadgeImage { get; set; } - } + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } - public class Badges - { + [JsonProperty("pagination")] + public Pagination Pagination { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class ActivityFeed : BasicRequest, IAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "/v4/checkin/recent"; } } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("meta")] + public Meta Meta { get; set; } - public class Item - { + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } - - [JsonProperty("rating_score")] - public double RatingScore { get; set; } - - [JsonProperty("user")] - public User User { get; set; } - - [JsonProperty("beer")] - public Beer Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - - [JsonProperty("venue")] - public object Venue { get; set; } - - [JsonProperty("comments")] - public Comments Comments { get; set; } - - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } - - [JsonProperty("media")] - public Media Media { get; set; } - - [JsonProperty("source")] - public Source Source { get; set; } - - [JsonProperty("badges")] - public Badges Badges { get; set; } - } - - public class Checkins - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Pagination - { - - [JsonProperty("next_url")] - public string NextUrl { get; set; } - - [JsonProperty("max_id")] - public int MaxId { get; set; } - - [JsonProperty("since_url")] - public string SinceUrl { get; set; } - } - - public class Response - { - - [JsonProperty("mg")] - public bool Mg { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - - [JsonProperty("pagination")] - public Pagination Pagination { get; set; } - } - - public class ActivityFeed : BasicRequest, IAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "/v4/checkin/recent"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } -} + [JsonProperty("response")] + public Response Response { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/Feeds/UserActivityFeed.cs b/src/Untappd.Net/Responses/Feeds/UserActivityFeed.cs index c38a6ac..bfaecbd 100644 --- a/src/Untappd.Net/Responses/Feeds/UserActivityFeed.cs +++ b/src/Untappd.Net/Responses/Feeds/UserActivityFeed.cs @@ -4,490 +4,461 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.Feeds.UserActivityFeed { - public class ResponseTime - { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("measure")] - public string Measure { get; set; } - } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class InitTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - public class Meta - { + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - [JsonProperty("code")] - public int Code { get; set; } + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("friends")] + public int Friends { get; set; } - public class UnreadCount - { + [JsonProperty("messages")] + public int Messages { get; set; } - [JsonProperty("comments")] - public int Comments { get; set; } + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("toasts")] - public int Toasts { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("friends")] - public int Friends { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("messages")] - public int Messages { get; set; } + public class Pagination + { + [JsonProperty("since_url")] + public string SinceUrl { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("next_url")] + public string NextUrl { get; set; } - public class Notifications - { + [JsonProperty("max_id")] + public int MaxId { get; set; } + } - [JsonProperty("type")] - public string Type { get; set; } + public class Contact + { + [JsonProperty("facebook")] + public string Facebook { get; set; } + } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class Pagination - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("since_url")] - public string SinceUrl { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("next_url")] - public string NextUrl { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("max_id")] - public int MaxId { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class Contact - { + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } - } + [JsonProperty("url")] + public string Url { get; set; } - public class User - { + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("url")] - public string Url { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("contact")] - public Contact Contact { get; set; } - } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - public class Beer - { + public class Contact2 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - public class Contact2 - { + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("contact")] + public Contact2 Contact { get; set; } - public class Location - { + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + public class Item2 + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - public class Brewery - { + public class Categories + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + public class Location2 + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("contact")] - public Contact2 Contact { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + public class Contact3 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - public class Item2 - { + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + public class Foursquare + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + public class VenueIcon + { + [JsonProperty("sm")] + public string Sm { get; set; } - public class Categories - { + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class Venue + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - public class Location2 - { + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + [JsonProperty("parent_category_id")] + public string ParentCategoryId { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("categories")] + public Categories Categories { get; set; } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + [JsonProperty("location")] + public Location2 Location { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("contact")] + public Contact3 Contact { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - public class Contact3 - { + [JsonProperty("foursquare")] + public Foursquare Foursquare { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon VenueIcon { get; set; } + } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - public class Foursquare - { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - public class VenueIcon - { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("auth_toast", NullValueHandling = NullValueHandling.Ignore)] + public bool AuthToast { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("lg")] - public string Lg { get; set; } - } + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - public class Venue - { + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("venue_id")] - public int VenueId { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("venue_name")] - public string VenueName { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } + public class Item3 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("parent_category_id")] - public string ParentCategoryId { get; set; } + [JsonProperty("photo")] + public Photo Photo { get; set; } + } - [JsonProperty("categories")] - public Categories Categories { get; set; } + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("location")] - public Location2 Location { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("contact")] - public Contact3 Contact { get; set; } + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("foursquare")] - public Foursquare Foursquare { get; set; } + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("venue_icon")] - public VenueIcon VenueIcon { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Comments - { + public class Item + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - public class Toasts - { + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } - [JsonProperty("auth_toast", NullValueHandling = NullValueHandling.Ignore)] - public bool AuthToast { get; set; } + [JsonProperty("venue")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Venue Venue { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("comments")] + public Comments Comments { get; set; } - public class Photo - { + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + public class Checkins + { + [JsonProperty("count")] + public int Count { get; set; } - public class Item3 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + public class Response + { + [JsonProperty("pagination")] + public Pagination Pagination { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } - } + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } + } - public class Media - { + public class UserActivityFeed : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/user/checkins{0}"; } } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - public class Source - { - - [JsonProperty("app_name")] - public string AppName { get; set; } - - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } - - public class Badges - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Item - { - - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } - - [JsonProperty("rating_score")] - public double RatingScore { get; set; } - - [JsonProperty("user")] - public User User { get; set; } - - [JsonProperty("beer")] - public Beer Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - - [JsonProperty("venue")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Venue Venue { get; set; } - - [JsonProperty("comments")] - public Comments Comments { get; set; } - - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } - - [JsonProperty("media")] - public Media Media { get; set; } - - [JsonProperty("source")] - public Source Source { get; set; } - - [JsonProperty("badges")] - public Badges Badges { get; set; } - } - - public class Checkins - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Response - { - - [JsonProperty("pagination")] - public Pagination Pagination { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - } - - public class UserActivityFeed : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/user/checkins{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } -} + [JsonProperty("response")] + public Response Response { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/UserBadges.cs b/src/Untappd.Net/Responses/UserBadges.cs index ab2c34f..32f3692 100644 --- a/src/Untappd.Net/Responses/UserBadges.cs +++ b/src/Untappd.Net/Responses/UserBadges.cs @@ -4,225 +4,215 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.UserBadges { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Media + { + [JsonProperty("badge_image_sm")] + public string BadgeImageSm { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("badge_image_md")] + public string BadgeImageMd { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("badge_image_lg")] + public string BadgeImageLg { get; set; } + } - public class Notifications - { + public class BadgePackProgress + { + [JsonProperty("completed")] + public int Completed { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("total")] + public int Total { get; set; } + } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + public class BadgeLevel + { + [JsonProperty("actual_badge_id")] + public int ActualBadgeId { get; set; } - public class Media - { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("badge_image_sm")] - public string BadgeImageSm { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("badge_image_md")] - public string BadgeImageMd { get; set; } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - [JsonProperty("badge_image_lg")] - public string BadgeImageLg { get; set; } - } + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - public class BadgePackProgress - { + [JsonProperty("badge_hint")] + public string BadgeHint { get; set; } - [JsonProperty("completed")] - public int Completed { get; set; } + [JsonProperty("badge_active_status")] + public int BadgeActiveStatus { get; set; } - [JsonProperty("total")] - public int Total { get; set; } - } + [JsonProperty("media")] + public Media Media { get; set; } - public class BadgeLevel - { - [JsonProperty("actual_badge_id")] - public int ActualBadgeId { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + public class Levels + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + public class Item + { + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("badge_hint")] - public string BadgeHint { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("badge_active_status")] - public int BadgeActiveStatus { get; set; } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - [JsonProperty("media")] - public Media Media { get; set; } + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + [JsonProperty("badge_hint")] + public string BadgeHint { get; set; } - public class Levels - { - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("badge_active_status")] + public int BadgeActiveStatus { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("media")] + public Media Media { get; set; } - public class Item - { + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + [JsonProperty("is_level")] + public bool IsLevel { get; set; } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + [JsonProperty("badge_type")] + public string BadgeType { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("has_badge")] + public bool HasBadge { get; set; } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + [JsonProperty("category_id")] + public int CategoryId { get; set; } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + /// + /// Issue with bad json responses + /// levels might come as object levels : { ... } + /// or an empty array levels : [] + /// + [JsonProperty(PropertyName = "levels")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Levels Levels { get; set; } - [JsonProperty("badge_hint")] - public string BadgeHint { get; set; } + [JsonProperty("badge_pack")] + public bool BadgePack { get; set; } - [JsonProperty("badge_active_status")] - public int BadgeActiveStatus { get; set; } + [JsonProperty("badge_pack_name")] + public bool BadgePackName { get; set; } - [JsonProperty("media")] - public Media Media { get; set; } + [JsonProperty("badge_pack_progress")] + public BadgePackProgress BadgePackProgress { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + public class Response + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("is_level")] - public bool IsLevel { get; set; } + [JsonProperty("sort")] + public string Sort { get; set; } - [JsonProperty("badge_type")] - public string BadgeType { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("has_badge")] - public bool HasBadge { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("category_id")] - public int CategoryId { get; set; } + /// + /// jsonutils.com fails to parse Untappd response for this requests + /// It fails getting the badge levels. + /// added manually. + /// + public class UserBadges : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/user/badges{0}"; } } - /// - /// Issue with bad json responses - /// levels might come as object levels : { ... } - /// or an empty array levels : [] - /// - [JsonProperty(PropertyName = "levels")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Levels Levels { get; set; } + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("badge_pack")] - public bool BadgePack { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("badge_pack_name")] - public bool BadgePackName { get; set; } - - [JsonProperty("badge_pack_progress")] - public BadgePackProgress BadgePackProgress { get; set; } - } - - public class Response - { - - [JsonProperty("type")] - public string Type { get; set; } - - [JsonProperty("sort")] - public string Sort { get; set; } - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - /// - /// jsonutils.com fails to parse Untappd response for this requests - /// It fails getting the badge levels. - /// added manually. - /// - public class UserBadges : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/user/badges{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/UserDistinctBeer.cs b/src/Untappd.Net/Responses/UserDistinctBeer.cs index 8fca5b3..f461715 100644 --- a/src/Untappd.Net/Responses/UserDistinctBeer.cs +++ b/src/Untappd.Net/Responses/UserDistinctBeer.cs @@ -4,238 +4,231 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.UserDistinctBeer { + public sealed class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public sealed class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - public class Beer - { + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("rating_count")] + public int RatingCount { get; set; } + } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("rating_count")] - public int RatingCount { get; set; } - } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - public class Contact - { + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("instagram")] - public string Instagram { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - public class Location - { + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("location")] + public Location Location { get; set; } - public class Brewery - { + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + public class Item + { + [JsonProperty("first_checkin_id")] + public int FirstCheckinId { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("first_created_at")] + public string FirstCreatedAt { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("recent_checkin_id")] + public int RecentCheckinId { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("recent_created_at")] + public string RecentCreatedAt { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("recent_created_at_timezone")] + public string RecentCreatedAtTimezone { get; set; } - [JsonProperty("contact")] - public Contact Contact { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("first_had")] + public string FirstHad { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("count")] + public int Count { get; set; } - public class Item - { + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("first_checkin_id")] - public int FirstCheckinId { get; set; } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } + } - [JsonProperty("first_created_at")] - public string FirstCreatedAt { get; set; } + public class Beers + { + [JsonProperty("sort")] + public string Sort { get; set; } - [JsonProperty("recent_checkin_id")] - public int RecentCheckinId { get; set; } + [JsonProperty("sort_english")] + public string SortEnglish { get; set; } - [JsonProperty("recent_created_at")] - public string RecentCreatedAt { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("recent_created_at_timezone")] - public string RecentCreatedAtTimezone { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("first_had")] - public string FirstHad { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("messages")] + public int Messages { get; set; } - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - } + [JsonProperty("news")] + public int news { get; set; } + } - public class Beers - { + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("sort")] - public string Sort { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("sort_english")] - public string SortEnglish { get; set; } + public class Response + { + [JsonProperty("is_search")] + public bool IsSearch { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("beers")] + public Beers Beers { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class UserDistinctBeers : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/user/beers{0}"; } } - public class UnreadCount - { - [JsonProperty("comments")] - public int Comments { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } - [JsonProperty("friends")] - public int Friends { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } - [JsonProperty("news")] - public int news { get; set; } - } + [JsonProperty("meta")] + public Meta Meta { get; set; } - public class Notifications - { - [JsonProperty("type")] - public string Type { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - public class Response - { - - [JsonProperty("is_search")] - public bool IsSearch { get; set; } - - [JsonProperty("beers")] - public Beers Beers { get; set; } - } - - public class UserDistinctBeers : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/user/beers{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } - -} + [JsonProperty("response")] + public Response Response { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/UserFriends.cs b/src/Untappd.Net/Responses/UserFriends.cs index 1f55ff0..2026480 100644 --- a/src/Untappd.Net/Responses/UserFriends.cs +++ b/src/Untappd.Net/Responses/UserFriends.cs @@ -4,148 +4,138 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.UserFriends { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class Notifications - { + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("first_name")] + public string FirstName { get; set; } - public class User - { + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class MutualFriends + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + public class Item + { + [JsonProperty("friendship_hash")] + public string FriendshipHash { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("mutual_friends")] + public MutualFriends MutualFriends { get; set; } + } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } - } + public class Response + { + [JsonProperty("count")] + public int Count { get; set; } - public class MutualFriends - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class UserFriends : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/user/friends{0}"; } } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("meta")] + public Meta Meta { get; set; } - public class Item - { + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("friendship_hash")] - public string FriendshipHash { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("user")] - public User User { get; set; } - - [JsonProperty("mutual_friends")] - public MutualFriends MutualFriends { get; set; } - } - - public class Response - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class UserFriends : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/user/friends{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } -} + [JsonProperty("response")] + public Response Response { get; set; } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/Responses/UserInfo.cs b/src/Untappd.Net/Responses/UserInfo.cs index cbe358b..7eaf290 100644 --- a/src/Untappd.Net/Responses/UserInfo.cs +++ b/src/Untappd.Net/Responses/UserInfo.cs @@ -4,1117 +4,1056 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.UserInfo { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Stats + { + [JsonProperty("total_badges")] + public int TotalBadges { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("total_friends")] + public int TotalFriends { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("total_checkins")] + public int TotalCheckins { get; set; } - public class Notifications - { + [JsonProperty("total_beers")] + public int TotalBeers { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("total_created_beers")] + public int TotalCreatedBeers { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("total_followings")] + public int TotalFollowings { get; set; } - public class Stats - { + [JsonProperty("total_photos")] + public int TotalPhotos { get; set; } + } - [JsonProperty("total_badges")] - public int TotalBadges { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("total_friends")] - public int TotalFriends { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("total_checkins")] - public int TotalCheckins { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("total_beers")] - public int TotalBeers { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("total_created_beers")] - public int TotalCreatedBeers { get; set; } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("total_followings")] - public int TotalFollowings { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("total_photos")] - public int TotalPhotos { get; set; } - } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - public class Beer - { + [JsonProperty("wish_list")] + public bool WishList { get; set; } + } - [JsonProperty("bid")] - public int Bid { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } - } + [JsonProperty("lng")] + public double Lng { get; set; } + } - public class Contact - { + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("country_name")] + public string CountryName { get; set; } - public class Location - { + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("lat")] - public double Lat { get; set; } + public class Item + { + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } + } - public class Brewery - { + public class RecentBrews + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + public class Contact2 + { + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("twitter")] + public string Twitter { get; set; } + } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + public class User2 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("contact")] - public Contact Contact { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class Item - { + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("url")] + public string Url { get; set; } - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - } + [JsonProperty("bio")] + public string Bio { get; set; } - public class RecentBrews - { + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } - public class Contact2 - { + [JsonProperty("contact")] + public Contact2 Contact { get; set; } + } - [JsonProperty("facebook")] - public string Facebook { get; set; } + public class Beer2 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } - } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - public class User2 - { + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + public class Contact3 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("url")] - public string Url { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + public class Location2 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("contact")] - public Contact2 Contact { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Beer2 - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("bid")] - public int Bid { get; set; } + public class Brewery2 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("contact")] + public Contact3 Contact { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("location")] + public Location2 Location { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - public class Contact3 - { + public class Item3 + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - [JsonProperty("instagram")] - public string Instagram { get; set; } + public class Categories + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Location2 - { + public class Location3 + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Brewery2 - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + public class Contact4 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + public class Foursquare + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - [JsonProperty("country_name")] - public string CountryName { get; set; } + public class VenueIcon + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("contact")] - public Contact3 Contact { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("location")] - public Location2 Location { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + public class Venue + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - public class Item3 - { + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("parent_category_id")] + public string ParentCategoryId { get; set; } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + [JsonProperty("categories")] + public Categories Categories { get; set; } - public class Categories - { + [JsonProperty("location")] + public Location3 Location { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("contact")] + public Contact4 Contact { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - public class Location3 - { + [JsonProperty("foursquare")] + public Foursquare Foursquare { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon VenueIcon { get; set; } + } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("lat")] - public double Lat { get; set; } + public class User3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("user_name")] + public string UserName { get; set; } - public class Contact4 - { + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + [JsonProperty("bio")] + public string Bio { get; set; } - public class Foursquare - { + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + [JsonProperty("user_link")] + public string UserLink { get; set; } - public class VenueIcon - { + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("md")] - public string Md { get; set; } + public class Item4 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("user")] + public User3 User { get; set; } - public class Venue - { + [JsonProperty("like_id")] + public int LikeId { get; set; } - [JsonProperty("venue_id")] - public int VenueId { get; set; } + [JsonProperty("like_owner")] + public bool LikeOwner { get; set; } - [JsonProperty("venue_name")] - public string VenueName { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("parent_category_id")] - public string ParentCategoryId { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("categories")] - public Categories Categories { get; set; } + [JsonProperty("auth_toast")] + public bool AuthToast { get; set; } - [JsonProperty("location")] - public Location3 Location { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("contact")] - public Contact4 Contact { get; set; } + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("foursquare")] - public Foursquare Foursquare { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("venue_icon")] - public VenueIcon VenueIcon { get; set; } - } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - public class Comments - { + public class Item5 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("photo")] + public Photo Photo { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class User3 - { + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class BadgeImage + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("bio")] - public string Bio { get; set; } + public class Item6 + { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - [JsonProperty("user_link")] - public string UserLink { get; set; } + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + [JsonProperty("badge_image")] + public BadgeImage BadgeImage { get; set; } + } - public class Item4 - { + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("user")] - public User3 User { get; set; } + public class Item2 + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("like_id")] - public int LikeId { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("like_owner")] - public bool LikeOwner { get; set; } + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - public class Toasts - { + [JsonProperty("user")] + public User2 User { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("beer")] + public Beer2 Beer { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery")] + public Brewery2 Brewery { get; set; } - [JsonProperty("auth_toast")] - public bool AuthToast { get; set; } + [JsonProperty("venue")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Venue Venue { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("comments")] + public Comments Comments { get; set; } - public class Photo - { + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + public class Checkins + { + [JsonProperty("count")] + public int Count { get; set; } - public class Item5 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + public class Photo2 + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } - } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - public class Media - { + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class User4 + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class Source - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("app_name")] - public string AppName { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } + [JsonProperty("bio")] + public string Bio { get; set; } - public class BadgeImage - { + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("account_type")] + public string AccountType { get; set; } - public class Item6 - { + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + public class Beer3 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("badge_image")] - public BadgeImage BadgeImage { get; set; } - } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - public class Badges - { + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } + } - [JsonProperty("items")] - public IList Items { get; set; } - } + public class Contact5 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - public class Item2 - { + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } + public class Location4 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("user")] - public User2 User { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("beer")] - public Beer2 Beer { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("brewery")] - public Brewery2 Brewery { get; set; } + public class Brewery3 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("venue")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Venue Venue { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("comments")] - public Comments Comments { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("media")] - public Media Media { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("source")] - public Source Source { get; set; } + [JsonProperty("contact")] + public Contact5 Contact { get; set; } - [JsonProperty("badges")] - public Badges Badges { get; set; } - } + [JsonProperty("location")] + public Location4 Location { get; set; } - public class Checkins - { + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class Item8 + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - public class Photo2 - { + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + public class Categories2 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + public class Location5 + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - public class User4 - { + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("bio")] - public string Bio { get; set; } + public class Contact6 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("last_name")] - public string LastName { get; set; } + public class Foursquare2 + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - [JsonProperty("account_type")] - public string AccountType { get; set; } + public class VenueIcon2 + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("md")] + public string Md { get; set; } - public class Beer3 - { + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("bid")] - public int Bid { get; set; } + public class Venue2 + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("parent_category_id")] + public string ParentCategoryId { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("categories")] + public Categories2 Categories { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("location")] + public Location5 Location { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("contact")] + public Contact6 Contact { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } - } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - public class Contact5 - { + [JsonProperty("foursquare")] + public Foursquare2 Foursquare { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon2 VenueIcon { get; set; } + } - [JsonProperty("facebook")] - public string Facebook { get; set; } + public class Item7 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("photo")] + public Photo2 Photo { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - public class Location4 - { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("user")] + public User4 User { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("beer")] + public Beer3 Beer { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("brewery")] + public Brewery3 Brewery { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("venue")] + public Venue2 Venue { get; set; } + } - public class Brewery3 - { + public class Media2 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + public class Contact7 + { + [JsonProperty("facebook")] + public int Facebook { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("twitter")] + public string Twitter { get; set; } + } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + public class Badge + { + [JsonProperty("badges_to_facebook")] + public int BadgesToFacebook { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("badges_to_twitter")] + public int BadgesToTwitter { get; set; } + } - [JsonProperty("contact")] - public Contact5 Contact { get; set; } + public class Checkin + { + [JsonProperty("checkin_to_facebook")] + public int CheckinToFacebook { get; set; } - [JsonProperty("location")] - public Location4 Location { get; set; } + [JsonProperty("checkin_to_twitter")] + public int CheckinToTwitter { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("checkin_to_foursquare")] + public int CheckinToFoursquare { get; set; } + } - public class Item8 - { + public class Navigation + { + [JsonProperty("default_to_checkin")] + public int DefaultToCheckin { get; set; } + } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + public class Settings + { + [JsonProperty("badge")] + public Badge Badge { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("checkin")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkin Checkin { get; set; } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + [JsonProperty("navigation")] + public Navigation Navigation { get; set; } - public class Categories2 - { + [JsonProperty("email_address")] + public string EmailAddress { get; set; } + } - [JsonProperty("count")] - public int Count { get; set; } + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("id")] + public int Id { get; set; } - public class Location5 - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + [JsonProperty("user_avatar_hd")] + public string UserAvatarHd { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("user_cover_photo")] + public string UserCoverPhoto { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("user_cover_photo_offset")] + public int UserCoverPhotoOffset { get; set; } - public class Contact6 - { + [JsonProperty("is_private")] + public int IsPrivate { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + [JsonProperty("url")] + public string Url { get; set; } - public class Foursquare2 - { + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + [JsonProperty("relationship")] + public string Relationship { get; set; } - public class VenueIcon2 - { + [JsonProperty("untappd_url")] + public string UntappdUrl { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("stats")] + public Stats Stats { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("recent_brews")] + public RecentBrews RecentBrews { get; set; } - public class Venue2 - { + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } - [JsonProperty("venue_id")] - public int VenueId { get; set; } + [JsonProperty("media")] + public Media2 Media { get; set; } - [JsonProperty("venue_name")] - public string VenueName { get; set; } + [JsonProperty("contact")] + public Contact7 Contact { get; set; } - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } + [JsonProperty("date_joined")] + public string DateJoined { get; set; } - [JsonProperty("parent_category_id")] - public string ParentCategoryId { get; set; } + [JsonProperty("settings")] + public Settings Settings { get; set; } + } - [JsonProperty("categories")] - public Categories2 Categories { get; set; } + public class Response + { + [JsonProperty("user")] + public User User { get; set; } + } - [JsonProperty("location")] - public Location5 Location { get; set; } + public class UserInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/user/info{0}"; } } - [JsonProperty("contact")] - public Contact6 Contact { get; set; } + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("foursquare")] - public Foursquare2 Foursquare { get; set; } - - [JsonProperty("venue_icon")] - public VenueIcon2 VenueIcon { get; set; } - } - - public class Item7 - { - - [JsonProperty("photo_id")] - public int PhotoId { get; set; } - - [JsonProperty("photo")] - public Photo2 Photo { get; set; } - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } - - [JsonProperty("user")] - public User4 User { get; set; } - - [JsonProperty("beer")] - public Beer3 Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery3 Brewery { get; set; } - - [JsonProperty("venue")] - public Venue2 Venue { get; set; } - } - - public class Media2 - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Contact7 - { - - [JsonProperty("facebook")] - public int Facebook { get; set; } - - [JsonProperty("twitter")] - public string Twitter { get; set; } - } - - public class Badge - { - - [JsonProperty("badges_to_facebook")] - public int BadgesToFacebook { get; set; } - - [JsonProperty("badges_to_twitter")] - public int BadgesToTwitter { get; set; } - } - - public class Checkin - { - - [JsonProperty("checkin_to_facebook")] - public int CheckinToFacebook { get; set; } - - [JsonProperty("checkin_to_twitter")] - public int CheckinToTwitter { get; set; } - - [JsonProperty("checkin_to_foursquare")] - public int CheckinToFoursquare { get; set; } - } - - public class Navigation - { - - [JsonProperty("default_to_checkin")] - public int DefaultToCheckin { get; set; } - } - - public class Settings - { - - [JsonProperty("badge")] - public Badge Badge { get; set; } - - [JsonProperty("checkin")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkin Checkin { get; set; } - - [JsonProperty("navigation")] - public Navigation Navigation { get; set; } - - [JsonProperty("email_address")] - public string EmailAddress { get; set; } - } - - public class User - { - - [JsonProperty("uid")] - public int Uid { get; set; } - - [JsonProperty("id")] - public int Id { get; set; } - - [JsonProperty("user_name")] - public string UserName { get; set; } - - [JsonProperty("first_name")] - public string FirstName { get; set; } - - [JsonProperty("last_name")] - public string LastName { get; set; } - - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } - - [JsonProperty("user_avatar_hd")] - public string UserAvatarHd { get; set; } - - [JsonProperty("user_cover_photo")] - public string UserCoverPhoto { get; set; } - - [JsonProperty("user_cover_photo_offset")] - public int UserCoverPhotoOffset { get; set; } - - [JsonProperty("is_private")] - public int IsPrivate { get; set; } - - [JsonProperty("location")] - public string Location { get; set; } - - [JsonProperty("url")] - public string Url { get; set; } - - [JsonProperty("bio")] - public string Bio { get; set; } - - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } - - [JsonProperty("relationship")] - public string Relationship { get; set; } - - [JsonProperty("untappd_url")] - public string UntappdUrl { get; set; } - - [JsonProperty("account_type")] - public string AccountType { get; set; } - - [JsonProperty("stats")] - public Stats Stats { get; set; } - - [JsonProperty("recent_brews")] - public RecentBrews RecentBrews { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - - [JsonProperty("media")] - public Media2 Media { get; set; } - - [JsonProperty("contact")] - public Contact7 Contact { get; set; } - - [JsonProperty("date_joined")] - public string DateJoined { get; set; } - - [JsonProperty("settings")] - public Settings Settings { get; set; } - } - - public class Response - { - - [JsonProperty("user")] - public User User { get; set; } - } - - public class UserInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/user/info{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/UserWishlist.cs b/src/Untappd.Net/Responses/UserWishlist.cs index 4ae2b37..d20c6b5 100644 --- a/src/Untappd.Net/Responses/UserWishlist.cs +++ b/src/Untappd.Net/Responses/UserWishlist.cs @@ -4,229 +4,216 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.UserWishlist { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Notifications - { + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - public class Beer - { + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + [JsonProperty("rating_count")] + public int RatingCount { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } + } - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + public class Location + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("rating_count")] - public int RatingCount { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Contact - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("twitter")] - public string Twitter { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - public class Location - { + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("contact")] + public Contact Contact { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("lng")] - public double Lng { get; set; } - } + public class Item + { + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - public class Brewery - { + [JsonProperty("beer")] + public Beer Beer { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("friends")] + public IList Friends { get; set; } + } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + public class Beers + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("country_name")] - public string CountryName { get; set; } + public class Response + { + [JsonProperty("sort")] + public string Sort { get; set; } - [JsonProperty("contact")] - public Contact Contact { get; set; } + [JsonProperty("sort_english")] + public string SortEnglish { get; set; } - [JsonProperty("location")] - public Location Location { get; set; } + [JsonProperty("type_id")] + public int TypeId { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("beers")] + public Beers Beers { get; set; } + } - public class Item - { + public class UserWishList : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "/v4/user/wishlist{0}"; } } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } - - [JsonProperty("friends")] - public IList Friends { get; set; } - } - - public class Beers - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Response - { - - [JsonProperty("sort")] - public string Sort { get; set; } - - [JsonProperty("sort_english")] - public string SortEnglish { get; set; } - - [JsonProperty("type_id")] - public int TypeId { get; set; } - - [JsonProperty("beers")] - public Beers Beers { get; set; } - } - - public class UserWishList : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "/v4/user/wishlist{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/Responses/VenueInfo.cs b/src/Untappd.Net/Responses/VenueInfo.cs index 0b07e61..1bebaff 100644 --- a/src/Untappd.Net/Responses/VenueInfo.cs +++ b/src/Untappd.Net/Responses/VenueInfo.cs @@ -4,1205 +4,1141 @@ using Untappd.Net.Request; namespace Untappd.Net.Responses.VenueInfo { + public class ResponseTime + { + [JsonProperty("time")] + public double Time { get; set; } - public class ResponseTime - { + [JsonProperty("measure")] + public string Measure { get; set; } + } - [JsonProperty("time")] - public double Time { get; set; } + public class InitTime + { + [JsonProperty("time")] + public double Time { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("measure")] + public string Measure { get; set; } + } - public class InitTime - { + public class Meta + { + [JsonProperty("code")] + public int Code { get; set; } - [JsonProperty("time")] - public double Time { get; set; } + [JsonProperty("response_time")] + public ResponseTime ResponseTime { get; set; } - [JsonProperty("measure")] - public string Measure { get; set; } - } + [JsonProperty("init_time")] + public InitTime InitTime { get; set; } + } - public class Meta - { + public class UnreadCount + { + [JsonProperty("comments")] + public int Comments { get; set; } - [JsonProperty("code")] - public int Code { get; set; } + [JsonProperty("toasts")] + public int Toasts { get; set; } - [JsonProperty("response_time")] - public ResponseTime ResponseTime { get; set; } + [JsonProperty("friends")] + public int Friends { get; set; } - [JsonProperty("init_time")] - public InitTime InitTime { get; set; } - } + [JsonProperty("messages")] + public int Messages { get; set; } - public class UnreadCount - { + [JsonProperty("news")] + public int News { get; set; } + } - [JsonProperty("comments")] - public int Comments { get; set; } + public class Notifications + { + [JsonProperty("type")] + public string Type { get; set; } - [JsonProperty("toasts")] - public int Toasts { get; set; } + [JsonProperty("unread_count")] + public UnreadCount UnreadCount { get; set; } + } - [JsonProperty("friends")] - public int Friends { get; set; } + public class Item + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("messages")] - public int Messages { get; set; } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - [JsonProperty("news")] - public int News { get; set; } - } + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - public class Notifications - { + public class Categories + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("type")] - public string Type { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("unread_count")] - public UnreadCount UnreadCount { get; set; } - } + public class Stats + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - public class Item - { + [JsonProperty("user_count")] + public int UserCount { get; set; } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + [JsonProperty("total_user_count")] + public int TotalUserCount { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("monthly_count")] + public int MonthlyCount { get; set; } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + [JsonProperty("weekly_count")] + public int WeeklyCount { get; set; } + } - public class Categories - { + public class VenueIcon + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("lg")] + public string Lg { get; set; } + } - public class Stats - { + public class Location + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - [JsonProperty("user_count")] - public int UserCount { get; set; } + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("total_user_count")] - public int TotalUserCount { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("monthly_count")] - public int MonthlyCount { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("weekly_count")] - public int WeeklyCount { get; set; } - } + [JsonProperty("lng")] + public double Lng { get; set; } + } - public class VenueIcon - { + public class Contact + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("md")] - public string Md { get; set; } + public class Foursquare + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - public class Location - { + public class Photo + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + public class Beer + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - public class Contact - { + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - public class Foursquare - { + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + [JsonProperty("beer_style_id")] + public int BeerStyleId { get; set; } - public class Photo - { + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + public class Contact2 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - public class Beer - { + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + public class Location2 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } + public class Brewery + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("beer_style_id")] - public int BeerStyleId { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact2 Contact { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("location")] + public Location2 Location { get; set; } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - public class Contact2 - { + public class User + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("url")] - public string Url { get; set; } - } + [JsonProperty("last_name")] + public string LastName { get; set; } - public class Location2 - { + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } + } - [JsonProperty("lat")] - public double Lat { get; set; } + public class Item3 + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - public class Brewery - { + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + public class Categories2 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + public class Location3 + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact2 Contact { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("location")] - public Location2 Location { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("lng")] + public double Lng { get; set; } + } - public class User - { + public class Contact3 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class Foursquare2 + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - [JsonProperty("last_name")] - public string LastName { get; set; } + public class VenueIcon2 + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } - } + public class Venue2 + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - public class Item3 - { + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("parent_category_id")] + public string ParentCategoryId { get; set; } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + [JsonProperty("categories")] + public Categories2 Categories { get; set; } - public class Categories2 - { + [JsonProperty("location")] + public Location3 Location { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact3 Contact { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - public class Location3 - { + [JsonProperty("foursquare")] + public Foursquare2 Foursquare { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon2 VenueIcon { get; set; } + } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + public class Item2 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("photo")] + public Photo Photo { get; set; } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("beer")] + public Beer Beer { get; set; } - public class Contact3 - { + [JsonProperty("brewery")] + public Brewery Brewery { get; set; } - [JsonProperty("twitter")] - public string Twitter { get; set; } + [JsonProperty("user")] + public User User { get; set; } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + [JsonProperty("venue")] + public Venue2 Venue { get; set; } + } - public class Foursquare2 - { + public class Media + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + public class User2 + { + [JsonProperty("uid")] + public int Uid { get; set; } - public class VenueIcon2 - { + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("relationship")] + public string Relationship { get; set; } - public class Venue2 - { + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("venue_id")] - public int VenueId { get; set; } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("venue_name")] - public string VenueName { get; set; } + [JsonProperty("is_private")] + public int IsPrivate { get; set; } + } - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } + public class Beer2 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("parent_category_id")] - public string ParentCategoryId { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("categories")] - public Categories2 Categories { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("location")] - public Location3 Location { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact3 Contact { get; set; } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("foursquare")] - public Foursquare2 Foursquare { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("venue_icon")] - public VenueIcon2 VenueIcon { get; set; } - } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } + } - public class Item2 - { + public class Contact4 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("photo")] - public Photo Photo { get; set; } + [JsonProperty("instagram")] + public string Instagram { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("url")] + public string Url { get; set; } + } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + public class Location4 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("beer")] - public Beer Beer { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("brewery")] - public Brewery Brewery { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("user")] - public User User { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("venue")] - public Venue2 Venue { get; set; } - } + public class Brewery2 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - public class Media - { + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - public class User2 - { + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact4 Contact { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("location")] + public Location4 Location { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("last_name")] - public string LastName { get; set; } + public class Item5 + { + [JsonProperty("category_name")] + public string CategoryName { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("category_id")] + public string CategoryId { get; set; } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + [JsonProperty("is_primary")] + public bool IsPrimary { get; set; } + } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + public class Categories3 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("is_private")] - public int IsPrivate { get; set; } - } + [JsonProperty("items")] + public IList Items { get; set; } + } - public class Beer2 - { + public class Location5 + { + [JsonProperty("venue_address")] + public string VenueAddress { get; set; } - [JsonProperty("bid")] - public int Bid { get; set; } + [JsonProperty("venue_city")] + public string VenueCity { get; set; } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + [JsonProperty("venue_state")] + public string VenueState { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("venue_country")] + public string VenueCountry { get; set; } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("lat")] + public double Lat { get; set; } - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } + public class Contact5 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("wish_list")] - public bool WishList { get; set; } + [JsonProperty("venue_url")] + public string VenueUrl { get; set; } + } - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - } + public class Foursquare3 + { + [JsonProperty("foursquare_id")] + public string FoursquareId { get; set; } - public class Contact4 - { + [JsonProperty("foursquare_url")] + public string FoursquareUrl { get; set; } + } - [JsonProperty("twitter")] - public string Twitter { get; set; } + public class VenueIcon3 + { + [JsonProperty("sm")] + public string Sm { get; set; } - [JsonProperty("facebook")] - public string Facebook { get; set; } + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("instagram")] - public string Instagram { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("url")] - public string Url { get; set; } - } + public class Venue3 + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - public class Location4 - { + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } + [JsonProperty("parent_category_id")] + public string ParentCategoryId { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("categories")] + public Categories3 Categories { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("location")] + public Location5 Location { get; set; } - public class Brewery2 - { + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact5 Contact { get; set; } - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } + [JsonProperty("foursquare")] + public Foursquare3 Foursquare { get; set; } - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon3 VenueIcon { get; set; } + } - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } + public class User3 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("country_name")] - public string CountryName { get; set; } + [JsonProperty("user_name")] + public string UserName { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact4 Contact { get; set; } + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("location")] - public Location4 Location { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } + [JsonProperty("bio")] + public string Bio { get; set; } - public class Item5 - { + [JsonProperty("location")] + public string Location { get; set; } - [JsonProperty("category_name")] - public string CategoryName { get; set; } + [JsonProperty("relationship")] + public string Relationship { get; set; } - [JsonProperty("category_id")] - public string CategoryId { get; set; } + [JsonProperty("is_supporter")] + public int IsSupporter { get; set; } - [JsonProperty("is_primary")] - public bool IsPrimary { get; set; } - } + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - public class Categories3 - { + [JsonProperty("user_link")] + public string UserLink { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - public class Location5 - { + public class Item6 + { + [JsonProperty("user")] + public User3 User { get; set; } - [JsonProperty("venue_address")] - public string VenueAddress { get; set; } + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("venue_city")] - public string VenueCity { get; set; } + [JsonProperty("comment_id")] + public int CommentId { get; set; } - [JsonProperty("venue_state")] - public string VenueState { get; set; } + [JsonProperty("comment_owner")] + public bool CommentOwner { get; set; } - [JsonProperty("venue_country")] - public string VenueCountry { get; set; } + [JsonProperty("comment_editor")] + public bool CommentEditor { get; set; } - [JsonProperty("lat")] - public double Lat { get; set; } + [JsonProperty("comment")] + public string Comment { get; set; } - [JsonProperty("lng")] - public double Lng { get; set; } - } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - public class Contact5 - { + [JsonProperty("comment_source")] + public string CommentSource { get; set; } + } - [JsonProperty("twitter")] - public string Twitter { get; set; } + public class Comments + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("venue_url")] - public string VenueUrl { get; set; } - } + [JsonProperty("count")] + public int Count { get; set; } - public class Foursquare3 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("foursquare_id")] - public string FoursquareId { get; set; } + public class User4 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("foursquare_url")] - public string FoursquareUrl { get; set; } - } + [JsonProperty("user_name")] + public string UserName { get; set; } - public class VenueIcon3 - { + [JsonProperty("first_name")] + public string FirstName { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("last_name")] + public string LastName { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("bio")] + public string Bio { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("location")] + public string Location { get; set; } - public class Venue3 - { + [JsonProperty("user_avatar")] + public string UserAvatar { get; set; } - [JsonProperty("venue_id")] - public int VenueId { get; set; } + [JsonProperty("user_link")] + public string UserLink { get; set; } - [JsonProperty("venue_name")] - public string VenueName { get; set; } + [JsonProperty("account_type")] + public string AccountType { get; set; } - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } + [JsonProperty("brewery_details")] + public IList BreweryDetails { get; set; } + } - [JsonProperty("parent_category_id")] - public string ParentCategoryId { get; set; } + public class Item7 + { + [JsonProperty("uid")] + public int Uid { get; set; } - [JsonProperty("categories")] - public Categories3 Categories { get; set; } + [JsonProperty("user")] + public User4 User { get; set; } - [JsonProperty("location")] - public Location5 Location { get; set; } + [JsonProperty("like_id")] + public int LikeId { get; set; } - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact5 Contact { get; set; } + [JsonProperty("like_owner")] + public bool LikeOwner { get; set; } - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } + } - [JsonProperty("foursquare")] - public Foursquare3 Foursquare { get; set; } + public class Toasts + { + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("venue_icon")] - public VenueIcon3 VenueIcon { get; set; } - } + [JsonProperty("count")] + public int Count { get; set; } - public class User3 - { + [JsonProperty("auth_toast")] + public bool AuthToast { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("user_name")] - public string UserName { get; set; } + public class Photo2 + { + [JsonProperty("photo_img_sm")] + public string PhotoImgSm { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("photo_img_md")] + public string PhotoImgMd { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("photo_img_lg")] + public string PhotoImgLg { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("photo_img_og")] + public string PhotoImgOg { get; set; } + } - [JsonProperty("location")] - public string Location { get; set; } + public class Item8 + { + [JsonProperty("photo_id")] + public int PhotoId { get; set; } - [JsonProperty("relationship")] - public string Relationship { get; set; } + [JsonProperty("photo")] + public Photo2 Photo { get; set; } + } - [JsonProperty("is_supporter")] - public int IsSupporter { get; set; } + public class Media2 + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("user_link")] - public string UserLink { get; set; } + public class Source + { + [JsonProperty("app_name")] + public string AppName { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("app_website")] + public string AppWebsite { get; set; } + } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + public class BadgeImage + { + [JsonProperty("sm")] + public string Sm { get; set; } - public class Item6 - { + [JsonProperty("md")] + public string Md { get; set; } - [JsonProperty("user")] - public User3 User { get; set; } + [JsonProperty("lg")] + public string Lg { get; set; } + } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + public class Item9 + { + [JsonProperty("badge_id")] + public int BadgeId { get; set; } - [JsonProperty("comment_id")] - public int CommentId { get; set; } + [JsonProperty("user_badge_id")] + public int UserBadgeId { get; set; } - [JsonProperty("comment_owner")] - public bool CommentOwner { get; set; } + [JsonProperty("badge_name")] + public string BadgeName { get; set; } - [JsonProperty("comment_editor")] - public bool CommentEditor { get; set; } + [JsonProperty("badge_description")] + public string BadgeDescription { get; set; } - [JsonProperty("comment")] - public string Comment { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("badge_image")] + public BadgeImage BadgeImage { get; set; } + } - [JsonProperty("comment_source")] - public string CommentSource { get; set; } - } + public class Badges + { + [JsonProperty("count")] + public int Count { get; set; } - public class Comments - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + public class Item4 + { + [JsonProperty("checkin_id")] + public int CheckinId { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - public class User4 - { + [JsonProperty("checkin_comment")] + public string CheckinComment { get; set; } - [JsonProperty("uid")] - public int Uid { get; set; } + [JsonProperty("user")] + public User2 User { get; set; } - [JsonProperty("user_name")] - public string UserName { get; set; } + [JsonProperty("beer")] + public Beer2 Beer { get; set; } - [JsonProperty("first_name")] - public string FirstName { get; set; } + [JsonProperty("brewery")] + public Brewery2 Brewery { get; set; } - [JsonProperty("last_name")] - public string LastName { get; set; } + [JsonProperty("venue")] + public Venue3 Venue { get; set; } - [JsonProperty("bio")] - public string Bio { get; set; } + [JsonProperty("comments")] + public Comments Comments { get; set; } - [JsonProperty("location")] - public string Location { get; set; } + [JsonProperty("toasts")] + public Toasts Toasts { get; set; } - [JsonProperty("user_avatar")] - public string UserAvatar { get; set; } + [JsonProperty("media")] + public Media2 Media { get; set; } - [JsonProperty("user_link")] - public string UserLink { get; set; } + [JsonProperty("source")] + public Source Source { get; set; } - [JsonProperty("account_type")] - public string AccountType { get; set; } + [JsonProperty("badges")] + public Badges Badges { get; set; } + } - [JsonProperty("brewery_details")] - public IList BreweryDetails { get; set; } - } + public class Checkins + { + [JsonProperty("count")] + public int Count { get; set; } - public class Item7 - { + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("uid")] - public int Uid { get; set; } + public class Beer3 + { + [JsonProperty("bid")] + public int Bid { get; set; } - [JsonProperty("user")] - public User4 User { get; set; } + [JsonProperty("beer_name")] + public string BeerName { get; set; } - [JsonProperty("like_id")] - public int LikeId { get; set; } + [JsonProperty("beer_label")] + public string BeerLabel { get; set; } - [JsonProperty("like_owner")] - public bool LikeOwner { get; set; } + [JsonProperty("beer_abv")] + public double BeerAbv { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - } + [JsonProperty("beer_ibu")] + public int BeerIbu { get; set; } - public class Toasts - { + [JsonProperty("beer_slug")] + public string BeerSlug { get; set; } - [JsonProperty("total_count")] - public int TotalCount { get; set; } + [JsonProperty("beer_description")] + public string BeerDescription { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("is_in_production")] + public int IsInProduction { get; set; } - [JsonProperty("auth_toast")] - public bool AuthToast { get; set; } + [JsonProperty("beer_style_id")] + public int BeerStyleId { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("beer_style")] + public string BeerStyle { get; set; } - public class Photo2 - { + [JsonProperty("auth_rating")] + public double AuthRating { get; set; } - [JsonProperty("photo_img_sm")] - public string PhotoImgSm { get; set; } + [JsonProperty("wish_list")] + public bool WishList { get; set; } - [JsonProperty("photo_img_md")] - public string PhotoImgMd { get; set; } + [JsonProperty("beer_active")] + public int BeerActive { get; set; } - [JsonProperty("photo_img_lg")] - public string PhotoImgLg { get; set; } + [JsonProperty("rating_score")] + public double RatingScore { get; set; } - [JsonProperty("photo_img_og")] - public string PhotoImgOg { get; set; } - } + [JsonProperty("rating_count")] + public int RatingCount { get; set; } + } - public class Item8 - { + public class Contact6 + { + [JsonProperty("twitter")] + public string Twitter { get; set; } - [JsonProperty("photo_id")] - public int PhotoId { get; set; } + [JsonProperty("facebook")] + public string Facebook { get; set; } - [JsonProperty("photo")] - public Photo2 Photo { get; set; } - } + [JsonProperty("url")] + public string Url { get; set; } + } - public class Media2 - { + public class Location6 + { + [JsonProperty("brewery_city")] + public string BreweryCity { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery_state")] + public string BreweryState { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("lat")] + public double Lat { get; set; } - public class Source - { + [JsonProperty("lng")] + public double Lng { get; set; } + } - [JsonProperty("app_name")] - public string AppName { get; set; } + public class Brewery3 + { + [JsonProperty("brewery_id")] + public int BreweryId { get; set; } - [JsonProperty("app_website")] - public string AppWebsite { get; set; } - } + [JsonProperty("brewery_name")] + public string BreweryName { get; set; } - public class BadgeImage - { + [JsonProperty("brewery_slug")] + public string BrewerySlug { get; set; } - [JsonProperty("sm")] - public string Sm { get; set; } + [JsonProperty("brewery_label")] + public string BreweryLabel { get; set; } - [JsonProperty("md")] - public string Md { get; set; } + [JsonProperty("country_name")] + public string CountryName { get; set; } - [JsonProperty("lg")] - public string Lg { get; set; } - } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact6 Contact { get; set; } - public class Item9 - { + [JsonProperty("location")] + public Location6 Location { get; set; } - [JsonProperty("badge_id")] - public int BadgeId { get; set; } + [JsonProperty("brewery_active")] + public int BreweryActive { get; set; } + } - [JsonProperty("user_badge_id")] - public int UserBadgeId { get; set; } + public class Friends + { + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("badge_name")] - public string BadgeName { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("badge_description")] - public string BadgeDescription { get; set; } + public class Item10 + { + [JsonProperty("created_at")] + public string CreatedAt { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("total_count")] + public int TotalCount { get; set; } - [JsonProperty("badge_image")] - public BadgeImage BadgeImage { get; set; } - } + [JsonProperty("your_count")] + public int YourCount { get; set; } - public class Badges - { + [JsonProperty("beer")] + public Beer3 Beer { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("brewery")] + public Brewery3 Brewery { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("friends")] + public Friends Friends { get; set; } + } - public class Item4 - { + public class TopBeers + { + [JsonProperty("offset")] + public int Offset { get; set; } - [JsonProperty("checkin_id")] - public int CheckinId { get; set; } + [JsonProperty("limit")] + public int Limit { get; set; } - [JsonProperty("created_at")] - public string CreatedAt { get; set; } + [JsonProperty("count")] + public int Count { get; set; } - [JsonProperty("rating_score")] - public double RatingScore { get; set; } + [JsonProperty("items")] + public IList Items { get; set; } + } - [JsonProperty("checkin_comment")] - public string CheckinComment { get; set; } + public class Venue + { + [JsonProperty("venue_id")] + public int VenueId { get; set; } - [JsonProperty("user")] - public User2 User { get; set; } + [JsonProperty("venue_name")] + public string VenueName { get; set; } - [JsonProperty("beer")] - public Beer2 Beer { get; set; } + [JsonProperty("last_updated")] + public string LastUpdated { get; set; } - [JsonProperty("brewery")] - public Brewery2 Brewery { get; set; } + [JsonProperty("primary_category")] + public string PrimaryCategory { get; set; } - [JsonProperty("venue")] - public Venue3 Venue { get; set; } + [JsonProperty("categories")] + public Categories Categories { get; set; } - [JsonProperty("comments")] - public Comments Comments { get; set; } + [JsonProperty("stats")] + public Stats Stats { get; set; } - [JsonProperty("toasts")] - public Toasts Toasts { get; set; } + [JsonProperty("venue_icon")] + public VenueIcon VenueIcon { get; set; } - [JsonProperty("media")] - public Media2 Media { get; set; } + [JsonProperty("public_venue")] + public bool PublicVenue { get; set; } - [JsonProperty("source")] - public Source Source { get; set; } + [JsonProperty("location")] + public Location Location { get; set; } - [JsonProperty("badges")] - public Badges Badges { get; set; } - } + [JsonProperty("contact")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Contact Contact { get; set; } - public class Checkins - { + [JsonProperty("foursquare")] + public Foursquare Foursquare { get; set; } - [JsonProperty("count")] - public int Count { get; set; } + [JsonProperty("media")] + public Media Media { get; set; } - [JsonProperty("items")] - public IList Items { get; set; } - } + [JsonProperty("checkins")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Checkins Checkins { get; set; } - public class Beer3 - { + [JsonProperty("top_beers")] + public TopBeers TopBeers { get; set; } + } - [JsonProperty("bid")] - public int Bid { get; set; } + public class Response + { + [JsonProperty("venue")] + public Venue Venue { get; set; } + } - [JsonProperty("beer_name")] - public string BeerName { get; set; } + public class VenueInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest + { + protected override string EndPointWithConfiguration { get { return "v4/venue/info{0}"; } } - [JsonProperty("beer_label")] - public string BeerLabel { get; set; } + [JsonProperty("meta")] + public Meta Meta { get; set; } - [JsonProperty("beer_abv")] - public double BeerAbv { get; set; } + [JsonProperty("notifications")] + [JsonConverter(typeof(SingleObjectArrayConverter))] + public Notifications Notifications { get; set; } - [JsonProperty("beer_ibu")] - public int BeerIbu { get; set; } - - [JsonProperty("beer_slug")] - public string BeerSlug { get; set; } - - [JsonProperty("beer_description")] - public string BeerDescription { get; set; } - - [JsonProperty("is_in_production")] - public int IsInProduction { get; set; } - - [JsonProperty("beer_style_id")] - public int BeerStyleId { get; set; } - - [JsonProperty("beer_style")] - public string BeerStyle { get; set; } - - [JsonProperty("auth_rating")] - public double AuthRating { get; set; } - - [JsonProperty("wish_list")] - public bool WishList { get; set; } - - [JsonProperty("beer_active")] - public int BeerActive { get; set; } - - [JsonProperty("rating_score")] - public double RatingScore { get; set; } - - [JsonProperty("rating_count")] - public int RatingCount { get; set; } - } - - public class Contact6 - { - - [JsonProperty("twitter")] - public string Twitter { get; set; } - - [JsonProperty("facebook")] - public string Facebook { get; set; } - - [JsonProperty("url")] - public string Url { get; set; } - } - - public class Location6 - { - - [JsonProperty("brewery_city")] - public string BreweryCity { get; set; } - - [JsonProperty("brewery_state")] - public string BreweryState { get; set; } - - [JsonProperty("lat")] - public double Lat { get; set; } - - [JsonProperty("lng")] - public double Lng { get; set; } - } - - public class Brewery3 - { - - [JsonProperty("brewery_id")] - public int BreweryId { get; set; } - - [JsonProperty("brewery_name")] - public string BreweryName { get; set; } - - [JsonProperty("brewery_slug")] - public string BrewerySlug { get; set; } - - [JsonProperty("brewery_label")] - public string BreweryLabel { get; set; } - - [JsonProperty("country_name")] - public string CountryName { get; set; } - - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact6 Contact { get; set; } - - [JsonProperty("location")] - public Location6 Location { get; set; } - - [JsonProperty("brewery_active")] - public int BreweryActive { get; set; } - } - - public class Friends - { - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Item10 - { - - [JsonProperty("created_at")] - public string CreatedAt { get; set; } - - [JsonProperty("total_count")] - public int TotalCount { get; set; } - - [JsonProperty("your_count")] - public int YourCount { get; set; } - - [JsonProperty("beer")] - public Beer3 Beer { get; set; } - - [JsonProperty("brewery")] - public Brewery3 Brewery { get; set; } - - [JsonProperty("friends")] - public Friends Friends { get; set; } - } - - public class TopBeers - { - - [JsonProperty("offset")] - public int Offset { get; set; } - - [JsonProperty("limit")] - public int Limit { get; set; } - - [JsonProperty("count")] - public int Count { get; set; } - - [JsonProperty("items")] - public IList Items { get; set; } - } - - public class Venue - { - - [JsonProperty("venue_id")] - public int VenueId { get; set; } - - [JsonProperty("venue_name")] - public string VenueName { get; set; } - - [JsonProperty("last_updated")] - public string LastUpdated { get; set; } - - [JsonProperty("primary_category")] - public string PrimaryCategory { get; set; } - - [JsonProperty("categories")] - public Categories Categories { get; set; } - - [JsonProperty("stats")] - public Stats Stats { get; set; } - - [JsonProperty("venue_icon")] - public VenueIcon VenueIcon { get; set; } - - [JsonProperty("public_venue")] - public bool PublicVenue { get; set; } - - [JsonProperty("location")] - public Location Location { get; set; } - - [JsonProperty("contact")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Contact Contact { get; set; } - - [JsonProperty("foursquare")] - public Foursquare Foursquare { get; set; } - - [JsonProperty("media")] - public Media Media { get; set; } - - [JsonProperty("checkins")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Checkins Checkins { get; set; } - - [JsonProperty("top_beers")] - public TopBeers TopBeers { get; set; } - } - - public class Response - { - - [JsonProperty("venue")] - public Venue Venue { get; set; } - } - - public class VenueInfo : BasicRequest, IAuthenticatedRequest, IUnAuthenticatedRequest - { - protected override string EndPointWithConfiguration { get { return "v4/venue/info{0}"; } } - - [JsonProperty("meta")] - public Meta Meta { get; set; } - - [JsonProperty("notifications")] - [JsonConverter(typeof(SingleObjectArrayConverter))] - public Notifications Notifications { get; set; } - - [JsonProperty("response")] - public Response Response { get; set; } - } + [JsonProperty("response")] + public Response Response { get; set; } + } } \ No newline at end of file diff --git a/src/Untappd.Net/SingleObjectArrayConverter.cs b/src/Untappd.Net/SingleObjectArrayConverter.cs index 693168f..8a313da 100644 --- a/src/Untappd.Net/SingleObjectArrayConverter.cs +++ b/src/Untappd.Net/SingleObjectArrayConverter.cs @@ -3,44 +3,44 @@ using Newtonsoft.Json; namespace Untappd.Net { - /// - /// Created to fix bad json results. - /// Object expected but sometimes it comes as an empty array. - /// - /// Deserialize json as T if json schema defines an object. - /// - /// - internal sealed class SingleObjectArrayConverter : JsonConverter - where T : new() - { - public override bool CanConvert(Type objectType) - { - return true; + /// + /// Created to fix bad json results. + /// Object expected but sometimes it comes as an empty array. + /// + /// Deserialize json as T if json schema defines an object. + /// + /// + internal sealed class SingleObjectArrayConverter : JsonConverter + where T : new() + { + public override bool CanConvert(Type objectType) + { + return true; + } - } + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + var retval = new object(); - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - var retval = new object(); + switch (reader.TokenType) + { + case JsonToken.StartObject: + var instance = (T)serializer.Deserialize(reader, typeof(T)); + retval = instance; + break; - switch (reader.TokenType) - { - case JsonToken.StartObject: - var instance = (T)serializer.Deserialize(reader, typeof(T)); - retval = instance; - break; - case JsonToken.StartArray: - reader.Read(); - retval = new T(); - break; - } + case JsonToken.StartArray: + reader.Read(); + retval = new T(); + break; + } - return retval; - } + return retval; + } - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - throw new NotImplementedException(); - } - } -} + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/Untappd.Net/packages.config b/src/Untappd.Net/packages.config index 92b5cb9..463f4d6 100644 --- a/src/Untappd.Net/packages.config +++ b/src/Untappd.Net/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file