From 96d44bc8a0eaff83ff2b92375404d30458191789 Mon Sep 17 00:00:00 2001 From: rodkings Date: Tue, 21 Apr 2015 13:07:50 -0600 Subject: [PATCH] merge --- .../Request/AuthenticatedRequest.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Untappd.Net/Request/AuthenticatedRequest.cs b/src/Untappd.Net/Request/AuthenticatedRequest.cs index 0f766bb..ea1561f 100644 --- a/src/Untappd.Net/Request/AuthenticatedRequest.cs +++ b/src/Untappd.Net/Request/AuthenticatedRequest.cs @@ -1,4 +1,8 @@ -using Untappd.Net.Exception; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; namespace Untappd.Net.Request { @@ -6,17 +10,18 @@ namespace Untappd.Net.Request { protected abstract string _EndPoint { get; } /// - /// Pass in the url parameter into the request...ie username, brewery, etc. + /// Pass in the parameter into the request...ie username, brewery, etc. /// - /// this can be null if request has no url params + /// /// - internal string EndPoint(string parameter) + internal string EndPoint(string parameter = "") { - if (string.IsNullOrWhiteSpace(_EndPoint)) + if (!String.IsNullOrEmpty(parameter)) { - throw new EndpointConfigurationException(); + parameter = string.Format("/{0}", parameter); + return string.Format(_EndPoint, parameter); } - return string.Format(_EndPoint, parameter); + return string.Format(_EndPoint, string.Empty); } } }