changing folder structure

This commit is contained in:
2023-08-10 16:01:39 -03:00
parent 73b0bac359
commit 3b2a4dc6d5
16 changed files with 19 additions and 16 deletions

View File

@@ -0,0 +1,20 @@
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
namespace Kasbot.Services
{
public class PictureService
{
private readonly HttpClient _http;
public PictureService(HttpClient http)
=> _http = http;
public async Task<Stream> GetCatPictureAsync()
{
var resp = await _http.GetAsync("https://cataas.com/cat");
return await resp.Content.ReadAsStreamAsync();
}
}
}