Interface IHooksClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IHooksClient
Methods
CreateAsync(HookCreateRequest, CancellationToken)
Creates a new hook according to the request.
Task<Hook> CreateAsync(HookCreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestHookCreateRequestThe HookCreateRequest containing the details of the hook to create.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteAsync(string, CancellationToken)
Deletes a hook.
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe ID of the hook to delete.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(GetHooksRequest, PaginationInfo, CancellationToken)
Retrieves a list of all hooks.
Task<IPagedList<Hook>> GetAllAsync(GetHooksRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
requestGetHooksRequestSpecifies criteria to use when querying hooks.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Hook>>
An IPagedList<T> containing the hooks requested.
GetAsync(string, string, CancellationToken)
Retrieves a hook by its ID.
Task<Hook> GetAsync(string id, string fields = null, CancellationToken cancellationToken = default)
Parameters
idstringThe ID of the hook to retrieve.
fieldsstringA comma separated list of fields to include, empty to retrieve all fields.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
UpdateAsync(string, HookUpdateRequest, CancellationToken)
Updates a hook.
Task<Hook> UpdateAsync(string id, HookUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
idstringThe ID of the hook to update.
requestHookUpdateRequestA HookUpdateRequest containing the information to update.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.