Documentation ¶
Index ¶
Constants ¶
View Source
const Endpoint = "api.cfwidget.com"
Endpoint is the CFWidget API endpoint domain.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { ID int URL string Display string Name string Type string Version string FileSize int Versions []string Downloads int UploadedAt time.Time `json:"uploaded_at"` }
File represents information about a file, as returned by CFWidget.
func (*File) ActualName ¶
ActualName returns the actual name of a mod, because CurseForge replaces spaces with pluses.
type ModInfo ¶
type ModInfo struct { ID int Title string Summary string Game string Type string URLs struct { CurseForge string Project string } Files []File Downloads struct { // Monthly is always 0 because of API changes. Monthly int Total int } Thumbnail string Categories []string CreatedAt time.Time `json:"created_at"` Description string LastFetch time.Time `json:"last_fetch"` Download File }
ModInfo represents information about a mod, as returned from CFWidget.
func GetModInfo ¶
GetModInfo returns the info for a mod by its URL. See https://cfwidget.com/#documentation:about for more information.
Click to show internal directories.
Click to hide internal directories.