forge-dashboard-sdk-php

WebhooksApi

WebhooksApi Class Doc Comment

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech

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

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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException

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
throws
InvalidArgumentException
Return values
PromiseInterface

ensureWebhookAsyncWithHttpInfo()

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
throws
InvalidArgumentException
Return values
PromiseInterface

ensureWebhookRequest()

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
throws
InvalidArgumentException
Return values
Request

ensureWebhookWithHttpInfo()

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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException
Return values
array<string|int, mixed> —

of null, HTTP status code, HTTP response headers (array of strings)

getHostIndex()

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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException

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
throws
InvalidArgumentException
Return values
PromiseInterface

receiveForgejoWebhookAsyncWithHttpInfo()

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
throws
InvalidArgumentException
Return values
PromiseInterface

receiveForgejoWebhookRequest()

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
throws
InvalidArgumentException
Return values
Request

receiveForgejoWebhookWithHttpInfo()

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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException
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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException

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
throws
InvalidArgumentException
Return values
PromiseInterface

receiveGitHubWebhookAsyncWithHttpInfo()

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
throws
InvalidArgumentException
Return values
PromiseInterface

receiveGitHubWebhookRequest()

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
throws
InvalidArgumentException
Return values
Request

receiveGitHubWebhookWithHttpInfo()

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
throws
ApiException

on non-2xx response or if the response body is not in the expected format

InvalidArgumentException
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
throws
RuntimeException

on file opening failure

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
Return values
bool
On this page

Search results