WebhooksApi
in package
WebhooksApi Class Doc Comment
Tags
Table of Contents
Constants
- contentTypes : array<string|int, string> = ['ensureWebhook' => ['application/json'], 'rece...
Properties
- $client : ClientInterface
- $config : Configuration
- $headerSelector : HeaderSelector
- $hostIndex : int
Methods
- __construct() : mixed
- ensureWebhook() : void
- Operation ensureWebhook
- ensureWebhookAsync() : PromiseInterface
- Operation ensureWebhookAsync
- ensureWebhookAsyncWithHttpInfo() : PromiseInterface
- Operation ensureWebhookAsyncWithHttpInfo
- ensureWebhookRequest() : Request
- Create request for operation 'ensureWebhook'
- ensureWebhookWithHttpInfo() : array<string|int, mixed>
- Operation ensureWebhookWithHttpInfo
- getConfig() : Configuration
- getHostIndex() : int
- Get the host index
- receiveForgejoWebhook() : void
- Operation receiveForgejoWebhook
- receiveForgejoWebhookAsync() : PromiseInterface
- Operation receiveForgejoWebhookAsync
- receiveForgejoWebhookAsyncWithHttpInfo() : PromiseInterface
- Operation receiveForgejoWebhookAsyncWithHttpInfo
- receiveForgejoWebhookRequest() : Request
- Create request for operation 'receiveForgejoWebhook'
- receiveForgejoWebhookWithHttpInfo() : array<string|int, mixed>
- Operation receiveForgejoWebhookWithHttpInfo
- receiveGitHubWebhook() : void
- Operation receiveGitHubWebhook
- receiveGitHubWebhookAsync() : PromiseInterface
- Operation receiveGitHubWebhookAsync
- receiveGitHubWebhookAsyncWithHttpInfo() : PromiseInterface
- Operation receiveGitHubWebhookAsyncWithHttpInfo
- receiveGitHubWebhookRequest() : Request
- Create request for operation 'receiveGitHubWebhook'
- receiveGitHubWebhookWithHttpInfo() : array<string|int, mixed>
- Operation receiveGitHubWebhookWithHttpInfo
- setHostIndex() : void
- Set the host index
- createHttpClientOption() : array<string|int, mixed>
- Create http client option
- handleResponseWithDataType() : array<string|int, mixed>
- responseWithinRangeCode() : bool
Constants
contentTypes
public
array<string|int, string>
contentTypes
= ['ensureWebhook' => ['application/json'], 'receiveForgejoWebhook' => ['application/json'], 'receiveGitHubWebhook' => ['application/json']]
Properties
$client
protected
ClientInterface
$client
$config
protected
Configuration
$config
$headerSelector
protected
HeaderSelector
$headerSelector
$hostIndex
protected
int
$hostIndex
Host index
Methods
__construct()
public
__construct([ClientInterface $client = null ][, Configuration $config = null ][, HeaderSelector $selector = null ][, int $hostIndex = 0 ]) : mixed
Parameters
- $client : ClientInterface = null
- $config : Configuration = null
- $selector : HeaderSelector = null
- $hostIndex : int = 0
-
(Optional) host index to select the list of hosts if defined in the OpenAPI spec
ensureWebhook()
Operation ensureWebhook
public
ensureWebhook(WebhookEnsureRequest $webhook_ensure_request[, string $contentType = self::contentTypes['ensureWebhook'][0] ]) : void
Create or fix up a webhook on one tracked repo, on the signed-in user's behalf
Parameters
- $webhook_ensure_request : WebhookEnsureRequest
-
webhook_ensure_request (required)
- $contentType : string = self::contentTypes['ensureWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['ensureWebhook'] to see the possible values for this operation
Tags
ensureWebhookAsync()
Operation ensureWebhookAsync
public
ensureWebhookAsync(WebhookEnsureRequest $webhook_ensure_request[, string $contentType = self::contentTypes['ensureWebhook'][0] ]) : PromiseInterface
Create or fix up a webhook on one tracked repo, on the signed-in user's behalf
Parameters
- $webhook_ensure_request : WebhookEnsureRequest
-
(required)
- $contentType : string = self::contentTypes['ensureWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['ensureWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfaceensureWebhookAsyncWithHttpInfo()
Operation ensureWebhookAsyncWithHttpInfo
public
ensureWebhookAsyncWithHttpInfo(WebhookEnsureRequest $webhook_ensure_request[, string $contentType = self::contentTypes['ensureWebhook'][0] ]) : PromiseInterface
Create or fix up a webhook on one tracked repo, on the signed-in user's behalf
Parameters
- $webhook_ensure_request : WebhookEnsureRequest
-
(required)
- $contentType : string = self::contentTypes['ensureWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['ensureWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfaceensureWebhookRequest()
Create request for operation 'ensureWebhook'
public
ensureWebhookRequest(WebhookEnsureRequest $webhook_ensure_request[, string $contentType = self::contentTypes['ensureWebhook'][0] ]) : Request
Parameters
- $webhook_ensure_request : WebhookEnsureRequest
-
(required)
- $contentType : string = self::contentTypes['ensureWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['ensureWebhook'] to see the possible values for this operation
Tags
Return values
RequestensureWebhookWithHttpInfo()
Operation ensureWebhookWithHttpInfo
public
ensureWebhookWithHttpInfo(WebhookEnsureRequest $webhook_ensure_request[, string $contentType = self::contentTypes['ensureWebhook'][0] ]) : array<string|int, mixed>
Create or fix up a webhook on one tracked repo, on the signed-in user's behalf
Parameters
- $webhook_ensure_request : WebhookEnsureRequest
-
(required)
- $contentType : string = self::contentTypes['ensureWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['ensureWebhook'] to see the possible values for this operation
Tags
Return values
array<string|int, mixed> —of null, HTTP status code, HTTP response headers (array of strings)
getConfig()
public
getConfig() : Configuration
Return values
ConfigurationgetHostIndex()
Get the host index
public
getHostIndex() : int
Return values
int —Host index
receiveForgejoWebhook()
Operation receiveForgejoWebhook
public
receiveForgejoWebhook(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveForgejoWebhook'][0] ]) : void
Receive a Forgejo repository webhook delivery
Parameters
- $webhook_token : string
-
webhook_token (required)
- $body : object
-
body (required)
- $contentType : string = self::contentTypes['receiveForgejoWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveForgejoWebhook'] to see the possible values for this operation
Tags
receiveForgejoWebhookAsync()
Operation receiveForgejoWebhookAsync
public
receiveForgejoWebhookAsync(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveForgejoWebhook'][0] ]) : PromiseInterface
Receive a Forgejo repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveForgejoWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveForgejoWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfacereceiveForgejoWebhookAsyncWithHttpInfo()
Operation receiveForgejoWebhookAsyncWithHttpInfo
public
receiveForgejoWebhookAsyncWithHttpInfo(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveForgejoWebhook'][0] ]) : PromiseInterface
Receive a Forgejo repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveForgejoWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveForgejoWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfacereceiveForgejoWebhookRequest()
Create request for operation 'receiveForgejoWebhook'
public
receiveForgejoWebhookRequest(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveForgejoWebhook'][0] ]) : Request
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveForgejoWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveForgejoWebhook'] to see the possible values for this operation
Tags
Return values
RequestreceiveForgejoWebhookWithHttpInfo()
Operation receiveForgejoWebhookWithHttpInfo
public
receiveForgejoWebhookWithHttpInfo(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveForgejoWebhook'][0] ]) : array<string|int, mixed>
Receive a Forgejo repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveForgejoWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveForgejoWebhook'] to see the possible values for this operation
Tags
Return values
array<string|int, mixed> —of null, HTTP status code, HTTP response headers (array of strings)
receiveGitHubWebhook()
Operation receiveGitHubWebhook
public
receiveGitHubWebhook(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveGitHubWebhook'][0] ]) : void
Receive a GitHub repository webhook delivery
Parameters
- $webhook_token : string
-
webhook_token (required)
- $body : object
-
body (required)
- $contentType : string = self::contentTypes['receiveGitHubWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveGitHubWebhook'] to see the possible values for this operation
Tags
receiveGitHubWebhookAsync()
Operation receiveGitHubWebhookAsync
public
receiveGitHubWebhookAsync(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveGitHubWebhook'][0] ]) : PromiseInterface
Receive a GitHub repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveGitHubWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveGitHubWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfacereceiveGitHubWebhookAsyncWithHttpInfo()
Operation receiveGitHubWebhookAsyncWithHttpInfo
public
receiveGitHubWebhookAsyncWithHttpInfo(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveGitHubWebhook'][0] ]) : PromiseInterface
Receive a GitHub repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveGitHubWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveGitHubWebhook'] to see the possible values for this operation
Tags
Return values
PromiseInterfacereceiveGitHubWebhookRequest()
Create request for operation 'receiveGitHubWebhook'
public
receiveGitHubWebhookRequest(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveGitHubWebhook'][0] ]) : Request
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveGitHubWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveGitHubWebhook'] to see the possible values for this operation
Tags
Return values
RequestreceiveGitHubWebhookWithHttpInfo()
Operation receiveGitHubWebhookWithHttpInfo
public
receiveGitHubWebhookWithHttpInfo(string $webhook_token, object $body[, string $contentType = self::contentTypes['receiveGitHubWebhook'][0] ]) : array<string|int, mixed>
Receive a GitHub repository webhook delivery
Parameters
- $webhook_token : string
-
(required)
- $body : object
-
(required)
- $contentType : string = self::contentTypes['receiveGitHubWebhook'][0]
-
The value for the Content-Type header. Check self::contentTypes['receiveGitHubWebhook'] to see the possible values for this operation
Tags
Return values
array<string|int, mixed> —of null, HTTP status code, HTTP response headers (array of strings)
setHostIndex()
Set the host index
public
setHostIndex(int $hostIndex) : void
Parameters
- $hostIndex : int
-
Host index (required)
createHttpClientOption()
Create http client option
protected
createHttpClientOption() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —of http client options
handleResponseWithDataType()
private
handleResponseWithDataType(string $dataType, RequestInterface $request, ResponseInterface $response) : array<string|int, mixed>
Parameters
- $dataType : string
- $request : RequestInterface
- $response : ResponseInterface
Return values
array<string|int, mixed>responseWithinRangeCode()
private
responseWithinRangeCode(string $rangeCode, int $statusCode) : bool
Parameters
- $rangeCode : string
- $statusCode : int