Iceshrimp.NET/Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs
2024-04-03 18:15:59 +02:00

18 lines
No EOL
676 B
C#

using Iceshrimp.Frontend.Core.Miscellaneous;
using Iceshrimp.Frontend.Core.Services;
using Iceshrimp.Shared.Schemas;
namespace Iceshrimp.Frontend.Core.ControllerModels;
internal class UserControllerModel(ApiClient api)
{
public Task<UserResponse?> GetUser(string id) =>
api.CallNullable<UserResponse>(HttpMethod.Get, $"/users/{id}");
public Task<UserProfileResponse?> GetUserProfile(string id) =>
api.CallNullable<UserProfileResponse>(HttpMethod.Get, $"/users/{id}/profile");
[LinkPagination(20, 80)]
public Task<List<NoteResponse>?> GetUserNotes(string id, PaginationQuery pq) =>
api.CallNullable<List<NoteResponse>>(HttpMethod.Get, $"/users/{id}/notes", pq);
}