Skip to main content
Module

x/dynablox_opencloud/mod.ts>OpenCloudClient

A Roblox OpenCloud API wrapper for Deno and NodeJS written in TypeScript.
Latest
class OpenCloudClient
extends BaseClient
import { OpenCloudClient } from "https://deno.land/x/dynablox_opencloud@v0.2.2/mod.ts";

Open cloud client for open cloud.

Constructors

new
OpenCloudClient(options: OpenCloudClientOptions)

Properties

private
readonly
_ratelimiterShouldYield: boolean

Whether the ratelimiter should yield instead of throwing an error.

private
_scopes: Scope[]

The scopes allowed.

readonly
ratelimiter: RatelimitHelper

The Ratelimit helper class.

readonly
ratelimiterSubjectId: number

The ID of the ratelimiter subject.

readonly
requestRetryCount: number

Retry count for 500, 502, and 504 responses.

readonly
requestRetryTimeout: number

Retry timeout for 500, 502, and 504 responses in milliseconds.

readonly
scopes

Methods

canAccessResource<ScopeType extends Scope["scopeType"]>(
scopeType: ScopeType,
parts: Extract<Scope, { scopeType: ScopeType; }>["targetParts"],
operation: Extract<Scope, { scopeType: ScopeType; }>["operations"][number],
partsOptional: boolean[],
): void

Errors if the API key can not access the resource.

getBaseUniverse(universeId: number): BaseUniverse

Gets a base Universe by id.

setScopes(scopes: Scope[]): void

Set the allowed scopes.