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
571 B
C#
21 lines
571 B
C#
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ReC.Client.Api
|
|
{
|
|
/// <summary>
|
|
/// Provides access to endpoint parameter endpoints.
|
|
/// </summary>
|
|
public class EndpointParamsApi : BaseCrudApi
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="EndpointParamsApi"/> class.
|
|
/// </summary>
|
|
/// <param name="http">The HTTP client used for requests.</param>
|
|
public EndpointParamsApi(HttpClient http) : base(http, "api/EndpointParams")
|
|
{
|
|
}
|
|
}
|
|
}
|