Skip to content

Latest commit

 

History

History
251 lines (163 loc) · 14.7 KB

README.md

File metadata and controls

251 lines (163 loc) · 14.7 KB

ProcessesV2

(ProcessesV2)

Overview

Operations to get data on active and stopped processes.

Available Operations

CreateProcessV2Deprecated

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

CreateProcessV2DeprecatedRequest req = new CreateProcessV2DeprecatedRequest() {
    Region = Region.Mumbai,
};


using(var res = await sdk.ProcessesV2.CreateProcessV2DeprecatedAsync(req))
{
    // handle response
}

Parameters

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

Response

CreateProcessV2DeprecatedResponse

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 /

GetLatestProcessesV2Deprecated

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

GetLatestProcessesV2DeprecatedRequest req = new GetLatestProcessesV2DeprecatedRequest() {};


using(var res = await sdk.ProcessesV2.GetLatestProcessesV2DeprecatedAsync(req))
{
    // handle response
}

Parameters

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

Response

GetLatestProcessesV2DeprecatedResponse

Errors

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

GetProcessInfoV2Deprecated

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

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


using(var res = await sdk.ProcessesV2.GetProcessInfoV2DeprecatedAsync(req))
{
    // handle response
}

Parameters

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

Response

GetProcessInfoV2DeprecatedResponse

Errors

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

GetProcessesCountExperimentalV2Deprecated

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

GetProcessesCountExperimentalV2DeprecatedRequest req = new GetProcessesCountExperimentalV2DeprecatedRequest() {};


using(var res = await sdk.ProcessesV2.GetProcessesCountExperimentalV2DeprecatedAsync(req))
{
    // handle response
}

Parameters

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

Response

GetProcessesCountExperimentalV2DeprecatedResponse

Errors

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

StopProcessV2Deprecated

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

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


using(var res = await sdk.ProcessesV2.StopProcessV2DeprecatedAsync(req))
{
    // handle response
}

Parameters

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

Response

StopProcessV2DeprecatedResponse

Errors

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