diff --git a/README.md b/README.md new file mode 100644 index 0000000..1eb2ecc --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# C# Wrapper for the PinnacleSports API + +A complete API client that builds on the PinnacleSports API Documentation + +I have cleaned up and extended the wrapper created by Nuno Freitas to support the JSON functions (GetClientBalance, PlaceBet, GetLine, GetBets, GetInRunning). + +Usage: + +Here's an example of getting all lines for upcoming E-Sports matches (across all E-Sports leagues): + + var client = new PinnacleClient("username", "password", "AUD", OddsFormat.Decimal); + var leagues = client.GetLeagues(12); // 12 is the E-Sports Sport Id. Use GetSports() to find others. + var feed = client.GetFeed(12, leagues.Select(x => x.Id).ToArray()); + +Refreshing lines: + +According to the Pinnacle API Fair Use Policy GetFeed can be called every 5 seconds when supplying the timestamp parameter that's returned from GetFeed or every 60 seconds otherwise. + +Example (continuing from above): + + Thread.Sleep(5000); // wait 5 seconds between calls! + var newFeed = client.GetFeed(12, leagues.Select(x => x.Id).ToArray(), feed.Timestamp); + +Enjoy!