2 unstable releases
0.2.0 | Jun 5, 2023 |
---|---|
0.1.0 | Jun 5, 2023 |
#471 in HTTP client
5KB
51 lines
ActionIDMap
A HashMap that can be updated from a URL. Intended to be used to keep reverse-engineered API's in use even as private referenced ID's get updated, so end users don't need to update.
Generate example code below.
let mut actionmap = ActionIDMap::new("https://gist.githubusercontent.com/[..]".into(), 86400).unwrap();
let bar = actionmap.get("foo")?;
if actionmap.needs_refresh() {
actionmap.refresh();
}
The URL can be, for example, a GitHub Gist or Raw file that contains a serialized HashMap ({"key":"value"}
).
Dependencies
~3.5–4.5MB
~85K SLoC