eklypss / PUBGSharp

C# wrapper for PUBG stats API
25 stars 14 forks source link

No way to filter by game mode, resulting in unneeded data #20

Open skmagiik opened 6 years ago

skmagiik commented 6 years ago

GetPlayerStatsAsync cannot accept more than region for filtering. Should allow for gamemode and season filtering. Would be easy to implement.

eklypss commented 6 years ago

It's because the API (pubgtracker) itself only takes the region as a parameter, which then returns all the data regardless of gamemode/season. I originally wanted to keep it "native" and not add extra filtering there, but I see your point.

This could be added, but in the end it just removes few simple LINQ queries from the end-user code, but I can take a look at it later anyway.

skmagiik commented 6 years ago

https://pubgtracker.com/site-api

Get PUBG Player Stats

GET https://api.pubgtracker.com/v2/profile/pc/{pubg-nickname}

This will get all the stats for the current season. You may get more data by using filters. season, mode, region

Seasons

2017-pre1 2017-pre2 2017-pre3 2017-pre4 2017-pre5 Regions

na eu as oc sa sea krjp Modes

solo duo squad solo-fpp duo-fpp squad-fpp Example Query

https://api.pubgtracker.com/v2/profile/pc/VissGames?region=na&season=2017-pre4

skmagiik commented 6 years ago

See comment above, it supports this now, maybe there was a change after you did so originally

eklypss commented 6 years ago

Yeah I don't think that was there back when I originally started working on this, definitely will add those features soon. Thanks for informing.

ghost commented 6 years ago

its more than you think. The APi needs to be updated to v2 .

i'm currently starting working on it.

ghost commented 6 years ago

Updated. Also made a pull request to search for a specific value.

ghost commented 6 years ago

Now we all need is an updated NuGet package. Really big Kudos to you guys keeping this as good as possible! 👍