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

Feature request: add optional URL parameter to take a role #129

Open
ZetaTwo opened this issue Dec 5, 2024 · 3 comments · May be fixed by #130
Open

Feature request: add optional URL parameter to take a role #129

ZetaTwo opened this issue Dec 5, 2024 · 3 comments · May be fixed by #130

Comments

@ZetaTwo
Copy link

ZetaTwo commented Dec 5, 2024

I'm working on some ideas around tournament management and it would be nice to be able to give the players a link that immediately puts them in the host/guest seat (if available). Either it could be implemented similarly to the spectate URL, so something like /host/:draftId and /guest/:draftId or it could be a query parameter on the draft like /draft/:draftId?role=host or /draft/:draftId?role=guest. Either way, the app should apply the role (if available) redirect or change the URL so that if they copy the URL from the browser, it is now just the regular draft URL.

@ZetaTwo
Copy link
Author

ZetaTwo commented Dec 5, 2024

I should also add that I would be willing to implement this if this feature is deemed something you want.

@HSZemi
Copy link
Member

HSZemi commented Dec 7, 2024

I could have sworn that was a thing already. Anyway: Something similar to the SpectateDraft component would probably be easiest.

I would not add those urls to the Host/Guest/Spec selection screen, because I imagine players could pick the wrong one by accident (for example share the host link while they themselves elected to become host). The generic mechanism works well already anyway for when players set up the draft themselves.

I imagine your request is for programmatically created drafts, so this should not matter for your use case.

@ZetaTwo
Copy link
Author

ZetaTwo commented Dec 7, 2024

I could have sworn that was a thing already. Anyway: Something similar to the SpectateDraft component would probably be easiest.

Sounds great. So basically just copy that but set it to host/guest?

I would not add those urls to the Host/Guest/Spec selection screen, because I imagine players could pick the wrong one by accident

I agree, it's probably nice to add them to the API documentation though so that people can discover their existence.

I imagine your request is for programmatically created drafts, so this should not matter for your use case.

Correct

ZetaTwo added a commit to ZetaTwo/aoe2cm2 that referenced this issue Dec 8, 2024
ZetaTwo added a commit to ZetaTwo/aoe2cm2 that referenced this issue Dec 8, 2024
@ZetaTwo ZetaTwo linked a pull request Dec 8, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants