Externds the api endpoint interfaces by id and uuid qeuries
This commit is contained in:
parent
e224723313
commit
4fd855f01d
|
@ -6,4 +6,14 @@ internal class CardEndpoint : IApiEndpoint
|
|||
{
|
||||
return "card";
|
||||
}
|
||||
|
||||
string IApiEndpoint.IdQuery(int id)
|
||||
{
|
||||
return $"{((IApiEndpoint)this).ApiUri()}/id={id}";
|
||||
}
|
||||
|
||||
string IApiEndpoint.UuidQuery(int uuid)
|
||||
{
|
||||
return $"{((IApiEndpoint)this).ApiUri()}/uuid={uuid}";
|
||||
}
|
||||
}
|
|
@ -3,4 +3,8 @@
|
|||
public interface IApiEndpoint
|
||||
{
|
||||
string ApiUri();
|
||||
|
||||
string IdQuery(int id);
|
||||
|
||||
string UuidQuery(int uuid);
|
||||
}
|
|
@ -4,6 +4,15 @@ internal class SetEndpoint : IApiEndpoint
|
|||
{
|
||||
string IApiEndpoint.ApiUri()
|
||||
{
|
||||
return "card";
|
||||
return "set";
|
||||
}
|
||||
}
|
||||
|
||||
string IApiEndpoint.IdQuery(int id)
|
||||
{
|
||||
return $"{((IApiEndpoint)this).ApiUri()}/{id}";
|
||||
}
|
||||
|
||||
string IApiEndpoint.UuidQuery(int uuid)
|
||||
{
|
||||
return $"{((IApiEndpoint)this).ApiUri()}/uuid/{uuid}";
|
||||
}
|
Loading…
Reference in a new issue