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

Add a command to check the status of a current match by discord user id #7

Open
B3none opened this issue Apr 1, 2020 · 7 comments
Open
Labels
enhancement New feature or request

Comments

@B3none
Copy link
Member

B3none commented Apr 1, 2020

It'll require an endpoint on the backend but I think it would be nice to add a command for this as people in the current queue might want to know how long they will be waiting for players in that match to join.

@cameronshinn
Copy link
Member

cameronshinn commented Apr 2, 2020

In the API could this become an extension of in_match? Instead of having this function return a boolean, we can have it return the player's match if they are in one, otherwise return None. This way the return value can be treated like a boolean (and is functionally the same), but can also be used to get the match object.

EDIT: Oops I was thinking we had an in_match function, but the one I linked is is_linked. I realize we check if they are in a match from their profile object.

@cameronshinn cameronshinn added the enhancement New feature or request label Apr 2, 2020
@B3none
Copy link
Member Author

B3none commented Apr 2, 2020

I could alter the existing inMatch response to return either false OR an object for the current the current map of their game if they’re in one. Would that help?

The only problem is that then the player response becomes quite bloated. I think it’d be easier to get a match by someone’s discord Id in a separate endpoint.

@cameronshinn
Copy link
Member

Yeah I think having a separate endpoint would probably be best.

As a side note, in the player object we could replace inMatch with current_match which is either null or the match ID. More informative that way.

@WardPearce
Copy link

Could introduce a matches route what allows you to pull multiple matches based off your desired parameters, if no parameters given just return X amount of the latest matches.

This would allow you to find matches based off Discord IDs, Match IDs etc..

@cameronshinn
Copy link
Member

Could introduce a matches route what allows you to pull multiple matches based off your desired parameters, if no parameters given just return X amount of the latest matches.

This would allow you to find matches based off Discord IDs, Match IDs etc..

Yeah this could be a good all-in-one solution. Get an active match by player ID, steam ID, match ID.

@B3none
Copy link
Member Author

B3none commented Apr 3, 2020

Okay, I'll implement and endpoint on the web and let you know when it's merged.

@B3none
Copy link
Member Author

B3none commented Apr 3, 2020

Could introduce a matches route what allows you to pull multiple matches based off your desired parameters, if no parameters given just return X amount of the latest matches.

This would allow you to find matches based off Discord IDs, Match IDs etc..

I would probably steer away from this because I don't want one jack of all trades style endpoint if I can help it. My only exception to this would be if we switched over to using a GraphQL API.

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

No branches or pull requests

3 participants