harveysburger / pinnaclewrapper

A C# Wrapper for the PinnacleSports API
25 stars 56 forks source link

Pinnacle / PS3838 should be the same #9

Open Eliakos opened 5 years ago

Eliakos commented 5 years ago

Hello,

https://www.ps3838.com/en/euro/ is owned by Pinnacle and they talk about the API here
https://www.ps3838.com/static/index.php/en-us/help/api-user-guide-en-us#getting-started which is a little dated (2016).

The question is : does the C# Wrapper for the PinnacleSports API (https://github.com/harveysburger/pinnaclewrapper) works with ps3838 too ?

Kind Regards

harveysburger commented 5 years ago

Yes works with both, except the default URL points to api.pinnacle.com, you just have to overwrite to https://api.ps3838.com

harveysburger commented 5 years ago

If you use the HttpClientFactory just pass "https://api.ps3838.com" to the optional baseAddress parameter

var httpClient = HttpClientFactory.GetNewInstance("username", "password", "https://api.ps3838.com");

harveysburger commented 5 years ago

The other caveat is some of the api end points between the two aren't the same, I modified the Wrapper so it defaults to pinnacle.com s end points but you can override that for whatever ps3838 needs when creating a GetOddsRequest or GetFixturesRequest

Pinnacle uses v1 while ps3838 has v2 or v3 ... Forgot exactly but can find out if you need

harveysburger commented 5 years ago

Actually scratch my last comments about the versions, based on the api doc you pasted above it looks like the api end points are aligned now... They also use v1 according to the doc,

Let me know if you run into any issues

Eliakos commented 5 years ago

Thank you harveysburger, this looks like good news if both sides works well well with your project i just discovered (so i didn't dive into it yet).

So i can forget this comment too ? "The other caveat is some of the api end points between the two aren't the same, I modified the Wrapper so it defaults to pinnacle.com s end points but you can override that for whatever ps3838 needs when creating a GetOddsRequest or GetFixturesRequest"

harveysburger commented 5 years ago

Ya probably that comment doesn't apply, though keep it in mind if you run into issues,

Eliakos commented 5 years ago

Thanks, noted. As a side note for future releases, is it possible to have a central place where we can easily define/customize one or the other as the targeted "platform"?