api

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadModPackage

func DownloadModPackage(modAuthor, modName, modVersion string) (string, error)

DownloadModPackage downloads the specified mod package as a zip file to a temporary location.

Types

type GlobalModView

type GlobalModView struct {
	ModAuthor  string `json:"mod_author"`
	ModName    string `json:"mod_name"`
	ModPicture string `json:"mod_picture"`
}

func GlobalListMods

func GlobalListMods(ordering OrderingType, sectionType SectionType, query string, page int) ([]GlobalModView, error)

GlobalListMods fetches and parses the mod list from Thunderstore.

type ModDetailsResponse

type ModDetailsResponse struct {
	Downloads     int    `json:"downloads"`
	RatingScore   int    `json:"rating_score"`
	LatestVersion string `json:"latest_version"`
}

func FetchModDetails

func FetchModDetails(modAuthor, modName string) (*ModDetailsResponse, error)

type OrderingType

type OrderingType string
const (
	LastUpdated    OrderingType = "last-updated"
	Newest         OrderingType = "newest"
	MostDownloaded OrderingType = "most-downloaded"
	TopRated       OrderingType = "top-rated"
)

type SectionType

type SectionType string
const (
	Mods              SectionType = "mods"
	AssetReplacements SectionType = "asset-replacements"
	Libraries         SectionType = "libraries"
	Modpacks          SectionType = "modpacks"
)

Jump to

Keyboard shortcuts

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