Skip to content

Latest commit

 

History

History
568 lines (388 loc) · 24.8 KB

File metadata and controls

568 lines (388 loc) · 24.8 KB

Github

(github)

Overview

REST APIs for managing the github integration

Available Operations

checkAccess

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\CheckGithubAccessRequest(
    org: '<value>',
    repo: '<value>',
);

$response = $sdk->github->checkAccess(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\CheckGithubAccessRequest ✔️ The request object to use for the request.

Response

?Operations\CheckGithubAccessResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getAction

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\GetGitHubActionRequest(
    org: '<value>',
    repo: '<value>',
);

$response = $sdk->github->getAction(
    request: $request
);

if ($response->githubGetActionResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GetGitHubActionRequest ✔️ The request object to use for the request.

Response

?Operations\GetGitHubActionResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

getSetup

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\GetGithubSetupStateRequest(
    generateGenLockId: '<id>',
    org: '<value>',
    repo: '<value>',
);

$response = $sdk->github->getSetup(
    request: $request
);

if ($response->githubSetupStateResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GetGithubSetupStateRequest ✔️ The request object to use for the request.

Response

?Operations\GetGithubSetupStateResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

checkPublishingPRs

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\GithubCheckPublishingPRsRequest(
    generateGenLockId: '<id>',
    org: '<value>',
    repo: '<value>',
);

$response = $sdk->github->checkPublishingPRs(
    request: $request
);

if ($response->githubPublishingPRResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GithubCheckPublishingPRsRequest ✔️ The request object to use for the request.

Response

?Operations\GithubCheckPublishingPRsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

checkPublishingSecrets

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\GithubCheckPublishingSecretsRequest(
    generateGenLockId: '<id>',
);

$response = $sdk->github->checkPublishingSecrets(
    request: $request
);

if ($response->githubMissingPublishingSecretsResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\GithubCheckPublishingSecretsRequest ✔️ The request object to use for the request.

Response

?Operations\GithubCheckPublishingSecretsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

configureCodeSamples

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Shared\GithubConfigureCodeSamplesRequest(
    org: '<value>',
    repo: '<value>',
    targetName: '<value>',
);

$response = $sdk->github->configureCodeSamples(
    request: $request
);

if ($response->githubConfigureCodeSamplesResponse !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Shared\GithubConfigureCodeSamplesRequest ✔️ The request object to use for the request.

Response

?Operations\GithubConfigureCodeSamplesResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

configureMintlifyRepo

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Shared\GithubConfigureMintlifyRepoRequest(
    input: '<value>',
    org: '<value>',
    overlays: [
        '<value>',
    ],
    repo: '<value>',
);

$response = $sdk->github->configureMintlifyRepo(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Shared\GithubConfigureMintlifyRepoRequest ✔️ The request object to use for the request.

Response

?Operations\GithubConfigureMintlifyRepoResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

configureTarget

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Shared\GithubConfigureTargetRequest(
    org: '<value>',
    repoName: '<value>',
);

$response = $sdk->github->configureTarget(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Shared\GithubConfigureTargetRequest ✔️ The request object to use for the request.

Response

?Operations\GithubConfigureTargetResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

storePublishingSecrets

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Shared\GithubStorePublishingSecretsRequest(
    generateGenLockId: '<id>',
);

$response = $sdk->github->storePublishingSecrets(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Shared\GithubStorePublishingSecretsRequest ✔️ The request object to use for the request.

Response

?Operations\GithubStorePublishingSecretsResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

triggerAction

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Shared\GithubTriggerActionRequest(
    genLockId: '<id>',
    org: '<value>',
    repoName: '<value>',
);

$response = $sdk->github->triggerAction(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Shared\GithubTriggerActionRequest ✔️ The request object to use for the request.

Response

?Operations\GithubTriggerActionResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*

linkGithub

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Speakeasy\SpeakeasyClientSDK;
use Speakeasy\SpeakeasyClientSDK\Models\Operations;
use Speakeasy\SpeakeasyClientSDK\Models\Shared;

$security = new Shared\Security(
    apiKey: '<YOUR_API_KEY_HERE>',
);

$sdk = SpeakeasyClientSDK\SDK::builder()->setSecurity($security)->build();

$request = new Operations\LinkGithubAccessRequest();

$response = $sdk->github->linkGithub(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\LinkGithubAccessRequest ✔️ The request object to use for the request.

Response

?Operations\LinkGithubAccessResponse

Errors

Error Type Status Code Content Type
Errorors\Error 4XX application/json
Errorors\SDKException 5XX */*