MaciejGorczyca / ChallengesAreEvil

Remove your challenge tokens from profile banner with 1-click-button solution.
202 stars 12 forks source link

Thanks! And a question on the /lol-challenges/v1/update-player-preferences/ endpoint #5

Closed mikemwang closed 2 years ago

mikemwang commented 2 years ago

Thanks for this much-needed service and beautifully written code!

I had a question about the implementation: according to the API docs the /lol-challenges/v1/update-player-preferences/{product} endpoint requires a product parameter, and I can't figure out how you retrieve and use that parameter in your code, or get around not having it. It would appear that the Post method in the LeagueConnection class simply omits this parameter, but just omitting the parameter doesn't work when I attempt to use the same endpoint via curl. Any clarity here would be much appreciated!

MaciejGorczyca commented 2 years ago

Hey. I followed the instructions from this post. For reading API endpoints/data you can use the LCU Explorer which is updated version of Rift Explorer.

For the endpoint, I'm calling a single URL. Here is the line. https://github.com/MaciejGorczyca/ChallengesAreEvil/blob/182de5be5075e9c7511c7c3ea981647c71073494/ChallengesAreEvil/ChallengesAreEvil.cs#L50

Basically I'm overwriting challengeIds array to nothing. I don't retrieve any data, I'm simply telling the client "set challenge tokens to nothing" and that's all.

If something is still not clear let me know.

MaciejGorczyca commented 2 years ago

Closing due to inactivity.