Skip to content

Commit

Permalink
docs: mark new API beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Mar 7, 2020
1 parent 1bc71ef commit d1618d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/installer/fabric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ export const DEFAULT_FABRIC_API = "https://meta.fabricmc.net/v2";
/**
* Get all the artifacts provided by fabric
* @param remote The fabric API host
* @beta
*/
export function getArtifacts(remote: string = DEFAULT_FABRIC_API): Promise<FabricArtifacts> {
return got(remote + "/versions").json();
}
/**
* Get fabric-yarn artifact list
* @param remote The fabric API host
* @beta
*/
export function getYarnArtifactList(remote: string = DEFAULT_FABRIC_API): Promise<FabricArtifactVersion[]> {
return got(remote + "/versions/yarn").json();
Expand All @@ -73,13 +75,15 @@ export function getYarnArtifactList(remote: string = DEFAULT_FABRIC_API): Promis
* Get fabric-yarn artifact list by Minecraft version
* @param minecraft The Minecraft version
* @param remote The fabric API host
* @beta
*/
export function getYarnArtifactListFor(minecraft: string, remote: string = DEFAULT_FABRIC_API): Promise<FabricArtifactVersion[]> {
return got(remote + "/versions/yarn/" + minecraft).json();
}
/**
* Get fabric-loader artifact list
* @param remote The fabric API host
* @beta
*/
export function getLoaderArtifactList(remote: string = DEFAULT_FABRIC_API): Promise<FabricArtifactVersion[]> {
return got(remote + "/versions/loader").json();
Expand All @@ -88,6 +92,7 @@ export function getLoaderArtifactList(remote: string = DEFAULT_FABRIC_API): Prom
* Get fabric-loader artifact list by Minecraft version
* @param minecraft The minecraft version
* @param remote The fabric API host
* @beta
*/
export function getLoaderArtifactListFor(minecraft: string, remote: string = DEFAULT_FABRIC_API): Promise<LoaderArtifact[]> {
return got(remote + "/versions/loader/" + minecraft).json();
Expand All @@ -97,6 +102,7 @@ export function getLoaderArtifactListFor(minecraft: string, remote: string = DEF
* @param minecraft The minecraft version
* @param loader The yarn-loader version
* @param remote The fabric API host
* @beta
*/
export function getLoaderArtifact(minecraft: string, loader: string, remote: string = DEFAULT_FABRIC_API): Promise<LoaderArtifact> {
return got(remote + "/versions/loader/" + minecraft + "/" + loader).json();
Expand Down Expand Up @@ -198,6 +204,7 @@ export async function install(yarnVersion: string, loaderVersion: string, minecr
* @param loader The loader artifact
* @param minecraft The Minecraft Location
* @param options The options
* @beta
*/
export async function installFromVersionMeta(side: "client" | "server", yarnVersion: string | FabricArtifactVersion, loader: LoaderArtifact, minecraft: MinecraftLocation, options: InstallOptions = {}) {
const folder = MinecraftFolder.from(minecraft);
Expand Down

0 comments on commit d1618d7

Please sign in to comment.