merge
This commit is contained in:
@@ -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; }
|
||||
/// <summary>
|
||||
/// Pass in the url parameter into the request...ie username, brewery, etc.
|
||||
/// Pass in the parameter into the request...ie username, brewery, etc.
|
||||
/// </summary>
|
||||
/// <param name="parameter">this can be null if request has no url params</param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user