forge-dashboard-sdk-php

TokensApi

TokensApi Class Doc Comment

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech

Table of Contents

Constants

contentTypes  : array<string|int, string> = ['createAPIToken' => ['application/json'], 'del...

Properties

$client  : ClientInterface
$config  : Configuration
$headerSelector  : HeaderSelector
$hostIndex  : int

Methods

__construct()  : mixed
createAPIToken()  : APITokenCreateResponse|Error
Operation createAPIToken
createAPITokenAsync()  : PromiseInterface
Operation createAPITokenAsync
createAPITokenAsyncWithHttpInfo()  : PromiseInterface
Operation createAPITokenAsyncWithHttpInfo
createAPITokenRequest()  : Request
Create request for operation 'createAPIToken'
createAPITokenWithHttpInfo()  : array<string|int, mixed>
Operation createAPITokenWithHttpInfo
deleteAPIToken()  : void
Operation deleteAPIToken
deleteAPITokenAsync()  : PromiseInterface
Operation deleteAPITokenAsync
deleteAPITokenAsyncWithHttpInfo()  : PromiseInterface
Operation deleteAPITokenAsyncWithHttpInfo
deleteAPITokenRequest()  : Request
Create request for operation 'deleteAPIToken'
deleteAPITokenWithHttpInfo()  : array<string|int, mixed>
Operation deleteAPITokenWithHttpInfo
getConfig()  : Configuration
getHostIndex()  : int
Get the host index
listAPITokens()  : array<string|int, APIToken>|Error
Operation listAPITokens
listAPITokensAsync()  : PromiseInterface
Operation listAPITokensAsync
listAPITokensAsyncWithHttpInfo()  : PromiseInterface
Operation listAPITokensAsyncWithHttpInfo
listAPITokensRequest()  : Request
Create request for operation 'listAPITokens'
listAPITokensWithHttpInfo()  : array<string|int, mixed>
Operation listAPITokensWithHttpInfo
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 = ['createAPIToken' => ['application/json'], 'deleteAPIToken' => ['application/json'], 'listAPITokens' => ['application/json']]

Properties

$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

createAPIToken()

Operation createAPIToken

public createAPIToken(APITokenCreateRequest $api_token_create_request[, string $contentType = self::contentTypes['createAPIToken'][0] ]) : APITokenCreateResponse|Error

Generate a new personal API token

Parameters
$api_token_create_request : APITokenCreateRequest

api_token_create_request (required)

$contentType : string = self::contentTypes['createAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['createAPIToken'] 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
APITokenCreateResponse|Error

createAPITokenAsync()

Operation createAPITokenAsync

public createAPITokenAsync(APITokenCreateRequest $api_token_create_request[, string $contentType = self::contentTypes['createAPIToken'][0] ]) : PromiseInterface

Generate a new personal API token

Parameters
$api_token_create_request : APITokenCreateRequest

(required)

$contentType : string = self::contentTypes['createAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['createAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

createAPITokenAsyncWithHttpInfo()

Operation createAPITokenAsyncWithHttpInfo

public createAPITokenAsyncWithHttpInfo(APITokenCreateRequest $api_token_create_request[, string $contentType = self::contentTypes['createAPIToken'][0] ]) : PromiseInterface

Generate a new personal API token

Parameters
$api_token_create_request : APITokenCreateRequest

(required)

$contentType : string = self::contentTypes['createAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['createAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

createAPITokenRequest()

Create request for operation 'createAPIToken'

public createAPITokenRequest(APITokenCreateRequest $api_token_create_request[, string $contentType = self::contentTypes['createAPIToken'][0] ]) : Request
Parameters
$api_token_create_request : APITokenCreateRequest

(required)

$contentType : string = self::contentTypes['createAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['createAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
Request

createAPITokenWithHttpInfo()

Operation createAPITokenWithHttpInfo

public createAPITokenWithHttpInfo(APITokenCreateRequest $api_token_create_request[, string $contentType = self::contentTypes['createAPIToken'][0] ]) : array<string|int, mixed>

Generate a new personal API token

Parameters
$api_token_create_request : APITokenCreateRequest

(required)

$contentType : string = self::contentTypes['createAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['createAPIToken'] 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 \ForgeDashboard\Generated\Model\APITokenCreateResponse|\ForgeDashboard\Generated\Model\Error|\ForgeDashboard\Generated\Model\Error, HTTP status code, HTTP response headers (array of strings)

deleteAPIToken()

Operation deleteAPIToken

public deleteAPIToken(string $id[, string $contentType = self::contentTypes['deleteAPIToken'][0] ]) : void

Revoke a personal API token

Parameters
$id : string

id (required)

$contentType : string = self::contentTypes['deleteAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['deleteAPIToken'] 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

deleteAPITokenAsync()

Operation deleteAPITokenAsync

public deleteAPITokenAsync(string $id[, string $contentType = self::contentTypes['deleteAPIToken'][0] ]) : PromiseInterface

Revoke a personal API token

Parameters
$id : string

(required)

$contentType : string = self::contentTypes['deleteAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['deleteAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

deleteAPITokenAsyncWithHttpInfo()

Operation deleteAPITokenAsyncWithHttpInfo

public deleteAPITokenAsyncWithHttpInfo(string $id[, string $contentType = self::contentTypes['deleteAPIToken'][0] ]) : PromiseInterface

Revoke a personal API token

Parameters
$id : string

(required)

$contentType : string = self::contentTypes['deleteAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['deleteAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

deleteAPITokenRequest()

Create request for operation 'deleteAPIToken'

public deleteAPITokenRequest(string $id[, string $contentType = self::contentTypes['deleteAPIToken'][0] ]) : Request
Parameters
$id : string

(required)

$contentType : string = self::contentTypes['deleteAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['deleteAPIToken'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
Request

deleteAPITokenWithHttpInfo()

Operation deleteAPITokenWithHttpInfo

public deleteAPITokenWithHttpInfo(string $id[, string $contentType = self::contentTypes['deleteAPIToken'][0] ]) : array<string|int, mixed>

Revoke a personal API token

Parameters
$id : string

(required)

$contentType : string = self::contentTypes['deleteAPIToken'][0]

The value for the Content-Type header. Check self::contentTypes['deleteAPIToken'] 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

listAPITokens()

Operation listAPITokens

public listAPITokens([string $contentType = self::contentTypes['listAPITokens'][0] ]) : array<string|int, APIToken>|Error

List the signed-in user's own personal API tokens

Parameters
$contentType : string = self::contentTypes['listAPITokens'][0]

The value for the Content-Type header. Check self::contentTypes['listAPITokens'] 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, APIToken>|Error

listAPITokensAsync()

Operation listAPITokensAsync

public listAPITokensAsync([string $contentType = self::contentTypes['listAPITokens'][0] ]) : PromiseInterface

List the signed-in user's own personal API tokens

Parameters
$contentType : string = self::contentTypes['listAPITokens'][0]

The value for the Content-Type header. Check self::contentTypes['listAPITokens'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

listAPITokensAsyncWithHttpInfo()

Operation listAPITokensAsyncWithHttpInfo

public listAPITokensAsyncWithHttpInfo([string $contentType = self::contentTypes['listAPITokens'][0] ]) : PromiseInterface

List the signed-in user's own personal API tokens

Parameters
$contentType : string = self::contentTypes['listAPITokens'][0]

The value for the Content-Type header. Check self::contentTypes['listAPITokens'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

listAPITokensRequest()

Create request for operation 'listAPITokens'

public listAPITokensRequest([string $contentType = self::contentTypes['listAPITokens'][0] ]) : Request
Parameters
$contentType : string = self::contentTypes['listAPITokens'][0]

The value for the Content-Type header. Check self::contentTypes['listAPITokens'] to see the possible values for this operation

Tags
throws
InvalidArgumentException
Return values
Request

listAPITokensWithHttpInfo()

Operation listAPITokensWithHttpInfo

public listAPITokensWithHttpInfo([string $contentType = self::contentTypes['listAPITokens'][0] ]) : array<string|int, mixed>

List the signed-in user's own personal API tokens

Parameters
$contentType : string = self::contentTypes['listAPITokens'][0]

The value for the Content-Type header. Check self::contentTypes['listAPITokens'] 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 \ForgeDashboard\Generated\Model\APIToken[]|\ForgeDashboard\Generated\Model\Error, 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