From d4ce7ccded9135978292938c56ccb315555df98c Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Fri, 1 May 2015 05:14:23 -0400 Subject: [PATCH 1/6] started on actions --- .../Request/TestRepository.cs | 2 +- src/Untappd.Net/Request/IAction.cs | 16 ++++ src/Untappd.Net/Request/Repository.cs | 80 +--------------- src/Untappd.Net/Request/RepositoryGet.cs | 79 ++++++++++++++++ src/Untappd.Net/Request/RepositoryPost.cs | 19 ++++ src/Untappd.Net/Responses/Actions/CheckIn.cs | 91 +++++++++++++++++++ .../Responses/Actions/ToastUntoast.cs | 30 ++++++ src/Untappd.Net/Untappd.Net.csproj | 3 + 8 files changed, 244 insertions(+), 76 deletions(-) create mode 100644 src/Untappd.Net/Request/IAction.cs create mode 100644 src/Untappd.Net/Request/RepositoryGet.cs create mode 100644 src/Untappd.Net/Request/RepositoryPost.cs create mode 100644 src/Untappd.Net/Responses/Actions/CheckIn.cs create mode 100644 src/Untappd.Net/Responses/Actions/ToastUntoast.cs diff --git a/src/Untappd.Net.UnitTests/Request/TestRepository.cs b/src/Untappd.Net.UnitTests/Request/TestRepository.cs index 9a5b815..9b0a87b 100644 --- a/src/Untappd.Net.UnitTests/Request/TestRepository.cs +++ b/src/Untappd.Net.UnitTests/Request/TestRepository.cs @@ -69,7 +69,7 @@ namespace Untappd.Net.UnitTests.Request var constructorTest = new Repository(); constructorTest.Request.Parameters.Add(new Parameter(){Name = "param"}); Assert.IsTrue(constructorTest.Request.Parameters.Count > 0); - constructorTest.ConfigureGetRequest("endpoint"); + constructorTest.ConfigureRequest("endpoint"); Assert.IsTrue(constructorTest.Request.Parameters.Count == 0); } } diff --git a/src/Untappd.Net/Request/IAction.cs b/src/Untappd.Net/Request/IAction.cs new file mode 100644 index 0000000..e353c26 --- /dev/null +++ b/src/Untappd.Net/Request/IAction.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RestSharp; + +namespace Untappd.Net.Request +{ + public interface IAction + { + Method RequestMethod { get; } + string EndPoint { get; } + IDictionary BodyParameters { get; } + } +} diff --git a/src/Untappd.Net/Request/Repository.cs b/src/Untappd.Net/Request/Repository.cs index d398ff8..961bef1 100644 --- a/src/Untappd.Net/Request/Repository.cs +++ b/src/Untappd.Net/Request/Repository.cs @@ -7,7 +7,7 @@ using System.Threading; namespace Untappd.Net.Request { - public class Repository + public partial class Repository { internal IRestClient Client; internal IRestRequest Request; @@ -24,7 +24,7 @@ namespace Untappd.Net.Request Request = request; } - internal void ConfigureGetRequest(string endPoint, Method webMethod = Method.GET, IDictionary bodyParameters = null) + internal void ConfigureRequest(string endPoint, IDictionary bodyParameters = null , Method webMethod = Method.GET) { Request.Resource = endPoint; Request.Method = webMethod; @@ -38,83 +38,13 @@ namespace Untappd.Net.Request } - /// - /// 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 : IUnAuthenticatedRequest,new() + private TResult ExecuteRequest() { - var result = new TResult(); - ConfigureGetRequest(result.EndPoint(urlParameter), Method.GET, bodyParameters); - Request.AddParameter("client_id", credentials.ClientId); - Request.AddParameter("client_secret", credentials.ClientSecret); - return DoRestRequest(); - } - - /// - /// Get the things! Async! - /// - /// - /// - /// - /// - /// - public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) - where TResult : IUnAuthenticatedRequest, new() - { - var result = new TResult(); - ConfigureGetRequest(result.EndPoint(urlParameter), Method.GET, bodyParameters); - Request.AddParameter("client_id", credentials.ClientId); - Request.AddParameter("client_secret", credentials.ClientSecret); - return DoRestRequestAsync(); - } - - /// - /// 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 : IAuthenticatedRequest, new() - { - var result = new TResult(); - ConfigureGetRequest(result.EndPoint(urlParameter), Method.GET, bodyParameters); - Request.AddParameter("access_token", credentials.AccessToken); - return DoRestRequest(); - } - - /// - /// Get the things Authenticated! Async!! - /// - /// - /// - /// - /// - /// - public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) - where TResult : IAuthenticatedRequest, new() - { - var result = new TResult(); - ConfigureGetRequest(result.EndPoint(urlParameter), Method.GET, bodyParameters); - Request.AddParameter("access_token", credentials.AccessToken); - return DoRestRequestAsync(); - } - - private TResult DoRestRequest() - { - var response = Client.Execute(this.Request); + var response = Client.Execute(Request); return JsonConvert.DeserializeObject(response.Content); } - private async Task DoRestRequestAsync() + private async Task ExecuteRequestAsync() { var response = await Client.ExecuteTaskAsync(Request); return JsonConvert.DeserializeObject(response.Content); diff --git a/src/Untappd.Net/Request/RepositoryGet.cs b/src/Untappd.Net/Request/RepositoryGet.cs new file mode 100644 index 0000000..e945116 --- /dev/null +++ b/src/Untappd.Net/Request/RepositoryGet.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Untappd.Net.Client; + +namespace Untappd.Net.Request +{ + public 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 : IUnAuthenticatedRequest, new() + { + var result = new TResult(); + ConfigureRequest(result.EndPoint(urlParameter), bodyParameters); + Request.AddParameter("client_id", credentials.ClientId); + Request.AddParameter("client_secret", credentials.ClientSecret); + return ExecuteRequest(); + } + + /// + /// Get the things! Async! + /// + /// + /// + /// + /// + /// + public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) + where TResult : IUnAuthenticatedRequest, new() + { + var result = new TResult(); + ConfigureRequest(result.EndPoint(urlParameter), bodyParameters); + Request.AddParameter("client_id", credentials.ClientId); + Request.AddParameter("client_secret", credentials.ClientSecret); + return 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 : IAuthenticatedRequest, new() + { + var result = new TResult(); + ConfigureRequest(result.EndPoint(urlParameter), bodyParameters); + Request.AddParameter("access_token", credentials.AccessToken); + return ExecuteRequest(); + } + + /// + /// Get the things Authenticated! Async!! + /// + /// + /// + /// + /// + /// + public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) + where TResult : IAuthenticatedRequest, new() + { + var result = new TResult(); + ConfigureRequest(result.EndPoint(urlParameter), bodyParameters); + Request.AddParameter("access_token", credentials.AccessToken); + return ExecuteRequestAsync(); + } + } +} diff --git a/src/Untappd.Net/Request/RepositoryPost.cs b/src/Untappd.Net/Request/RepositoryPost.cs new file mode 100644 index 0000000..a23a5d3 --- /dev/null +++ b/src/Untappd.Net/Request/RepositoryPost.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Untappd.Net.Client; + +namespace Untappd.Net.Request +{ + public partial class Repository + { + public dynamic Post(IAuthenticatedUntappdCredentials credentials, IAction action) + { + ConfigureRequest(action.EndPoint, action.BodyParameters); + Request.AddParameter("access_token", credentials.AccessToken); + return ExecuteRequest(); + } + } +} diff --git a/src/Untappd.Net/Responses/Actions/CheckIn.cs b/src/Untappd.Net/Responses/Actions/CheckIn.cs new file mode 100644 index 0000000..c648956 --- /dev/null +++ b/src/Untappd.Net/Responses/Actions/CheckIn.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using RestSharp; +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 IDictionary BodyParameters + { + get + { + var dict = new Dictionary(); + dict.Add("gmt_offset", gmt_offset); + dict.Add("timezone", timezone); + dict.Add("bid", bid); + if (geolat.HasValue) + { + dict.Add("geolat", geolat); + } + if (geolng.HasValue) + { + dict.Add("geolng", geolat); + } + if (!string.IsNullOrWhiteSpace(shout) && shout.Length <= 140) + { + dict.Add("shout", shout); + } + if (rating > 0 && rating < 6) + { + dict.Add("rating", rating); + } + return dict; + } + } + + public string gmt_offset { 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.Length > 140) + { + throw new ArgumentOutOfRangeException("value", value,"Shout can be no more than 140 characters"); + } + _shout = 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 gmt_offset, string timezone, int bid) + { + if (string.IsNullOrWhiteSpace(gmt_offset)) + { + throw new ArgumentNullException("gmt_offset"); + } + if (string.IsNullOrWhiteSpace(timezone)) + { + throw new ArgumentNullException("timezone"); + } + this.gmt_offset = string.Copy(gmt_offset); + this.timezone = string.Copy(timezone); + this.bid = bid; + } + } +} diff --git a/src/Untappd.Net/Responses/Actions/ToastUntoast.cs b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs new file mode 100644 index 0000000..39d43d5 --- /dev/null +++ b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using RestSharp; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.Actions +{ + public class ToastUntoast : IAction + { + public Method RequestMethod { get; private set; } + public IDictionary BodyParameters { get; private set; } + public string CheckinId { get; private set; } + public string EndPoint { get { return string.Format(" /v4/checkin/toast/{0}", CheckinId); } } + /// + /// + /// + /// + /// + public ToastUntoast(string checkinId) + { + if (string.IsNullOrWhiteSpace(checkinId)) + { + throw new ArgumentNullException("checkinId"); + } + CheckinId = string.Copy(checkinId); + BodyParameters = new Dictionary(); + RequestMethod = Method.POST; + } + } +} diff --git a/src/Untappd.Net/Untappd.Net.csproj b/src/Untappd.Net/Untappd.Net.csproj index f25d01e..27f251b 100644 --- a/src/Untappd.Net/Untappd.Net.csproj +++ b/src/Untappd.Net/Untappd.Net.csproj @@ -47,6 +47,9 @@ + + + From e5c8540e9219c902f2274c6e69536fb118e96265 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Fri, 1 May 2015 05:24:41 -0400 Subject: [PATCH 2/6] fix it from failing to build --- .../Request/TestRepository.cs | 6 +-- .../Responses/TestDeserializer.cs | 6 +-- .../Responses/TestResponseEndpoints.cs | 3 -- .../EndpointConfigurationException.cs | 6 ++- src/Untappd.Net/Request/IAction.cs | 6 +-- src/Untappd.Net/Request/Repository.cs | 4 +- src/Untappd.Net/Request/RepositoryGet.cs | 8 ++-- src/Untappd.Net/Request/RepositoryPost.cs | 7 +--- src/Untappd.Net/Responses/Actions/CheckIn.cs | 16 ++++---- .../Responses/Actions/PendingFriends.cs | 40 +++++++++++++++++++ .../Responses/Actions/ToastUntoast.cs | 2 +- src/Untappd.Net/SingleObjectArrayConverter.cs | 1 - src/Untappd.Net/Untappd.Net.csproj | 7 ++-- 13 files changed, 71 insertions(+), 41 deletions(-) create mode 100644 src/Untappd.Net/Responses/Actions/PendingFriends.cs diff --git a/src/Untappd.Net.UnitTests/Request/TestRepository.cs b/src/Untappd.Net.UnitTests/Request/TestRepository.cs index 9b0a87b..5b89871 100644 --- a/src/Untappd.Net.UnitTests/Request/TestRepository.cs +++ b/src/Untappd.Net.UnitTests/Request/TestRepository.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Threading.Tasks; using Moq; using Newtonsoft.Json; using NUnit.Framework; @@ -6,7 +7,6 @@ using RestSharp; using Untappd.Net.Client; using Untappd.Net.Request; using Untappd.Net.Responses.BeerInfo; -using System.Threading.Tasks; namespace Untappd.Net.UnitTests.Request { @@ -19,7 +19,7 @@ namespace Untappd.Net.UnitTests.Request var mockCreds = new Mock(); mockCreds.Setup(a => a.ClientId).Returns("id"); mockCreds.Setup(a => a.ClientSecret).Returns("secret"); - var bodyParam = new Dictionary {{"key", "value"}}; + var bodyParam = new Dictionary {{"key", "value"}}; var client = new Mock(); var request = new Mock(); request.Setup(a => a.AddParameter(It.IsAny(), It.IsAny())); @@ -67,7 +67,7 @@ namespace Untappd.Net.UnitTests.Request public void ConfirmConfigureGetRequestClearsParams() { var constructorTest = new Repository(); - constructorTest.Request.Parameters.Add(new Parameter(){Name = "param"}); + 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); diff --git a/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs b/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs index 1486e1f..7a3889f 100644 --- a/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs +++ b/src/Untappd.Net.UnitTests/Responses/TestDeserializer.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; using Newtonsoft.Json; using NUnit.Framework; @@ -16,7 +17,6 @@ using Untappd.Net.Responses.UserInfo; using Untappd.Net.Responses.VenueInfo; using UserDistinctBeers = Untappd.Net.Responses.UserDistinctBeer; using UserWishList = Untappd.Net.Responses.UserWishlist; -using System; namespace Untappd.Net.UnitTests { @@ -31,7 +31,7 @@ namespace Untappd.Net.UnitTests { var credentials = new AuthenticatedUntappdCredentials(""); - Dictionary parameters = new Dictionary(); + Dictionary parameters = new Dictionary(); parameters.Add("q", "wild rose"); var repo = new Repository(); diff --git a/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs b/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs index deba7af..d4eba9d 100644 --- a/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs +++ b/src/Untappd.Net.UnitTests/Responses/TestResponseEndpoints.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text; -using System.Threading.Tasks; using NUnit.Framework; using Untappd.Net.Request; diff --git a/src/Untappd.Net/Exception/EndpointConfigurationException.cs b/src/Untappd.Net/Exception/EndpointConfigurationException.cs index 2d9786d..14db0d5 100644 --- a/src/Untappd.Net/Exception/EndpointConfigurationException.cs +++ b/src/Untappd.Net/Exception/EndpointConfigurationException.cs @@ -1,6 +1,8 @@ -namespace Untappd.Net.Exception +using System; + +namespace Untappd.Net.Exception { - [System.Serializable] + [Serializable] public class EndpointConfigurationException : BaseUntappdException { /// diff --git a/src/Untappd.Net/Request/IAction.cs b/src/Untappd.Net/Request/IAction.cs index e353c26..c169757 100644 --- a/src/Untappd.Net/Request/IAction.cs +++ b/src/Untappd.Net/Request/IAction.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using RestSharp; namespace Untappd.Net.Request diff --git a/src/Untappd.Net/Request/Repository.cs b/src/Untappd.Net/Request/Repository.cs index 961bef1..ad0af81 100644 --- a/src/Untappd.Net/Request/Repository.cs +++ b/src/Untappd.Net/Request/Repository.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; +using System.Threading.Tasks; using Newtonsoft.Json; using RestSharp; -using Untappd.Net.Client; -using System.Threading.Tasks; -using System.Threading; namespace Untappd.Net.Request { diff --git a/src/Untappd.Net/Request/RepositoryGet.cs b/src/Untappd.Net/Request/RepositoryGet.cs index e945116..08a21c4 100644 --- a/src/Untappd.Net/Request/RepositoryGet.cs +++ b/src/Untappd.Net/Request/RepositoryGet.cs @@ -14,7 +14,7 @@ namespace Untappd.Net.Request /// 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) + public TResult Get(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) where TResult : IUnAuthenticatedRequest, new() { var result = new TResult(); @@ -32,7 +32,7 @@ namespace Untappd.Net.Request /// /// /// - public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) + public Task GetAsync(IUnAuthenticatedUntappdCredentials credentials, string urlParameter, IDictionary bodyParameters = null) where TResult : IUnAuthenticatedRequest, new() { var result = new TResult(); @@ -50,7 +50,7 @@ namespace Untappd.Net.Request /// 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) + public TResult Get(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) where TResult : IAuthenticatedRequest, new() { var result = new TResult(); @@ -67,7 +67,7 @@ namespace Untappd.Net.Request /// /// /// - public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) + public Task GetAsync(IAuthenticatedUntappdCredentials credentials, string urlParameter = "", IDictionary bodyParameters = null) where TResult : IAuthenticatedRequest, new() { var result = new TResult(); diff --git a/src/Untappd.Net/Request/RepositoryPost.cs b/src/Untappd.Net/Request/RepositoryPost.cs index a23a5d3..3e341c7 100644 --- a/src/Untappd.Net/Request/RepositoryPost.cs +++ b/src/Untappd.Net/Request/RepositoryPost.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Untappd.Net.Client; +using Untappd.Net.Client; namespace Untappd.Net.Request { diff --git a/src/Untappd.Net/Responses/Actions/CheckIn.cs b/src/Untappd.Net/Responses/Actions/CheckIn.cs index c648956..4a25c65 100644 --- a/src/Untappd.Net/Responses/Actions/CheckIn.cs +++ b/src/Untappd.Net/Responses/Actions/CheckIn.cs @@ -10,23 +10,25 @@ namespace Untappd.Net.Responses.Actions private short _rating; private string _shout; public Method RequestMethod { get{ return Method.POST;} } - public string EndPoint { get { return "/v4/checkin/add"; } } + public string EndPoint { get { return "v4/checkin/add"; } } public IDictionary BodyParameters { get { - var dict = new Dictionary(); - dict.Add("gmt_offset", gmt_offset); - dict.Add("timezone", timezone); - dict.Add("bid", bid); + var dict = new Dictionary + { + {"gmt_offset", gmt_offset}, + {"timezone", timezone}, + {"bid", bid} + }; if (geolat.HasValue) { - dict.Add("geolat", geolat); + dict.Add("geolat", geolat.Value); } if (geolng.HasValue) { - dict.Add("geolng", geolat); + dict.Add("geolng", geolng.Value); } if (!string.IsNullOrWhiteSpace(shout) && shout.Length <= 140) { diff --git a/src/Untappd.Net/Responses/Actions/PendingFriends.cs b/src/Untappd.Net/Responses/Actions/PendingFriends.cs new file mode 100644 index 0000000..efcd8ba --- /dev/null +++ b/src/Untappd.Net/Responses/Actions/PendingFriends.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RestSharp; +using Untappd.Net.Request; + +namespace Untappd.Net.Responses.Actions +{ + public class PendingFriends : IAction + { + public Method RequestMethod { get; private set; } + 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 int? Offset { get; set; } + public int? Limit { get; set; } + public PendingFriends() + { + + } + } +} diff --git a/src/Untappd.Net/Responses/Actions/ToastUntoast.cs b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs index 39d43d5..19d5640 100644 --- a/src/Untappd.Net/Responses/Actions/ToastUntoast.cs +++ b/src/Untappd.Net/Responses/Actions/ToastUntoast.cs @@ -10,7 +10,7 @@ namespace Untappd.Net.Responses.Actions public Method RequestMethod { get; private set; } public IDictionary BodyParameters { get; private set; } public string CheckinId { get; private set; } - public string EndPoint { get { return string.Format(" /v4/checkin/toast/{0}", CheckinId); } } + public string EndPoint { get { return string.Format("v4/checkin/toast/{0}", CheckinId); } } /// /// /// diff --git a/src/Untappd.Net/SingleObjectArrayConverter.cs b/src/Untappd.Net/SingleObjectArrayConverter.cs index cbfc17e..1d5ce7b 100644 --- a/src/Untappd.Net/SingleObjectArrayConverter.cs +++ b/src/Untappd.Net/SingleObjectArrayConverter.cs @@ -1,6 +1,5 @@ using System; using Newtonsoft.Json; -using Untappd.Net.Request; namespace Untappd.Net { diff --git a/src/Untappd.Net/Untappd.Net.csproj b/src/Untappd.Net/Untappd.Net.csproj index 27f251b..f79e080 100644 --- a/src/Untappd.Net/Untappd.Net.csproj +++ b/src/Untappd.Net/Untappd.Net.csproj @@ -50,6 +50,9 @@ + + + @@ -82,9 +85,7 @@ - - - +