Class WorldFactory

Usage

const World = new WorldFactory(myTopiaInstance);

Hierarchy

Constructors

Properties

credentials: undefined | InteractiveCredentials
jwt?: string
requestOptions: object
topia: Topia

Methods

  • Summary

    Instantiate a new instance of World class.

    Usage

    const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, visitorId } });
    

    Parameters

    Returns World

  • Summary

    Deletes an array of Dropped Assets from within a world and returns success: true

    Usage

    await World.deleteDroppedAssets(urlSlug, ["exampleDroppedAssetId1", "exampleDroppedAssetId2"], interactiveSecret, credentials);
    

    Parameters

    • urlSlug: string
    • droppedAssetIds: string[]
    • interactiveSecret: string
    • credentials: {
          apiKey?: string;
          interactiveNonce?: string;
          interactivePublicKey: string;
          visitorId?: number;
      }
      • Optional apiKey?: string
      • Optional interactiveNonce?: string
      • interactivePublicKey: string
      • Optional visitorId?: number

    Returns Promise<{
        success: boolean;
    }>

  • Parameters

    • __namedParameters: {
          error?: unknown;
          message?: string;
          params?: object;
          sdkMethod?: string;
      }
      • Optional error?: unknown
      • Optional message?: string
      • Optional params?: object
      • Optional sdkMethod?: string

    Returns {
        data: {};
        message: string;
        method: string;
        params: object;
        sdkMethod: undefined | string;
        stack: string;
        stackTrace: Error;
        status: number;
        success: boolean;
        url: string;
    }

    • data: {}
      • message: string
      • method: string
      • params: object
      • sdkMethod: undefined | string
      • stack: string
      • stackTrace: Error
      • status: number
      • success: boolean
      • url: string
    • Returns AxiosInstance