RTSDK
    Preparing search index...

    Class WorldFactory

    const World = new WorldFactory(myTopiaInstance);
    

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

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

    Methods

    • Instantiate a new instance of World class.

      Parameters

      Returns World

      Returns a new World object.

      const worldInstance = await World.create(urlSlug, { credentials: { interactiveNonce, interactivePublicKey, assetId, urlSlug, visitorId } });
      
    • Deletes an array of Dropped Assets from within a world and returns success: true

      Parameters

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

      Returns Promise<{ success: boolean }>

      Returns { success: true } or an error.

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

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

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

    • Returns AxiosInstance