2025-03-01 20:38:45 -05:00

15 lines
423 B
C#

namespace QuestShare.Services.API
{
internal interface IAPIHandler
{
string Method => GetType().Name;
void HandleDispatch();
void HandleDispatch(dynamic? data);
Task HandleResponse(IResponse response);
void InvokeHandler(IAPIHandler handler, IRequest request)
{
_ = ((ApiService)Plugin.GetService<ApiService>()).Invoke(Method, request);
}
}
}