Skip to content

Latest commit

 

History

History
254 lines (167 loc) · 10.9 KB

README.md

File metadata and controls

254 lines (167 loc) · 10.9 KB

AppsV2

(AppsV2)

Overview

Available Operations

CreateApp

Create a new application.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

CreateAppRequest req = new CreateAppRequest() {
    AppConfig = new AppConfig() {
        AppName = "minecraft",
        AuthConfiguration = new AuthConfiguration() {},
    },
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.AppsV2.CreateAppAsync(req))
{
    // handle response
}

Parameters

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

Response

CreateAppResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,422,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

DeleteApp

Delete an application using appId. Your organization will lose access to this application.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

DeleteAppRequest req = new DeleteAppRequest() {};


using(var res = await sdk.AppsV2.DeleteAppAsync(req))
{
    // handle response
}

Parameters

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

Response

DeleteAppResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetApp

Get details for an application using appId.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

GetAppRequest req = new GetAppRequest() {};


using(var res = await sdk.AppsV2.GetAppAsync(req))
{
    // handle response
}

Parameters

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

Response

GetAppResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,429 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetApps

Returns an unsorted list of your organization’s applications. An application is uniquely identified by an appId.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

GetAppsRequest req = new GetAppsRequest() {
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.AppsV2.GetAppsAsync(req))
{
    // handle response
}

Parameters

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

Response

GetAppsResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,429 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

UpdateApp

Update data for an existing application using appId.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

UpdateAppRequest req = new UpdateAppRequest() {
    AppConfig = new AppConfig() {
        AppName = "minecraft",
        AuthConfiguration = new AuthConfiguration() {},
    },
};


using(var res = await sdk.AppsV2.UpdateAppAsync(req))
{
    // handle response
}

Parameters

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

Response

UpdateAppResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404,422,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /