* Give tungstenite types distinct names
* reorganize files
* Better feature locking, add wasm.rs
* Implement wasm Backend
* add wasm-bindgen-test
* Build & Test for wasm
* Add macos safari wasm test
* Add wasm32 target
* Add wasm.rs test
* Move wasm-pack installation before test execution
* Fix build on wasm32
* Fix examples depending on tokio::time
* fix clippy warn
* Add example wasm bindgen test
* Add wasm-bindgen to Cargo.toml
* Add wasm test configuration
* Install wasm-bindgen-cli on linux
* Add wasm-bindgen-cli to macos
* Correct "vers" to "version"
* Attempt to locate correct geckodriver
* Run wasm tests first
* maybe this will fix ci :clueless:
* Move wasm-bindgen-cli install
* Add cargo-binstall installation script for
wasm-bindgen-cli
* Try using only one browser
* remove geckodriver
* Move all wasm related tests to macos
* Rename macOS test step for clarity
* Try out combined coverage report
* try different strategy to skip coverage on forks
* Revert "try different strategy to skip coverage on forks"
This reverts commit fb46ab83ac.
* Revert "Try out combined coverage report"
This reverts commit d34a813d8a.
* Rename limits and limit to have better names
* Remove empty lines
* Remove handle_request (moved to requestlimiter)
* Start working on new ratelimiter
* Make limits Option, add "limited?" to constructor
* Add missing logic to send_request
* Rename Limits
* Create Ratelimits and Limit Struct
* Define Limit
* Import Ratelimits
* Define get_rate_limits
* Remove unused import
* + check_rate_limits & limits_config_to_ratelimits
* Remove Absolute Limits
These limits are not meant to be tracked anyways.
* add ratelimits is_exhausted
* Add error handling and send request checking
* change limits to option ratelimits
* Add strum
* Change Ratelimits to Hashmap
* Remove ratelimits in favor of hashmap
* Change code from struct to hashmap
* start working on update rate limits
* Remove wrong import
* Rename ChorusLibError to ChorusError
* Documented the chorus errors
* Made error documentation docstring
* Make ReceivedErrorCodeError have error string
* Remove unneeded import
* Match changes in errors.rs
* Improve update_rate_limits and can_send_request
* add ratelimits.to_hash_map()
* use instances' client instead of new client
* add LimitsConfiguration to instance
* improve update_limits, change a method name
* Fix un-updated errors
* Get LimitConfiguration in a sane way
* Move common.rs into ratelimiter::ChorusRequest
* Delete common.rs
* Make instance.rs use overhauled errors
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* update ratelimiter implementation across all files
* Fix remaining errors post-refactor
* Changed Enum case to be correct
* Use result
* Re-add missing body to request
* Remove unneeded late initalization
* Change visibility from pub to pub(crate)
I feel like these core methods don't need to be exposed as public API.
* Remove unnecessary import
* Fix clippy warnings
* Add docstring
* Change Error names across all files
* Update Cargo.toml
Strum is not needed
* Update ratelimits.rs
* Update ratelimits.rs
* Bug/discord instance info unavailable (#146)
* Change text to be more ambigous
* Use default Configuration instead of erroring out
* Emit warning log if instance config cant be gotten
* Remove import
* Update src/instance.rs
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
* Add missing closing bracket
* Put limits and limits_configuration as one struct
* Derive Hash
* remove import
* rename limits and limits_configuration
* Save clone call
* Change LimitsConfiguration to RateLimits
`LimitsConfiguration` is in no way related to whether the instance has API rate limits enabled or not. Therefore, it has been replaced with what it should have been all along.
* Add ensure_limit_in_map(), add `window` to `Limit`
* Remove unneeded var
* Remove import
* Clean up unneeded things
Dead code warnings have been supressed, but flagged as FIXME so they don't get forgotten. Anyone using tools like TODO Tree in VSCode can still see that they are there, however, they will not be shown as warnings anymore
* Remove nested submodule `limit`
* Add doc comments
* Add more doc comments
* Add some log messages to some methods
---------
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>