paper

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiURL = fmt.Sprintf("https://api.papermc.io/v%d/", ApiVersion)
View Source
var ApiVersion = 2
View Source
var ErrNoStableVer = errors.New("no stable version found")

Functions

func GetProjectVersionBuildDownload

func GetProjectVersionBuildDownload(project string, version string, build int, path string) (*mcsrvapi.DownloadChecksums, error)

Types

type PaperProject

type PaperProject struct {
	ProjectID     string   `json:"project_id"`
	ProjectName   string   `json:"project_name"`
	VersionGroups []string `json:"version_groups"`
	Versions      []string `json:"versions"`
}

func GetProject

func GetProject(project string) (*PaperProject, error)

func (*PaperProject) DownloadURL added in v0.1.2

func (p *PaperProject) DownloadURL(version string, stable bool) (*string, error)

func (*PaperProject) GetVersion added in v0.1.2

func (p *PaperProject) GetVersion(version string) (*PaperProjectVersion, error)

func (*PaperProject) GetVersionBuilds added in v0.1.2

func (p *PaperProject) GetVersionBuilds(version string) (*PaperProjectVersionBuilds, error)

type PaperProjectChanges

type PaperProjectChanges struct {
	Commit  string `json:"commit"`
	Summary string `json:"summary"`
	Message string `json:"message"`
}

type PaperProjectDownload

type PaperProjectDownload struct {
	Name   string `json:"name"`
	Sha256 string `json:"sha256"`
}

type PaperProjectDownloads

type PaperProjectDownloads struct {
	Application    PaperProjectDownload `json:"application"`
	MojangMappings PaperProjectDownload `json:"mojang-mappings"`
}

type PaperProjectVersion

type PaperProjectVersion struct {
	ProjectID   string `json:"project_id"`
	ProjectName string `json:"project_name"`
	Version     string `json:"version"`
	Builds      []int  `json:"builds"`
}

func GetProjectVersion

func GetProjectVersion(project string, version string) (*PaperProjectVersion, error)

type PaperProjectVersionBuild

type PaperProjectVersionBuild struct {
	ProjectID   string                `json:"project_id"`
	ProjectName string                `json:"project_name"`
	Build       int                   `json:"build"`
	Time        time.Time             `json:"time"`
	Channel     string                `json:"string"`
	Promoted    bool                  `json:"promoted"`
	Changes     []PaperProjectChanges `json:"changes"`
	Downloads   PaperProjectDownloads `json:"downloads"`
}

func GetProjectVersionBuild

func GetProjectVersionBuild(project string, version string, build int) (*PaperProjectVersionBuild, error)

type PaperProjectVersionBuildBase

type PaperProjectVersionBuildBase struct {
	Build     int                   `json:"build"`
	Time      time.Time             `json:"time"`
	Channel   string                `json:"channel"`
	Promoted  bool                  `json:"promoted"`
	Changes   []PaperProjectChanges `json:"changes"`
	Downloads PaperProjectDownloads `json:"downloads"`
}

type PaperProjectVersionBuilds

type PaperProjectVersionBuilds struct {
	ProjectID   string                         `json:"project_id"`
	ProjectName string                         `json:"project_name"`
	Version     string                         `json:"string"`
	Builds      []PaperProjectVersionBuildBase `json:"builds"`
}

func GetProjectVersionBuilds

func GetProjectVersionBuilds(project string, version string) (*PaperProjectVersionBuilds, error)

func (PaperProjectVersionBuilds) LatestBuild added in v0.1.2

func (PaperProjectVersionBuilds) LatestStableBuild added in v0.1.2

type PaperProjectVersionGroup

type PaperProjectVersionGroup struct {
	ProjectID    string   `json:"project_id"`
	ProjectName  string   `json:"project_name"`
	VersionGroup string   `json:"version_group"`
	Versions     []string `json:"versions"`
}

func GetProjectVersionGroup

func GetProjectVersionGroup(project string, group string) (*PaperProjectVersionGroup, error)

type PaperProjectVersionGroupBuilds

type PaperProjectVersionGroupBuilds struct {
	ProjectID    string                         `json:"project_id"`
	ProjectName  string                         `json:"project_name"`
	VersionGroup string                         `json:"version_group"`
	Versions     []string                       `json:"versions"`
	Builds       []PaperProjectVersionBuildBase `json:"builds"`
}

func GetProjectVersionGroupBuilds

func GetProjectVersionGroupBuilds(project string, group string) (*PaperProjectVersionGroupBuilds, error)

type PaperProjects

type PaperProjects struct {
	Projects []string `json:"projects"`
}

func GetProjects

func GetProjects() (*PaperProjects, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL