Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Latest commit

 

History

History
209 lines (145 loc) · 9.58 KB

README.md

File metadata and controls

209 lines (145 loc) · 9.58 KB

appV1

Overview

Operations that allow you manage your applications.

Available Operations

CreateApp

Create a new application.

Example Usage

using Hathora;
using Hathora.Models.Shared;
using Hathora.Models.Operations;

var sdk = new HathoraSDK(
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2"
);

using(var res = await sdk.AppV1.CreateAppAsync(new CreateAppSecurity() {
        HathoraDevToken = "",
    }, new AppConfig() {
        AppName = "minecraft",
        AuthConfiguration = new AuthConfiguration() {
            Anonymous = new RecordStringNever() {},
            Google = new AuthConfigurationGoogle() {
                ClientId = "provident",
            },
            Nickname = new RecordStringNever() {},
        },
    }))
{
    // handle response
}

Parameters

Parameter Type Required Description
request AppConfig ✔️ The request object to use for the request.
security CreateAppSecurity ✔️ The security requirements to use for the request.

Response

CreateAppResponse

DeleteApp

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

Example Usage

using Hathora;
using Hathora.Models.Operations;

var sdk = new HathoraSDK(
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2"
);

using(var res = await sdk.AppV1.DeleteAppAsync(new DeleteAppSecurity() {
        HathoraDevToken = "",
    }, new DeleteAppRequest() {}))
{
    // handle response
}

Parameters

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

Response

DeleteAppResponse

GetAppInfo

Get details for an application using appId.

Example Usage

using Hathora;
using Hathora.Models.Operations;

var sdk = new HathoraSDK(
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2"
);

using(var res = await sdk.AppV1.GetAppInfoAsync(new GetAppInfoSecurity() {
        HathoraDevToken = "",
    }, new GetAppInfoRequest() {}))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetAppInfoRequest ✔️ The request object to use for the request.
security GetAppInfoSecurity ✔️ The security requirements to use for the request.

Response

GetAppInfoResponse

GetApps

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

Example Usage

using Hathora;
using Hathora.Models.Operations;

var sdk = new HathoraSDK(
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2"
);

using(var res = await sdk.AppV1.GetAppsAsync(new GetAppsSecurity() {
        HathoraDevToken = "",
    }))
{
    // handle response
}

Parameters

Parameter Type Required Description
security GetAppsSecurity ✔️ The security requirements to use for the request.

Response

GetAppsResponse

UpdateApp

Update data for an existing application using appId.

Example Usage

using Hathora;
using Hathora.Models.Operations;
using Hathora.Models.Shared;

var sdk = new HathoraSDK(
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2"
);

using(var res = await sdk.AppV1.UpdateAppAsync(new UpdateAppSecurity() {
        HathoraDevToken = "",
    }, new UpdateAppRequest() {
        AppConfig = new AppConfig() {
            AppName = "minecraft",
            AuthConfiguration = new AuthConfiguration() {
                Anonymous = new RecordStringNever() {},
                Google = new AuthConfigurationGoogle() {
                    ClientId = "distinctio",
                },
                Nickname = new RecordStringNever() {},
            },
        },
    }))
{
    // handle response
}

Parameters

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

Response

UpdateAppResponse