modrinth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(idVersion string) *Client

func (*Client) GetVersions

func (c *Client) GetVersions(ctx context.Context, projectId, loader, gameVersion string) ([]*Version, error)

type Version

type Version struct {
	VersionType   VersionType `json:"version_type"`
	DatePublished time.Time   `json:"date_published"`
	Files         []*struct {
		Hashes struct {
			Sha1 string `json:"sha1"`
		}
		Url      string `json:"url"`
		Filename string `json:"filename"`
		Primary  bool   `json:"primary"`
		Size     int64  `json:"size"`
	} `json:"files"`
}

type VersionType

type VersionType string
const (
	Alpha   VersionType = "alpha"
	Beta    VersionType = "beta"
	Release VersionType = "release"
)

Jump to

Keyboard shortcuts

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