using System.Threading; using System.Threading.Tasks; namespace AMWD.Net.Api.Cloudflare { /// /// Represents a client for the Cloudflare API. /// public interface ICloudflareClient { /// /// Makes a GET request to the Cloudflare API. /// /// /// The GET method requests a representation of the specified resource. /// Requests using GET should only retrieve data and should not contain a request content. /// /// The response type. /// The request path (extending the base URL). /// The query parameters. /// A cancellation token used to propagate notification that this operation should be canceled. Task> GetAsync(string requestPath, IQueryParameterFilter queryFilter = null, CancellationToken cancellationToken = default); /// /// Makes a POST request to the Cloudflare API. /// /// /// The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server. /// /// The response type. /// The request type. /// The request path (extending the base URL). /// The request content. /// The query parameters. /// A cancellation token used to propagate notification that this operation should be canceled. Task> PostAsync(string requestPath, TRequest request, IQueryParameterFilter queryFilter = null, CancellationToken cancellationToken = default); /// /// Makes a PUT request to the Cloudflare API. /// /// /// The PUT method replaces all current representations of the target resource with the request content. /// /// The response type. /// The request type. /// The request path (extending the base URL). /// The request content. /// A cancellation token used to propagate notification that this operation should be canceled. Task> PutAsync(string requestPath, TRequest request, CancellationToken cancellationToken = default); /// /// Makes a DELETE request to the Cloudflare API. /// /// /// The DELETE method deletes the specified resource. /// /// The response type. /// The request path (extending the base URL). /// The query parameters. /// A cancellation token used to propagate notification that this operation should be canceled. /// Task> DeleteAsync(string requestPath, IQueryParameterFilter queryFilter = null, CancellationToken cancellationToken = default); /// /// Makes a PATCH request to the Cloudflare API. /// /// /// The PATCH method applies partial modifications to a resource. /// /// The response type. /// The request type. /// The request path (extending the base URL). /// The request content. /// A cancellation token used to propagate notification that this operation should be canceled. Task> PatchAsync(string requestPath, TRequest request, CancellationToken cancellationToken = default); } }