Skip to content

Commit 2e9ad7f

Browse files
committed
refactor: update huismetbenen api url
1 parent 23af5ec commit 2e9ad7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bathbot-client/src/snipe/huismetbenen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub async fn get_snipe_player_history(
3838
country: &str,
3939
user_id: u32,
4040
) -> Result<BTreeMap<Date, u32>> {
41-
let url = format!("https://api.huismetbenen.nl/player/{country}/{user_id}/history");
41+
let url = format!("{HUISMETBENEN}player/{country}/{user_id}/history");
4242

4343
let bytes = client.make_get_request(url, Site::Huismetbenen).await?;
4444

@@ -173,7 +173,7 @@ pub async fn get_national_firsts_count(
173173
}
174174

175175
pub async fn get_countries(client: &Client) -> Result<SnipeCountries> {
176-
let url = "https://api.huismetbenen.nl/country/all?only_with_data=true";
176+
let url = format!("{HUISMETBENEN}country/all?only_with_data=true");
177177
let bytes = client.make_get_request(url, Site::Huismetbenen).await?;
178178

179179
serde_json::from_slice(&bytes).wrap_err_with(|| {

bathbot-util/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const OSU_BASE: &str = "https://osu.ppy.sh/";
1313
/// FIXME: Endpoint is sometimes wrong so avoid using it, see issue #426
1414
pub const MAP_THUMB_URL: &str = "https://b.ppy.sh/thumb/";
1515
pub const AVATAR_URL: &str = "https://a.ppy.sh/";
16-
pub const HUISMETBENEN: &str = "https://api.huismetbenen.nl/";
16+
pub const HUISMETBENEN: &str = "https://api.snipe.huismetbenen.nl/";
1717

1818
// twitch
1919
pub const TWITCH_BASE: &str = "https://www.twitch.tv/";

0 commit comments

Comments
 (0)