H5P NodeJS Library
    Preparing search index...

    This class has methods that perform library administration, i.e, deleted libraries. All parameters undergo validation and proper exceptions are thrown when something went wrong.

    Index

    Constructors

    Properties

    contentManager: ContentManager
    libraryManager: LibraryManager

    Methods

    • Deletes a library.

      Throws H5pError with HTTP status code 423 if the library cannot be deleted because it is still in use.

      Parameters

      • ubername: string

        the ubername of the library to delete

      Returns Promise<void>

    • Returns detailed information about the library and its use.

      Parameters

      • ubername: string

      Returns Promise<
          IInstalledLibrary & {
              dependentsCount: number;
              instancesAsDependencyCount: number;
              instancesCount: number;
              isAddon: boolean;
          },
      >

    • Changes the restricted status of a library

      Parameters

      • ubername: string

        the library's ubername you want to change

      • restricted: boolean

        the new value

      Returns Promise<void>