curseforge

package
v0.0.0-...-86c7e5b Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAPI = API{}

Functions

func SizeBytes

func SizeBytes(s int) (float32, string)

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func (*API) DownloadURL

func (api *API) DownloadURL(addon uint, file uint) (string, error)

func (*API) FindAddons

func (api *API) FindAddons(query string, typ uint) ([]AddonSearch, error)

type AddonAttachment

type AddonAttachment struct {
	IsDefault    bool   `json:"isDefault"`
	ThumbnailURL string `json:"thumbnailUrl"`
	URL          string `json:"url"`
}

type AddonFile

type AddonFile struct {
	ID          int `json:"id"`
	FileName    string
	FileDate    time.Time
	FileLength  int
	DownloadURL string `json:"downloadUrl"`
}

func GetLatest

func GetLatest(aa []AddonFile) (af *AddonFile)

type AddonSearch

type AddonSearch struct {
	ID                 int               `json:"id"`
	Name               string            `json:"name"`
	Summary            string            `json:"summary"`
	WebsiteURL         string            `json:"websiteUrl"`
	Slug               string            `json:"slug"`
	DownloadCount      float64           `json:"downloadCount"`
	PopularityScore    float64           `json:"popularityScore"`
	GamePopularityRank int64             `json:"gamePopularityRank"`
	Attachments        []AddonAttachment `json:"attachments"`
	CategorySection    AddonSection
	LatestFiles        []AddonFile
}

type AddonSection

type AddonSection struct {
	PackageType int `json:"packageType"`
}

type ModpackFile

type ModpackFile struct {
	ProjectID int  `json:"projectID"`
	FileID    int  `json:"fileID"`
	Required  bool `json:"required"`
}

type ModpackManifest

type ModpackManifest struct {
	Minecraft struct {
		Version string `json:"version"`
	} `json:"minecraft"`
	Name    string        `json:"name"`
	Version string        `json:"version"`
	Files   []ModpackFile `json:"files"`
}

Jump to

Keyboard shortcuts

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