npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

papermc-api

v1.1.5-1

Published

Its a PaperMC Downloads API client for node.js.

Downloads

8

Readme

PaperMC Logo

PaperMC Downloads Api

NPM VERSION DOWNLOADS LICENSE BUILD

This library allows you to obtain version information of PaperMC projects and also generate download links.

Table of Contents:

Quickstart

Installing the client librery

npm install papermc-api

Documentation

PaperAPI.projects()

List all PaperMC projects.

let projects = await PaperAPI.projects(); // Returns array with all PaperMc projects.

PaperAPI.project(project_id)

Get the information of a PaperMC project. project_id: must be waterfall/velocity/paper.

let project = await PaperAPI.project("waterfall"); // Returns project info

PaperAPI.project(project_id).getVersion(version)

Get a version of a PaperMC project.

version: Must be a Minecraft Version. Example: 1.19.2

let project = await PaperAPI.project("waterfall"); // Returns project info

let version = await project.getVersion("1.19.2"); // Returns version info

PaperAPI.project(project_id).getVersion(version).getBuild(build_number)

Get the build information of a version of the PaperMC project

build_number: Must be a valid build number or latest. Example: 568 or latest

let project = await PaperAPI.project("waterfall"); // Returns project info

let version = await project.getVersion("1.19.2"); // Returns version info

let build = await version.getBuild("latest"); // Returns Build info

PaperAPI.project(project_id).getVersion(version).getBuild(build_number).getDownloadUrl(download)

Generates a link to download the specified file.

download optional: Specifies the file from which you want the link, in case you do not specify this parameter, the file will be downloaded applicaiton.

let project = await PaperAPI.project("waterfall"); // Returns project info

let version = await project.getVersion("1.19.2"); // Returns version info

let build = await version.getBuild("latest"); // Returns Build info

let downloadUrl = build.getDownloadUrl(); // Returns download URL for in this case waterfall 1.19.2

CLI

Using papermc API from terminal.

npm install -g papermc-api

Commands

projects : List all PaperMC projects.

project <project_id> [version] [build] : Show information of PaperMC project.

project_id: Must be an valid project id. Example: paper

version (optional): Must be an valid Minecraft Version. Example: 1.18

build (optional): Must be an valid build id of this project version. Example: 131

download : Downloads application jar of a PaperMC Project.

Options

-P, --path : This option sets the path where the download will be executed.

This command can be executed in two ways.

Frist Way: Only project id

You can just provide the project ID and the CLI will prompt you for the rest of the information.

Example:

DOWNLOAD-COMMAND-FIRST-WAY

Second Way: Providing the project ID and version

If you write the project ID in this format <project_id>@-[build] (build its optional) the application jar will be downloaded automatically in the working directory.

Example:

This command will download the latest build of version 1.19.2 of paper.

papercli download [email protected]

Contributing

To contribute this is the repository of this package.