Skip to content

Commit

Permalink
Fixed incorrect property name of WinRiskType, PlaceBet now working. M…
Browse files Browse the repository at this point in the history
…oved data types and enums into folders.
  • Loading branch information
anderj017 committed Mar 29, 2015
1 parent 569c771 commit d11a9e3
Show file tree
Hide file tree
Showing 39 changed files with 106 additions and 97 deletions.
3 changes: 2 additions & 1 deletion Bet.cs → Data/Bet.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using Newtonsoft.Json;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class Bet
{
Expand Down
2 changes: 1 addition & 1 deletion BetAmount.cs → Data/BetAmount.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
public class BetAmount
Expand Down
2 changes: 1 addition & 1 deletion ClientBalance.cs → Data/ClientBalance.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class ClientBalance
{
Expand Down
2 changes: 1 addition & 1 deletion CurrenciesResponse.cs → Data/CurrenciesResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("rsp")]
Expand Down
2 changes: 1 addition & 1 deletion Currency.cs → Data/Currency.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("currency")]
Expand Down
3 changes: 2 additions & 1 deletion Event.cs → Data/Event.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("event")]
Expand Down
2 changes: 1 addition & 1 deletion FeedResponse.cs → Data/FeedResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("rsp")]
Expand Down
2 changes: 1 addition & 1 deletion FeedSport.cs → Data/FeedSport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("sport")]
Expand Down
2 changes: 1 addition & 1 deletion GetBetsResponse.cs → Data/GetBetsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class GetBetsResponse
{
Expand Down
3 changes: 2 additions & 1 deletion GetInRunningResponse.cs → Data/GetInRunningResponse.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Newtonsoft.Json;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class GetInRunningResponse
{
Expand Down
3 changes: 2 additions & 1 deletion GetLineResponse.cs → Data/GetLineResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using Newtonsoft.Json;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class GetLineResponse
{
Expand Down
2 changes: 1 addition & 1 deletion League.cs → Data/League.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("league")]
Expand Down
2 changes: 1 addition & 1 deletion LeaguesResponse.cs → Data/LeaguesResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("rsp")]
Expand Down
2 changes: 1 addition & 1 deletion MoneyLine.cs → Data/MoneyLine.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("moneyLine")]
Expand Down
2 changes: 1 addition & 1 deletion Period.cs → Data/Period.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("period")]
Expand Down
5 changes: 3 additions & 2 deletions PlaceBetRequest.cs → Data/PlaceBetRequest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System;
using Newtonsoft.Json;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class PlaceBetRequest
{
Expand All @@ -14,7 +15,7 @@ public class PlaceBetRequest
[JsonProperty(PropertyName = "customerReference")] // not required
public string CustomerReference;

[JsonProperty(PropertyName = "ODDS_FORMAT")]
[JsonProperty(PropertyName = "oddsFormat")]
public OddsFormat OddsFormat;

[JsonProperty(PropertyName = "stake")]
Expand Down
5 changes: 3 additions & 2 deletions PlaceBetResponse.cs → Data/PlaceBetResponse.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using System;
using Newtonsoft.Json;
using PinnacleWrapper.Enums;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
public class PlaceBetResponse
{
[JsonProperty(PropertyName = "status")]
public PlaceBetResponseStatus Status;

[JsonProperty(PropertyName = "errorCode")] // If Status is PROCESSED_WITH_ERROR, errorCode will be in the response.
public PlaceBetErrorCode ErrorCode;
public PlaceBetErrorCode? ErrorCode;

[JsonProperty(PropertyName = "betId")] // The bet ID of the new bet. May be empty on failure.
public int? BetId;
Expand Down
2 changes: 1 addition & 1 deletion ResponseError.cs → Data/ResponseError.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("err")]
Expand Down
2 changes: 1 addition & 1 deletion Sport.cs → Data/Sport.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("sport")]
Expand Down
2 changes: 1 addition & 1 deletion SportsResponse.cs → Data/SportsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("rsp")]
Expand Down
2 changes: 1 addition & 1 deletion Spread.cs → Data/Spread.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("spread")]
Expand Down
2 changes: 1 addition & 1 deletion Team.cs → Data/Team.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
public class Team
Expand Down
2 changes: 1 addition & 1 deletion XmlResponse.cs → Data/XmlResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Xml.Serialization;

namespace PinnacleWrapper
namespace PinnacleWrapper.Data
{
[Serializable]
[XmlRoot("rsp")]
Expand Down
2 changes: 1 addition & 1 deletion BetListType.cs → Enums/BetListType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
public enum BetListType
{
Expand Down
2 changes: 1 addition & 1 deletion BetStatus.cs → Enums/BetStatus.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum BetStatus
Expand Down
2 changes: 1 addition & 1 deletion BetType.cs → Enums/BetType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum BetType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum GetLineResponseStatus
Expand Down
2 changes: 1 addition & 1 deletion InRunningState.cs → Enums/InRunningState.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
public enum InRunningState
{
Expand Down
12 changes: 6 additions & 6 deletions OddsFormat.cs → Enums/OddsFormat.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum OddsFormat
{
American,
Decimal,
HongKong,
Indonesian,
Malay,
AMERICAN,
DECIMAL,
HONGKONG,
INDONESIAN,
MALAY,
Fraction
}
}
2 changes: 1 addition & 1 deletion PlaceBetErrorCode.cs → Enums/PlaceBetErrorCode.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum PlaceBetErrorCode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum PlaceBetResponseStatus
Expand Down
2 changes: 1 addition & 1 deletion SideType.cs → Enums/SideType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum SideType
Expand Down
2 changes: 1 addition & 1 deletion Status.cs → Enums/Status.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
public enum Status
{
Expand Down
2 changes: 1 addition & 1 deletion TeamType.cs → Enums/TeamType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum TeamType
Expand Down
6 changes: 3 additions & 3 deletions WinRiskType.cs → Enums/WinRiskType.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PinnacleWrapper
namespace PinnacleWrapper.Enums
{
[JsonConverter(typeof(StringEnumConverter))]
public enum WinRiskType
{
Win,
Risk
Risk,
Win
}
}
1 change: 1 addition & 0 deletions Feed.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using PinnacleWrapper.Data;

namespace PinnacleWrapper
{
Expand Down
1 change: 1 addition & 0 deletions FeedLeague.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using PinnacleWrapper.Data;

namespace PinnacleWrapper
{
Expand Down
Loading

0 comments on commit d11a9e3

Please sign in to comment.