2023-01-02 19:01:03 +02:00
|
|
|
using Telegram.Bot.Types;
|
|
|
|
|
using West.TelegramBot.ContentStore.Model;
|
2022-08-30 00:48:49 +03:00
|
|
|
|
|
|
|
|
namespace West.TelegramBot.ContentStore.Service;
|
|
|
|
|
|
|
|
|
|
public class CapyApiService : IRandomMediaService
|
|
|
|
|
{
|
2023-07-23 12:17:45 +03:00
|
|
|
public StoreItem StoreItem { get; } = new("capybara", "Капибара", 60, 120);
|
2023-07-21 18:40:24 +03:00
|
|
|
public Task<RandomMedia> GetRandomMediaAsync()
|
2022-08-30 00:48:49 +03:00
|
|
|
{
|
2023-07-21 18:40:24 +03:00
|
|
|
return Task.FromResult(new RandomMedia(new InputFileUrl($"https://api.capy.lol/v1/capybara?{new Random().Next(0, 10000)}")));
|
2022-08-30 00:48:49 +03:00
|
|
|
}
|
|
|
|
|
}
|