Skip to content

Latest commit

 

History

History
249 lines (162 loc) · 12.6 KB

README.md

File metadata and controls

249 lines (162 loc) · 12.6 KB

ProcessesV3

(ProcessesV3)

Overview

Available Operations

CreateProcess

Creates a process without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via CreateRoom() can be instant.

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");

CreateProcessRequest req = new CreateProcessRequest() {
    Region = Region.Tokyo,
};


using(var res = await sdk.ProcessesV3.CreateProcessAsync(req))
{
    // handle response
}

Parameters

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

Response

CreateProcessResponse

Errors

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

GetLatestProcesses

Retrieve the 10 most recent processes objects for an application. Filter the array by optionally passing in a status or region.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
using System.Collections.Generic;

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

GetLatestProcessesRequest req = new GetLatestProcessesRequest() {};


using(var res = await sdk.ProcessesV3.GetLatestProcessesAsync(req))
{
    // handle response
}

Parameters

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

Response

GetLatestProcessesResponse

Errors

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

GetProcess

Get details for a process.

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");

GetProcessRequest req = new GetProcessRequest() {
    ProcessId = "cbfcddd2-0006-43ae-996c-995fff7bed2e",
};


using(var res = await sdk.ProcessesV3.GetProcessAsync(req))
{
    // handle response
}

Parameters

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

Response

GetProcessResponse

Errors

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

GetProcessesCountExperimental

Count the number of processes objects for an application. Filter by optionally passing in a status or region.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;
using System.Collections.Generic;

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

GetProcessesCountExperimentalRequest req = new GetProcessesCountExperimentalRequest() {};


using(var res = await sdk.ProcessesV3.GetProcessesCountExperimentalAsync(req))
{
    // handle response
}

Parameters

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

Response

GetProcessesCountExperimentalResponse

Errors

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

StopProcess

Stops a process immediately.

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");

StopProcessRequest req = new StopProcessRequest() {
    ProcessId = "cbfcddd2-0006-43ae-996c-995fff7bed2e",
};


using(var res = await sdk.ProcessesV3.StopProcessAsync(req))
{
    // handle response
}

Parameters

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

Response

StopProcessResponse

Errors

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