Skip to content

Latest commit

 

History

History
639 lines (459 loc) · 29.1 KB

File metadata and controls

639 lines (459 loc) · 29.1 KB

Github

(github())

Overview

REST APIs for managing the github integration

Available Operations

checkAccess

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.CheckGithubAccessRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.CheckGithubAccessResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        CheckGithubAccessRequest req = CheckGithubAccessRequest.builder()
                .org("<value>")
                .repo("<value>")
                .build();

        CheckGithubAccessResponse res = sdk.github().checkAccess()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

CheckGithubAccessResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

checkPublishingPRs

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingPRsRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingPRsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubCheckPublishingPRsRequest req = GithubCheckPublishingPRsRequest.builder()
                .generateGenLockId("<id>")
                .org("<value>")
                .repo("<value>")
                .build();

        GithubCheckPublishingPRsResponse res = sdk.github().checkPublishingPRs()
                .request(req)
                .call();

        if (res.githubPublishingPRResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

GithubCheckPublishingPRsResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

checkPublishingSecrets

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubCheckPublishingSecretsRequest req = GithubCheckPublishingSecretsRequest.builder()
                .generateGenLockId("<value>")
                .build();

        GithubCheckPublishingSecretsResponse res = sdk.github().checkPublishingSecrets()
                .request(req)
                .call();

        if (res.githubMissingPublishingSecretsResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

GithubCheckPublishingSecretsResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

configureCodeSamples

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubConfigureCodeSamplesResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubConfigureCodeSamplesRequest req = GithubConfigureCodeSamplesRequest.builder()
                .org("<value>")
                .repo("<value>")
                .targetName("<value>")
                .build();

        GithubConfigureCodeSamplesResponse res = sdk.github().configureCodeSamples()
                .request(req)
                .call();

        if (res.githubConfigureCodeSamplesResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

GithubConfigureCodeSamplesResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

configureMintlifyRepo

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubConfigureMintlifyRepoResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;
import java.util.List;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubConfigureMintlifyRepoRequest req = GithubConfigureMintlifyRepoRequest.builder()
                .input("<value>")
                .org("<value>")
                .overlays(List.of(
                    "<value>"))
                .repo("<value>")
                .build();

        GithubConfigureMintlifyRepoResponse res = sdk.github().configureMintlifyRepo()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

GithubConfigureMintlifyRepoResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

configureTarget

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubConfigureTargetResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubConfigureTargetRequest req = GithubConfigureTargetRequest.builder()
                .org("<value>")
                .repoName("<value>")
                .build();

        GithubConfigureTargetResponse res = sdk.github().configureTarget()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

GithubConfigureTargetResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

getAction

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetGitHubActionRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetGitHubActionResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GetGitHubActionRequest req = GetGitHubActionRequest.builder()
                .org("<value>")
                .repo("<value>")
                .build();

        GetGitHubActionResponse res = sdk.github().getAction()
                .request(req)
                .call();

        if (res.githubGetActionResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

GetGitHubActionResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

getSetup

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GetGithubSetupStateRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.GetGithubSetupStateResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GetGithubSetupStateRequest req = GetGithubSetupStateRequest.builder()
                .generateGenLockId("<id>")
                .org("<value>")
                .repo("<value>")
                .build();

        GetGithubSetupStateResponse res = sdk.github().getSetup()
                .request(req)
                .call();

        if (res.githubSetupStateResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

GetGithubSetupStateResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

linkGithub

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.LinkGithubAccessRequest;
import dev.speakeasyapi.javaclientsdk.models.operations.LinkGithubAccessResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        LinkGithubAccessRequest req = LinkGithubAccessRequest.builder()
                .build();

        LinkGithubAccessResponse res = sdk.github().linkGithub()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

LinkGithubAccessResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

storePublishingSecrets

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubStorePublishingSecretsRequest req = GithubStorePublishingSecretsRequest.builder()
                .generateGenLockId("<value>")
                .build();

        GithubStorePublishingSecretsResponse res = sdk.github().storePublishingSecrets()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

GithubStorePublishingSecretsResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*

triggerAction

Example Usage

package hello.world;

import dev.speakeasyapi.javaclientsdk.RyanTest;
import dev.speakeasyapi.javaclientsdk.models.errors.Error;
import dev.speakeasyapi.javaclientsdk.models.operations.GithubTriggerActionResponse;
import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest;
import dev.speakeasyapi.javaclientsdk.models.shared.Security;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws Error, Exception {

        RyanTest sdk = RyanTest.builder()
                .security(Security.builder()
                    .apiKey("<YOUR_API_KEY_HERE>")
                    .build())
            .build();

        GithubTriggerActionRequest req = GithubTriggerActionRequest.builder()
                .genLockId("<id>")
                .org("<value>")
                .repoName("<value>")
                .build();

        GithubTriggerActionResponse res = sdk.github().triggerAction()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

GithubTriggerActionResponse

Errors

Error Type Status Code Content Type
models/errors/Error 4XX application/json
models/errors/SDKError 5XX */*