Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Endpoint #97

Closed
SirLouen opened this issue Jul 2, 2024 · 1 comment
Closed

Switch Endpoint #97

SirLouen opened this issue Jul 2, 2024 · 1 comment

Comments

@SirLouen
Copy link

SirLouen commented Jul 2, 2024

It would be great to have a way to switch endpoint using RoyaleAPI Proxy instead of the official endpoint specially when working under development environment https://docs.royaleapi.com/proxy.html

In https://github.com/AndreVarandas/clash-royale-api/blob/0c969313fc8437628bbcfa87f27e9008605e3b8d/src/constants/index.ts

AndreVarandas added a commit that referenced this issue Sep 13, 2024
the user can now provide a proxy url to the library

#97
@AndreVarandas
Copy link
Owner

Hi, thank you for your valuable suggestion. This was implemented with version 2.1.0.

You now use it like this:

const api = new ClashRoyaleAPI(
  'the token you got from the api',
  'https://proxy.royaleapi.dev/v1',
)

I'm now closing the issue but please feel free to re-open it if something is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants