* Apply new id naming
* Fix failing CI on all features
* Update changelog
* Rename tf2 example to teamfortress2
* Fix typo in steamapp game names
* Rename minecraft legacy versions
* Apply CI node badge fix by Douile
* Add/Update badge
---------
Co-authored-by: GitHub Action <action@github.com>
* Add retry count to TimeoutSettings
This can be used to specify how many times to re-send requests that
fail. The default value is "1" so the if the first request fails, 1 more
attempt will be made.
* Add retries to valve queries
* [Protocol] &Optional<TimeoutSettings> add get_retries_or_default
Allow fetching the number of retries or the default retries value from a
borrowed optional TimeoutSettings.
* [Protocol] Add retries to minecraft protocol
* [Protocol] Add retries to quake
* [Protocol] Add retries to gamespy
* [Protocol] Update TimeoutSettings docs, and change default retries to 0
* Remove logging from retry_on_timeout
* [Protocol] TimeoutSettings make retries non-optional
* [Protocol] Move retry logic into lower level query functions
Retries are now implemented as wrappers on the single function that
would need to be retried on timeout.
In order to avoid cloning of TimeoutSettings, Socket::apply_timeouts()
was changed to accept a borrowed TimeoutSettings. And extra helpers were
added to the TimeoutSettings impl to reduce repetition.
* [Examples] Add retries to the generic example
* Also retry on PacketSend error
Sending packets could also timeout and until error_generic_member_access
is stable we have no way of determining the type of the underlying
`std::error::Error`.
* Add retry unit tests
* [Docs] Update changelog
* [Games] Update game definitions to match node-gamedig names
* Update game file names to match definitions
* [Games] rename minecraft definitions to better match node
* [Games] Add test that all game files match definition name
* Update SteamApp to match node names
* [Games] Update the forest to match node-GameDig#367
* Clippy fix in games test
* [Docs] Update GAMES.md with new names
* [DOCS] Update changelog
* [Generic] Add struct for all extra request settings
Adds a new struct `ExtraRequestSettings` that contains all possible
extra settings for all protocols, and can be implicitly converted with
`.into()` into each protocol's extra settings type.
This is then used in a new query method
`query_with_timeout_and_extra_settings()` that passes the object on to
the selected protocol.
This also updates the generic example to set some of these generic
settings so that it can be used for certain queries like
"mc.hypixel.net".
* [Minecraft] Add `request_settings` parameter to auto query
This allows generic queries to pass through request settings when using
the `mc` game so that servers like `mc.hypixel.net` will still work when
using auto query.
* Fix generic examples tests (and enable example tests in pre-commit)
* Implement generic response as enum
* First draft of implementing into_common()
* Make common response type generic
* Use macros and generics to reduce repetition
* [Games] Add dynamically dispatched CommonResponse trait
This adds two traits: "CommonResponse", and "CommonPlayer", when the
generic game query function returns a response it returns a pointer to
its original response type that implements "CommonResponse".
Both common traits require that "as_original()" be implemented, this
returns an enum containing a pointer to the original type.
Both traits have a concrete method "as_json()" that returns a struct
containing data fetched from all of its methods as. This struct
implements serde and can hence be serialized as required.
The traits require a few other methods be implemented, those being the
fields that are common across all types. All other methods have a
default None implementation so that each response type only needs to
implement methods for fields that it has.
* [Game] Implement common traits for JCMP2 response
* [Fmt] Run cargo fmt
* Fix doctest failing
* Run cargo fmt
* Define games as structs
* Create table of response types
* Ensure serde is always included
* Remove server_ prefix in GenericResponse
* Make players online/max non-optional in generic response
* Use already existing minecraft server enum
* Implement ExtraResponses to prevent cloning when creating generic
* Add game definitions
* Add doc comments to generic types
* Include players in gamespy extra responses
* Add custom response types for TheShip and FFOW
* Cargo format differing files
* Final cleanup