curseforge

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallAddon

func InstallAddon(file File, dest string) error

Types

type Client

type Client struct {
	DownloadPath string
	Client       *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) DownloadFile

func (c *Client) DownloadFile(modId int, file File) (File, error)

func (*Client) GetFiles

func (c *Client) GetFiles(modId int) (FileSet, error)

func (*Client) InstallAddon

func (c *Client) InstallAddon(file File, dest string) error

func (*Client) NegotiateFile

func (c *Client) NegotiateFile(files FileSet) File

type File

type File struct {
	Id           int       `json:"id"`
	Filename     string    `json:"filename"`
	GameVersions []string  `json:"gameVersions"`
	DateCreated  time.Time `json:"dateCreated"`
	Location     string    `json:"location"`
}

func DownloadFile

func DownloadFile(modId int, file File) (File, error)

func NegotiateFile

func NegotiateFile(files FileSet) File

type FileSet

type FileSet struct {
	Data []File `json:"data"`
}

func GetFiles

func GetFiles(modId int) (FileSet, error)

Jump to

Keyboard shortcuts

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