Save images of owned bots
This commit is contained in:
parent
2a5d73608d
commit
89908b95e7
2 changed files with 3 additions and 7 deletions
|
@ -7,7 +7,7 @@ public static class DownloadImages
|
||||||
{
|
{
|
||||||
public static async Task DoIt(HttpClient client)
|
public static async Task DoIt(HttpClient client)
|
||||||
{
|
{
|
||||||
foreach (var dir in Directory.EnumerateDirectories("robots"))
|
foreach (var dir in Directory.EnumerateDirectories("my_robots"))
|
||||||
{
|
{
|
||||||
var json = await File.ReadAllTextAsync(Path.Combine(dir, "metadata.json"));
|
var json = await File.ReadAllTextAsync(Path.Combine(dir, "metadata.json"));
|
||||||
var doc = JsonDocument.Parse(json);
|
var doc = JsonDocument.Parse(json);
|
||||||
|
|
|
@ -12,9 +12,6 @@ Console.WriteLine("Hello, World!");
|
||||||
|
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
|
|
||||||
await DownloadImages.DoIt(client);
|
|
||||||
|
|
||||||
/*
|
|
||||||
async Task<JsonElement?> GetResponse(HttpResponseMessage result, string url)
|
async Task<JsonElement?> GetResponse(HttpResponseMessage result, string url)
|
||||||
{
|
{
|
||||||
if (result.StatusCode == HttpStatusCode.OK)
|
if (result.StatusCode == HttpStatusCode.OK)
|
||||||
|
@ -91,7 +88,6 @@ foreach (var result in results.EnumerateArray())
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Get local saves
|
await DownloadImages.DoIt(client);
|
||||||
// TODO: Save robot images
|
|
||||||
// TODO: Chart of amount of bots on CRF by date & amount of starter bots
|
// TODO: Chart of amount of bots on CRF by date & amount of starter bots
|
||||||
*/
|
|
Loading…
Reference in a new issue