C# Class Box.V2.Managers.BoxWebhooksManager

The manager that represents the webhooks V2 endpoints.
Inheritance: BoxResourceManager
Afficher le fichier Open project: box/box-windows-sdk-v2

Méthodes publiques

Méthode Description
BoxWebhooksManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
CreateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task

Create a new webhook.

DeleteWebhookAsync ( string id ) : Task

Delete a webhook.

GetWebhookAsync ( string id ) : Task

Get a webhook.

GetWebhooksAsync ( int limit = 100, string nextMarker = null, bool autoPaginate = false ) : Task>

Fetch all defined webhooks for the requesting application and user.

UpdateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task

Update a webhook.

VerifyWebhook ( string deliveryTimestamp, string signaturePrimary, string signatureSecondary, string payload, string primaryWebhookKey, string secondaryWebhookKey ) : bool

Used to validate an incoming webhook by computing cryptographic digests of the notification's payload and comparing them to the digests computed by Box and placed in the BOX-SIGNATURE-PRIMARY and BOX-SIGNATURE-SECONDARY request headers. For more information about validating webhooks see https://docs.box.com/reference#signatures

Private Methods

Méthode Description
GetAllWebhooksAsync ( ) : Task>

Method Details

BoxWebhooksManager() public méthode

public BoxWebhooksManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
Résultat Box.V2.Auth

CreateWebhookAsync() public méthode

Create a new webhook.
public CreateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task
webhookRequest Box.V2.Models.BoxWebhookRequest BoxWebhookRequest object.
Résultat Task

DeleteWebhookAsync() public méthode

Delete a webhook.
public DeleteWebhookAsync ( string id ) : Task
id string Webhook id.
Résultat Task

GetWebhookAsync() public méthode

Get a webhook.
public GetWebhookAsync ( string id ) : Task
id string Webhook id.
Résultat Task

GetWebhooksAsync() public méthode

Fetch all defined webhooks for the requesting application and user.
public GetWebhooksAsync ( int limit = 100, string nextMarker = null, bool autoPaginate = false ) : Task>
limit int Optional. Defaults to 100, max of 200.
nextMarker string Optional. Used to indicate starting point for next batch of webhooks.
autoPaginate bool Whether or not to auto-paginate to fetch all items; defaults to false.
Résultat Task>

UpdateWebhookAsync() public méthode

Update a webhook.
public UpdateWebhookAsync ( BoxWebhookRequest webhookRequest ) : Task
webhookRequest Box.V2.Models.BoxWebhookRequest BoxWebhookRequest object.
Résultat Task

VerifyWebhook() public static méthode

Used to validate an incoming webhook by computing cryptographic digests of the notification's payload and comparing them to the digests computed by Box and placed in the BOX-SIGNATURE-PRIMARY and BOX-SIGNATURE-SECONDARY request headers. For more information about validating webhooks see https://docs.box.com/reference#signatures
public static VerifyWebhook ( string deliveryTimestamp, string signaturePrimary, string signatureSecondary, string payload, string primaryWebhookKey, string secondaryWebhookKey ) : bool
deliveryTimestamp string Value in BOX-DELIVERY-TIMESTAMP header.
signaturePrimary string Value in BOX-SIGNATURE-PRIMARY header.
signatureSecondary string Value in BOX-SIGNATURE-SECONDARY header.
payload string Body of the incoming webhook request.
primaryWebhookKey string Primary webhook signature key.
secondaryWebhookKey string Secondary webhook signature key.
Résultat bool