curseforge

package
v0.0.0-...-ca13a8c Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PageSize = 50

Variables

This section is empty.

Functions

func Call

func Call(u string, ctx context.Context) (*http.Response, error)

func GetReleaseType

func GetReleaseType(i int) string

func GetThumbnail

func GetThumbnail(url string, ctx context.Context) (image.Image, error)

func IsAllowedFile

func IsAllowedFile(i int) bool

func StartGameCacheSyncer

func StartGameCacheSyncer()

Types

type Addon

type Addon struct {
	Id                uint
	GameId            uint
	Name              string
	Slug              string
	Links             Links
	Summary           string
	DownloadCount     float64
	PrimaryCategoryId uint
	Categories        []Category
	Authors           []Author
	Screenshots       []Attachment
	DateCreated       time.Time
	DateModified      time.Time
	DateReleased      time.Time
}

type Attachment

type Attachment struct {
	Id           uint
	Title        string
	Description  string
	ThumbnailUrl string
	Url          string
}

type Author

type Author struct {
	Id   uint
	Name string
	Url  string
}

type Category

type Category struct {
	Id               uint
	Name             string
	ParentCategoryId uint
	Slug             string
	ClassId          uint
}

func GetCategories

func GetCategories(gameId uint, ctx context.Context) ([]Category, error)

func GetPrimaryCategoryFor

func GetPrimaryCategoryFor(categories []Category, id uint) Category

type CategoryResponse

type CategoryResponse struct {
	PagedResponse
	Data []Category
}

type DescriptionResponse

type DescriptionResponse struct {
	Response
	Data string
}

type File

type File struct {
	Id              uint
	IsAvailable     bool
	DisplayName     string
	FileName        string
	ReleaseType     int
	FileStatus      int
	FileDate        time.Time
	FileLength      uint64
	DownloadCount   uint
	DownloadUrl     string
	AlternateFileId uint
	GameVersions    []string
}

func GetFiles

func GetFiles(projectId uint, ctx context.Context) ([]File, error)

type FilesResponse

type FilesResponse struct {
	PagedResponse
	Data []File
}

type Game

type Game struct {
	Id   uint
	Name string
	Slug string
}

func GetGame

func GetGame(gameId uint) Game

func GetGameBySlug

func GetGameBySlug(slug string) Game

type GameResponse

type GameResponse struct {
	PagedResponse
	Data []Game
}
type Links struct {
	WebsiteUrl string
	WikiUrl    string
	IssuesUrl  string
	SourceUrl  string
}

type PagedResponse

type PagedResponse struct {
	Response
	Pagination Pagination
}

type Pagination

type Pagination struct {
	Index       int
	PageSize    int
	ResultCount int
	TotalCount  int
}

type ProjectResponse

type ProjectResponse struct {
	Response
	Data Addon
}

type Response

type Response struct{}

type SearchResponse

type SearchResponse struct {
	PagedResponse
	Data []Addon
}

Jump to

Keyboard shortcuts

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