Introduce BaseCrudApi to encapsulate common CRUD logic for API resource classes. Refactor CommonApi, EndpointAuthApi, EndpointParamsApi, EndpointsApi, ProfileApi, RecActionApi, and ResultApi to inherit from BaseCrudApi, removing duplicated CRUD methods and constructors. This centralizes CRUD operations, reduces code duplication, and improves maintainability.
21 lines
568 B
C#
21 lines
568 B
C#
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ReC.Client.Api
|
|
{
|
|
/// <summary>
|
|
/// Provides access to endpoint authentication endpoints.
|
|
/// </summary>
|
|
public class EndpointAuthApi : BaseCrudApi
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="EndpointAuthApi"/> class.
|
|
/// </summary>
|
|
/// <param name="http">The HTTP client used for requests.</param>
|
|
public EndpointAuthApi(HttpClient http) : base(http, "api/EndpointAuth")
|
|
{
|
|
}
|
|
}
|
|
}
|