mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Fix Red Panda
This commit is contained in:
@@ -19,10 +19,10 @@ public class RedPandaService : IRandomMediaService
|
|||||||
|
|
||||||
public async Task<RandomMedia> GetRandomMediaAsync()
|
public async Task<RandomMedia> GetRandomMediaAsync()
|
||||||
{
|
{
|
||||||
var response = await _httpClient.GetStringAsync("https://some-random-api.ml/animal/red_panda");
|
var response = await _httpClient.GetStringAsync("https://some-random-api.com/animal/red_panda");
|
||||||
|
|
||||||
var image = JsonConvert.DeserializeObject<RedPandaResponse>(response);
|
var image = JsonConvert.DeserializeObject<RedPandaResponse>(response);
|
||||||
|
|
||||||
return new RandomMedia(new InputFileUrl(image.Image), image.Fact);
|
return new RandomMedia(new InputFileUrl(image.Image), image.Fact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user