Kanin / PyPixel

A Python Wrapper for The Hypixel API
MIT License
10 stars 2 forks source link

Fix hasPaid #9

Closed destruc7i0n closed 7 years ago

destruc7i0n commented 8 years ago

Do a simple test for if there is an error from the string, what do you think @yrsegal ? (The old API went down D:)

yrsegal commented 8 years ago

the CI appears to be complaining about the fact that... the test isn't working, but the actual code is. >.>

yrsegal commented 8 years ago

also, don't use urlopen. Use curl, based on the newest system, to fetch all urls.

ttofis commented 8 years ago

Why not try to get a uuid. If it fails, just say that the man doesn't have a paid account. Or if that doesn't work something from here might work https://sessionserver.mojang.com/session/minecraft/profile/

ttofis commented 8 years ago

Oh, just saw the code again. You have already done this.

destruc7i0n commented 8 years ago

I'll make an edit.

destruc7i0n commented 8 years ago

Wait, doesn't "urlopen" go to curl? I can change it if you like but I don't deem it necessary.

ttofis commented 8 years ago

Not automatically. Just follow the other places that use curl and use curl too. For the sake of version agnostic.

yrsegal commented 8 years ago

curl is a lambda function I added, that wraps urlopen for version safety.