[frontend/core] Add version controller model
This commit is contained in:
parent
69f0727138
commit
fa1590512f
2 changed files with 11 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
using Iceshrimp.Frontend.Core.Services;
|
||||||
|
using Iceshrimp.Shared.Schemas.Web;
|
||||||
|
|
||||||
|
namespace Iceshrimp.Frontend.Core.ControllerModels;
|
||||||
|
|
||||||
|
internal class VersionControllerModel(ApiClient api)
|
||||||
|
{
|
||||||
|
public Task<VersionResponse> GetVersion() =>
|
||||||
|
api.Call<VersionResponse>(HttpMethod.Get, "/version");
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ internal class ApiService(ApiClient client)
|
||||||
public readonly MiscControllerModel Misc = new(client);
|
public readonly MiscControllerModel Misc = new(client);
|
||||||
public readonly ProfileControllerModel Profile = new(client);
|
public readonly ProfileControllerModel Profile = new(client);
|
||||||
public readonly FilterControllerModel Filters = new(client);
|
public readonly FilterControllerModel Filters = new(client);
|
||||||
|
public readonly VersionControllerModel Version = new(client);
|
||||||
|
|
||||||
public void SetBearerToken(string token) => client.SetToken(token);
|
public void SetBearerToken(string token) => client.SetToken(token);
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue