Commit Graph

774 Commits

Author SHA1 Message Date
Flori 5899e0b459
Update rust.yml 2023-04-15 17:42:31 +02:00
Flori 4e1cb8f075
Update rust.yml 2023-04-15 17:35:07 +02:00
Flori eb3867c7e8
Update rust.yml 2023-04-15 17:31:45 +02:00
Flori d00244a45a
Update rust.yml 2023-04-15 17:29:27 +02:00
Flori 2c6ce32074
Host local spacebar server 2023-04-15 17:26:44 +02:00
bitfl0wer e4ba507ace
add limit updates for Error, Global, Ip
Despite Error, Global and Ip technically being handled seperately, we still need to update their "reset" and "limit" values to match what the API tells us.
2023-04-15 17:12:33 +02:00
bitfl0wer 77d5349231
remove unneccessary variable 2023-04-15 17:09:42 +02:00
bitfl0wer 992b803548
add add_remaining
add_remaining() adds an i64 to the interal "remaining: u64" with underflow protection.
2023-04-15 17:08:19 +02:00
bitfl0wer 427ce0541e
update internal values through mut ref 2023-04-15 17:07:46 +02:00
bitfl0wer 4fc9d0712e
🎉 mark rate limiter as complete (with hint) 2023-04-15 14:58:19 +02:00
bitfl0wer 1a398fecd7
add fallback if no rate limit header received 2023-04-15 14:55:50 +02:00
bitfl0wer 384d42e877
Derive PartialEq and Eq to use assertEq in tests 2023-04-15 13:54:57 +02:00
bitfl0wer a8a4da36c7
add test which checks instance rate limits working 2023-04-15 13:54:33 +02:00
bitfl0wer 5130846c7f
rename tests 2023-04-15 13:27:43 +02:00
bitfl0wer 84258ec8da
Fix incorrect url formatting, add more tests 2023-04-15 13:27:34 +02:00
bitfl0wer d60711a5d1
Fixed goofy ahh way to remove a slash from the end of the url 2023-04-15 13:03:51 +02:00
bitfl0wer 9855efe15e
Derive Debug, start debugging 2023-04-14 23:38:36 +02:00
bitfl0wer 965308e746
add documentation 2023-04-14 23:01:48 +02:00
bitfl0wer 88987e6bfb
make send_request return Option<Response> 2023-04-14 22:40:13 +02:00
bitfl0wer ce21a8539d
add send_request method 2023-04-14 22:22:23 +02:00
bitfl0wer 112f44e224
Derive copy trait 2023-04-14 22:22:11 +02:00
bitfl0wer d8dd2010a3
add new struct, send_request and can_send_request 2023-04-14 18:29:20 +02:00
bitfl0wer 1b71c63b1c
reduce code complexity& duplication, fix oversight 2023-04-14 17:11:13 +02:00
bitfl0wer 2e964145bd
reduce code duplication 2023-04-14 17:09:50 +02:00
bitfl0wer 04d03e1d3c
handle resetting rate limits 2023-04-14 16:56:54 +02:00
bitfl0wer db61974e26
implement update limits 2023-04-12 22:59:08 +02:00
bitfl0wer e7756ede4f
change return type from Limits to HashMap 2023-04-12 22:18:20 +02:00
bitfl0wer da26b3d373
Fix spelling 2023-04-12 21:31:09 +02:00
bitfl0wer bceff7dbe5
make code compile 2023-04-12 18:34:20 +02:00
bitfl0wer 8622849ef8
add update_limits (TODO) and add_to_queue 2023-04-12 18:33:16 +02:00
bitfl0wer 252697144f
impl display for limittype, add limittype 2023-04-12 18:32:49 +02:00
bitfl0wer 58c5025afe
add .iter() to Limits 2023-04-12 18:18:55 +02:00
bitfl0wer ccff2b73c6
Optimize imports, allow dead code where needed 2023-04-12 17:10:12 +02:00
bitfl0wer bb9575211a
refactor limit.rs, moved some logic 2023-04-12 16:49:18 +02:00
bitfl0wer 5e408bf4d2
me when i write bad code 2023-04-12 15:49:12 +02:00
bitfl0wer 484a6fb24e
Add todo 2023-04-11 21:27:37 +02:00
bitfl0wer 36ead61f09
fix can_send_request 2023-04-11 21:27:06 +02:00
bitfl0wer d90f5c5b1b
update readme 2023-04-11 18:18:24 +02:00
Flori c1a8e1f0f1
Update README.md 2023-04-10 21:38:23 +02:00
Flori f47a310aa5
Update README.md 2023-04-10 21:37:27 +02:00
Flori 6583df8cc6
Update README.md 2023-04-10 21:37:05 +02:00
Flori fd6cd712b7
Update README.md 2023-04-10 21:31:40 +02:00
Flori b56ed763ad
Update README.md 2023-04-10 21:31:33 +02:00
Flori e00e846881
Update README.md 2023-04-10 21:30:39 +02:00
Flori 4c0c4bde39
Update README.md 2023-04-10 21:30:31 +02:00
Flori c6914979d5
Update README.md 2023-04-10 21:28:22 +02:00
bitfl0wer ecb1fb0e53
add TODO comment 2023-04-10 21:02:29 +02:00
bitfl0wer f44bba82a5
add can_send_request, update_limits and send_requests 2023-04-10 20:58:07 +02:00
bitfl0wer be5546e809
Add docstring, rename var 2023-04-10 17:35:04 +02:00
bitfl0wer 4b4860590b
remove tests, reformat limit display, rename limit 2023-04-10 17:30:02 +02:00