mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-11-24 06:58:22 -05:00
chore: remove function
This commit is contained in:
parent
4af592a543
commit
f5c0963473
@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using MyMcRealms.Attributes;
|
using MyMcRealms.Attributes;
|
||||||
using MyMcRealms.Data;
|
using MyMcRealms.Data;
|
||||||
using MyMcRealms.Entities;
|
using MyMcRealms.Entities;
|
||||||
using MyMcRealms.MyMcAPI;
|
|
||||||
using MyMcRealms.MyMcAPI.Responses;
|
using MyMcRealms.MyMcAPI.Responses;
|
||||||
using MyMcRealms.Requests;
|
using MyMcRealms.Requests;
|
||||||
using MyMcRealms.Responses;
|
using MyMcRealms.Responses;
|
||||||
|
@ -13,26 +13,13 @@ namespace MyMcRealms.MyMcAPI
|
|||||||
httpClient.BaseAddress = new Uri(ApiUrl);
|
httpClient.BaseAddress = new Uri(ApiUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<HelloResponse?> GetHello()
|
|
||||||
{
|
|
||||||
HelloResponse response = await httpClient.GetFromJsonAsync<HelloResponse>("hello");
|
|
||||||
|
|
||||||
if (response == null)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"error while doing GET /hello");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<AllServersResponse?> GetAllServers()
|
public async Task<AllServersResponse?> GetAllServers()
|
||||||
{
|
{
|
||||||
AllServersResponse response = await httpClient.GetFromJsonAsync<AllServersResponse>($"list_all_servers/{Environment.GetEnvironmentVariable("MYMC_SERVER_LIST_KEY")}");
|
AllServersResponse response = await httpClient.GetFromJsonAsync<AllServersResponse>($"list_all_servers/{Environment.GetEnvironmentVariable("MYMC_SERVER_LIST_KEY")}");
|
||||||
|
|
||||||
if (response == null)
|
if (response == null)
|
||||||
{
|
{
|
||||||
Console.WriteLine("error while doing GET/list_all_servers");
|
Console.WriteLine("error while doing GET /list_all_servers");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user