TwitchPlaysBF2 / BF2Dashboard

BF2.TV - a social web platform around the game Battlefield 2 (also available for Windows)
https://bf2.tv
9 stars 3 forks source link

feat: Use playerpath.link for player stats profile links #60

Closed cetteup closed 2 weeks ago

cetteup commented 2 weeks ago

Dynamically route to player's profile instead of always linking to BF2Hub.com, even for non-BF2Hub players.

playerpath.link is a simple frontend for playerpath's API, which uses data from bf2opendata. The site simply looks up which provider a player is using and (if possible) redirects the user to the relevant provider's website. Currently supports B2BF2, PlayBF2 and BF2Hub. OpenSpy doesn't have any form of stats and thus no site to redirect to.

Examples:

TwitchPlaysBF2 commented 2 weeks ago

Very cool! Cheers!

TwitchPlaysBF2 commented 2 weeks ago

@cetteup How does it know which PID belongs to which provider? Attempts a lookup? Some specific prefix? Length?

cetteup commented 2 weeks ago

@TwitchPlaysBF2 I import the data from bf2opendata, which has accounts from all providers. The players I contribute there are simply detected playing online and then checked against each provider. If a provider returns data for a pid, it's added with that provider (and I later export it to bf2opendata).