@audiotool/nexus - v0.0.12
    Preparing search index...

    Type Alias AudiotoolClient

    An instance of the client that's authorized to make calls on a use's behalf.

    Lets you create synced documents and make API calls to the audiotool backend.

    Use getLoginStatus to get authorized to make calls on a user's behalf.

    const status = await getLoginStatus({...})
    if (status.loggedIn){
    const client = await createAudiotoolClient({authorization: status});
    } else {
    console.error("User is not logged in");
    }
    type AudiotoolClient = {
        api: AudiotoolAPI;
        createSyncedDocument: (
            opts: { project: string },
        ) => Promise<SyncedDocument>;
    }
    Index

    Properties

    Collection of Audiotool API service clients.

    Provides access to all Audiotool services including projects, users, samples, presets, and more. All services use retrying clients that handle network issues gracefully.

    createSyncedDocument: (opts: { project: string }) => Promise<SyncedDocument>

    Create a synced document instance for real-time collaboration.

    Make sure to call SyncedDocument.start to start the synchronization process, and SyncedDocument.stop before throwing the document away.

    Type declaration

      • (opts: { project: string }): Promise<SyncedDocument>
      • Parameters

        • opts: { project: string }

          Configuration for the document connection

          • project: string

            The project to sync to; this can be anything containing a project's UUID, e.g. the URL of the studio when the project is open in the browser.

        Returns Promise<SyncedDocument>

        Promise resolving to a SyncedDocument instance