Skip to content

Latest commit

 

History

History
368 lines (243 loc) · 15 KB

File metadata and controls

368 lines (243 loc) · 15 KB

OrganizationsV1

(OrganizationsV1)

Overview

Available Operations

AcceptInvite

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

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


using(var res = await sdk.OrganizationsV1.AcceptInviteAsync(req))
{
    // handle response
}

Parameters

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

Response

AcceptInviteResponse

Errors

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

GetOrgMembers

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

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


using(var res = await sdk.OrganizationsV1.GetOrgMembersAsync(req))
{
    // handle response
}

Parameters

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

Response

GetOrgMembersResponse

Errors

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

GetOrgPendingInvites

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

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


using(var res = await sdk.OrganizationsV1.GetOrgPendingInvitesAsync(req))
{
    // handle response
}

Parameters

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

Response

GetOrgPendingInvitesResponse

Errors

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

GetOrgs

Returns an unsorted list of all organizations that you are a member of (an accepted membership invite). An organization is uniquely identified by an orgId.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;

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


using(var res = await sdk.OrganizationsV1.GetOrgsAsync())
{
    // handle response
}

Response

GetOrgsResponse

Errors

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

GetUserPendingInvites

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;

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


using(var res = await sdk.OrganizationsV1.GetUserPendingInvitesAsync())
{
    // handle response
}

Response

GetUserPendingInvitesResponse

Errors

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

InviteUser

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

InviteUserRequest req = new InviteUserRequest() {
    CreateUserInvite = new CreateUserInvite() {
        UserEmail = "[email protected]",
    },
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.OrganizationsV1.InviteUserAsync(req))
{
    // handle response
}

Parameters

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

Response

InviteUserResponse

Errors

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

RejectInvite

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

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


using(var res = await sdk.OrganizationsV1.RejectInviteAsync(req))
{
    // handle response
}

Parameters

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

Response

RejectInviteResponse

Errors

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

RescindInvite

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

RescindInviteRequest req = new RescindInviteRequest() {
    RescindUserInvite = new RescindUserInvite() {
        UserEmail = "[email protected]",
    },
    OrgId = "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39",
};


using(var res = await sdk.OrganizationsV1.RescindInviteAsync(req))
{
    // handle response
}

Parameters

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

Response

RescindInviteResponse

Errors

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