internetarchive-sdk-js
    Preparing search index...

    Class InternetArchive

    Index

    Constructors

    Properties

    httpClient: HttpClient
    options?: { setScanner?: boolean; testmode?: boolean }
    token?: null | string
    default: typeof InternetArchive

    Methods

    • Creates an Item in a Collection (Uploads a file and adds metadata).

      Parameters

      • item: {
            collection: string;
            identifier: string;
            mediatype:
                | "data"
                | "collection"
                | "audio"
                | "etree"
                | "image"
                | "movies"
                | "software"
                | "texts"
                | "web";
            metadata?: Record<string, unknown>;
            upload: FileUpload;
        }

        identifier, collection, mediatype, upload, metadata.

        • collection: string

          The collection that the item belongs to.

        • identifier: string

          The unique identifier for the item.

        • mediatype:
              | "data"
              | "collection"
              | "audio"
              | "etree"
              | "image"
              | "movies"
              | "software"
              | "texts"
              | "web"

          The item mediatype.

        • Optionalmetadata?: Record<string, unknown>

          The item metadata (optional).

        • upload: FileUpload

          The item upload.

      Returns Promise<CreateItemResponse>

      The item identifier, metadata, and upload filename.

    • Uploads a File to a parent Item.

      Parameters

      • upload: {
            file: FileUpload;
            identifier: string;
            mediatype:
                | "data"
                | "collection"
                | "audio"
                | "etree"
                | "image"
                | "movies"
                | "software"
                | "texts"
                | "web";
        }

        identifier, mediatype, file.

        • file: FileUpload

          The upload file.

        • identifier: string

          The unique identifier of the parent item.

        • mediatype:
              | "data"
              | "collection"
              | "audio"
              | "etree"
              | "image"
              | "movies"
              | "software"
              | "texts"
              | "web"

          The upload mediatype.

      Returns Promise<void>