Interface VersionFile

interface VersionFile {
    file_type: null | "required-resource-pack" | "optional-resource-pack";
    filename: string;
    hashes: { sha1: string; sha512: string };
    primary: boolean;
    size: number;
    url: string;
}

Properties

file_type: null | "required-resource-pack" | "optional-resource-pack"

The type of the additional file, used mainly for adding resource packs to datapacks

filename: string

The name of the file

hashes: { sha1: string; sha512: string }

A map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash.

primary: boolean

Whether this file is the primary one for its version. Only a maximum of one file per version will have this set to true. If there are not any primary files, it can be inferred that the first file is the primary one.

size: number

The size of the file in bytes

url: string

A direct link to the file