cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
544 stars 183 forks source link

Add back functionality to pull owner names #497

Open johnny-papercut opened 8 months ago

johnny-papercut commented 8 months ago

Sport

Football

Summary

After updating to 0.33.0, it seems like owners are now represented by their ID and not their human-readable names.

Can owner names be surfaced again?

Kjeldgaard commented 8 months ago

You can find inspiration here https://github.com/cwendt94/espn-api/pull/487#issuecomment-1782273387, on how to get owner names.

cwendt94 commented 8 months ago

Yeah, I will look to adding it back in the new couple days. ESPN had to mess up their data for a little and removed it, but of course now they added it back.

joeyagreco commented 7 months ago

Commenting for visibility. Updating to version 0.33.0 broke functionality in a library of mine sadly :/

AttributeError: 'Team' object has no attribute 'owner'. Did you mean: 'owners'?

cwendt94 commented 7 months ago

Owners is back in v0.34.0, format is a little different as they removed owner names in public leagues.

Team.owners will now be an array of dict. It will look like

[{ id: '1234', displayName: 'team', firstName: 'Bob', lastName: 'Joe'}]

However in public leagues, the name attributes will not be populated.