PeterCat12 / pysmash

A python wrapper to smash.gg Developer API
22 stars 11 forks source link

Problems with players without contact info #44

Closed CoinOperatedGadget closed 6 years ago

CoinOperatedGadget commented 6 years ago

Hey, some of the tournaments in our region use Smash.gg with on site tournament registration, and some of the players don't have any contact info. This causes issues when I try any of the show player calls. An example of such a tournament is ID 2927.

petercat23 commented 6 years ago

@gatesnp Appreciate it! Are all player calls affected or only a subset? Also, if you wouldn't mind providing stack traces that would be appreciated!

CoinOperatedGadget commented 6 years ago

Sure thing, I'll get you the stack trace when I'm back on my home PC tonight. The function call was erroring out in the Utils.py file where it was trying to receive contactInfo from the dictionary iirc.

petercat23 commented 6 years ago

Ah. I'm probably just trying to access a key with [] instead of get like a noob. I will try to fix tonight.

In addition, if you have any feedback on the API, want more or clearer functionality let me know. I keep telling @LuNoX I will get around to his opened issues (and I promise I will!!!) but stuff just keeps coming up.

CoinOperatedGadget commented 6 years ago

Yeah, that's it, it was throwing the error on the if statement on line 24.

Will do in the future, using your library to bake in Smash.gg support to our current tools as we're moving to Smash.gg from Challonge for bigger events.

PeterCat12 commented 6 years ago

Can I ask what your needs are? I am currently beta testing a project that does tournament result imports from both challonge and smashgg (using this library for the smash gg imports.)

Panda Global currently uses that app to do their Power rankings for Super Smash Brothers WiiU https://panda.gg/

I could always use more testers :) (and Also collaborators. The project is getting a little big just for myself to handle)

On Wed, Nov 1, 2017 at 10:32 AM, gatesnp notifications@github.com wrote:

Yeah, that's it, it was throwing the error on the if statement on line 24.

Will do in the future, using your library to bake in Smash.gg support to our current tools as we're moving to Smash.gg from Challonge for bigger events.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PeterCat12/pysmash/issues/44#issuecomment-341141967, or mute the thread https://github.com/notifications/unsubscribe-auth/AH5MN6sluQLYGbT7iHLzUFo-kl02AO4iks5syI8NgaJpZM4QNvIS .

CoinOperatedGadget commented 6 years ago

I have two separate projects right now. One just builds a database of sets and any details I can grab from them and throws them into a database (and runs an ELO calculation on them for good measure).

The second is a stream helper that I'm baking in Challonge/Smash.gg support for convenience when we're streaming. I've also connected it to the database from the other project to be able to give info to the streamer about the players in real time (hopefully adding other info to the database in the future like twitters, mains and such).

PeterCat12 commented 6 years ago

Your first project just has Challonge support, correct? Can I ask how you handle linking players across tournaments? Basically my app does the same thing (except I use glicko2 for rankings, though that isn't completely functional yet) but was designed for a TO (tournament organizer) to have a complete history of tournament results for players (independent of smashGG and challonge. i.e. you can link player records to tournament participants across both platforms).

Second project sounds dope as fuck. Is it open source?

On Wed, Nov 1, 2017 at 10:50 AM, gatesnp notifications@github.com wrote:

I have two separate projects right now. One just builds a database of sets and any details I can grab from them and throws them into a database (and runs an ELO calculation on them for good measure).

The second is a stream helper that I'm baking in Challonge/Smash.gg support for convenience when we're streaming. I've also connected it to the database from the other project to be able to give info to the streamer about the players in real time (hopefully adding other info to the database in the future like twitters, mains and such).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PeterCat12/pysmash/issues/44#issuecomment-341147676, or mute the thread https://github.com/notifications/unsubscribe-auth/AH5MNxovmjVx_-mR9gXHLo1T8YlJQFFdks5syJNTgaJpZM4QNvIS .

CoinOperatedGadget commented 6 years ago

Currently I use pychal (https://pypi.python.org/pypi/pychal/1.8.0) for Challonge support, for linking players I basically just have an alias file that the TO (or myself) would provide to link players that like to use different tags in tournaments. Currently I rely on consistency between tags and no duplicates (which is okay for my use as it's just my own region, Central/Western NY, atm). It probably wouldn't work well on a large scale due to people using the same tags, along with keeping track of every tag every player uses.

That's basically what I'm doing with my second project, I have all the data in the database, and it lists the current players set history with each other. Currently adding notable wins (based on ELO) for each player along as far as that goes. I wasn't going to bother putting it up on github when I started the stream helper, but I might now since it grew in scope.

PeterCat12 commented 6 years ago

@gatesnp Have you been able to tell if contact info has simply been removed from the API response from smashGG or do some players still have it? This project's test suite is failing in places where they once were passing because of that.

PeterCat12 commented 6 years ago

Ah... It seems that contact info block has been removed from the smashgg api. Instead of nameFirst and nameList being included in the response there is now just a singular name field. I will hand that accordingly. I will keep the response from this API consistent and still return fname, lname

PeterCat12 commented 6 years ago

@gatesnp I'm going to close this issue. I have no upgrade the pypi package (on my way out the door) but will do so tonight. Master Branch, however, is updated.

CoinOperatedGadget commented 6 years ago

Sorry, just got home, haven't been able to look at it yet, but it looks like you got it. Will pick up the change once it's in. Thank you very much!

mingeek commented 6 years ago

I'm working on the exact same project that you guys are talking about (Michigan TO here), as is my friend in Ohio. Would you guys want to collaborate on a larger open source project to scrape and record data? I'm not sure where you're from @peter, but I'm definitely looking to put together a database that spans the Midwest and hopefully hits Tri-state.

mingeek commented 6 years ago

Also, there's a Smash.GG discord specifically for developers and tournament organizers. I don't think I'm allowed to publicly post it, but if you guys shoot me a PM or email I think you would both find it pretty helpful (unless you're already in there). I asked some of the exact same questions you guys were thinking about here over there literally within the past week.

PeterCat12 commented 6 years ago

@mingeek Do you have an email address I could reach you at? I would love to work on something. I've actually been debating to open source my current project (Django app, already up and running as used for Panda Global's Smash4 power rankings. I do not have a front end though but the back end has been working solidly for about a year now).

PeterCat12 commented 6 years ago

@mingeek Also, I'm from Chicago :)

CoinOperatedGadget commented 6 years ago

@mingeek I'm from Central NY (Syracuse) and I'd like to join that discord if I'm allowed to. I'll send you a PM.

EDIT: I forgot that github doesn't do PMs.

mingeek commented 6 years ago

mingeek@umich.edu