C# Class Box.V2.Managers.BoxWebhooksManager

The manager that represents the webhooks V2 endpoints.
Inheritance: BoxResourceManager
ファイルを表示 Open project: box/box-windows-sdk-v2

Public Methods

Method 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

Method Description
GetAllWebhooksAsync ( ) : Task>

Method Details

BoxWebhooksManager() public method

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
return Box.V2.Auth

CreateWebhookAsync() public method

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

DeleteWebhookAsync() public method

Delete a webhook.
public DeleteWebhookAsync ( string id ) : Task
id string Webhook id.
return Task

GetWebhookAsync() public method

Get a webhook.
public GetWebhookAsync ( string id ) : Task
id string Webhook id.
return Task

GetWebhooksAsync() public method

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.
return Task>

UpdateWebhookAsync() public method

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

VerifyWebhook() public static method

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.
return bool