api

package
v0.0.0-...-7b00221 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModrinthBaseUrl = "https://api.modrinth.com/v2/"
)

Variables

View Source
var Logger = log.Default()

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseUrl             string
	Ratelimit_limit     int
	Ratelimit_remaining int
	Ratelimit_reset     int
}

func NewClient

func NewClient(baseUrl string) *Client

func NewModrinthClient

func NewModrinthClient() *Client

func (*Client) GetLatestVersionFromHash

func (c *Client) GetLatestVersionFromHash(hashAlgorithm modrinth.HashAlgorithm, hash string, getLatestVersionFromHashBody modrinth.GetLatestVersionFromHashBody) (modrinth.Version, error)

func (*Client) GetModFileFromVersionFile

func (c *Client) GetModFileFromVersionFile(versionFile modrinth.VersionFile) (ModFile io.ReadCloser, err error)

func (*Client) ListProjectsVersions

func (c *Client) ListProjectsVersions(idORslug string, loaders []string, game_versions []string) ([]modrinth.Version, error)

func (*Client) SearchProjects

func (c *Client) SearchProjects(query string, facets []modrinth.Facet, index modrinth.Index, offset int, limit int) (modrinth.SearchResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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