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

Request lobby list with filters #217

Open
BigETI opened this issue Feb 21, 2021 · 1 comment
Open

Request lobby list with filters #217

BigETI opened this issue Feb 21, 2021 · 1 comment
Labels
API enhancement improvement of any kind good first issue Good for newcomers hacktoberfest Good first issue for hacktoberfest!

Comments

@BigETI
Copy link
Member

BigETI commented Feb 21, 2021

Right now you just get a list of public lobbies, that means that it is possible to get lobbies you are not really interested in. So a solution for reducing output would be to specify search filters.

One solution and the easiest would be to just specify fields as an object and provide values for comparison.

Example from one of my projects : https://github.com/BigETI/ElectrodZMultiplayer/wiki#listlobbies

Another solution would be to use a language that has been designed for this kind of problem like for example GraphQL: https://graphql.org/code/#go

@Bios-Marcel Bios-Marcel added enhancement improvement of any kind API labels Feb 21, 2021
@Bios-Marcel
Copy link
Member

The idea is to do this in a simple way. Using something like GraphQL for one filtering endpoint would definitely be overkill.

https://github.com/scribble-rs/scribble.rs/wiki/API-Docs#v1lobby---get-request should be extended with a JSON body that contains a filter field with sub-fields for desired filters, such as public: bool and game_state: bool. This can easily be extended in the future.

This should get some unit tests though :)

@Bios-Marcel Bios-Marcel added good first issue Good for newcomers hacktoberfest Good first issue for hacktoberfest! labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement improvement of any kind good first issue Good for newcomers hacktoberfest Good first issue for hacktoberfest!
Projects
None yet
Development

No branches or pull requests

2 participants