Skip to content

Commit

Permalink
Removed redundant error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
anderj017 committed Mar 1, 2015
1 parent 13864ff commit f32708a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions PinnacleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public PinnacleClient(string clientId, string password, string currencyCode, Odd
// put auth header into httpclient
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(
Encoding.ASCII.GetBytes(string.Format("{0}:{1}", _clientId, _password))));
Encoding.ASCII.GetBytes(string.Format("{0}:{1}",
, _password))));
}

protected T GetXmlAsync<T>(string requestType, params object[] values)
Expand Down Expand Up @@ -115,16 +116,6 @@ protected bool IsFairFeedRequest(long lastTimestamp)

protected Feed GetFeed(int sportId, int[] leagueIds, OddsFormat format, string currency, long lastTimestamp, int isLive)
{
if (string.IsNullOrWhiteSpace(_clientId))
{
throw new Exception("Client ID is mandatory when requesting feeds");
}

if (string.IsNullOrWhiteSpace(_password))
{
throw new Exception("Password is mandatory when requesting feeds");
}

if (!IsFairFeedRequest(lastTimestamp))
throw new Exception(
string.Format(
Expand Down

0 comments on commit f32708a

Please sign in to comment.