Documentation
¶
Index ¶
- Constants
- func UnmarshalResponse[T any](rsp *http.Response, err error) (*T, error)
- type ApiResponseOfListOfMinecraftGameVersion
- type ApiResponseOfListOfMinecraftModLoaderIndex
- type ApiResponseOfMinecraftGameVersion
- type ApiResponseOfMinecraftModLoaderVersion
- type AuthorID
- type Category
- type FeaturedModsResponse
- type File
- type FileDependency
- type FileHash
- type FileID
- type FileIndex
- type FileModule
- type Fingerprint
- type FingerprintFuzzyMatch
- type FingerprintFuzzyMatchResult
- type FingerprintID
- type FingerprintMatch
- type FingerprintsMatchesResult
- type FolderFingerprint
- type Game
- type GameAssets
- type GameVersion
- type GameVersionID
- type GameVersionStr
- type GameVersionType
- type GameVersionTypeID
- type GameVersionsByType
- type GameVersionsByType2
- type GetCategoriesResponse
- type GetFeaturedModsRequestBody
- type GetFeaturedModsResponse
- type GetFilesResponse
- type GetFingerprintMatchesRequestBody
- type GetFingerprintMatchesResponse
- type GetFingerprintsFuzzyMatchesResponse
- type GetFuzzyMatchesRequestBody
- type GetGameResponse
- type GetGamesResponse
- type GetModFileResponse
- type GetModFilesRequestBody
- type GetModFilesResponse
- type GetModResponse
- type GetModsByIdsListRequestBody
- type GetModsResponse
- type GetVersionTypesResponse
- type GetVersionTypesResponseV2
- type GetVersionsResponse
- type MinecraftGameVersion
- type MinecraftGameVersionID
- type MinecraftModLoaderID
- type MinecraftModLoaderIndex
- type MinecraftModLoaderVersion
- type Mod
- type ModAsset
- type ModAssetID
- type ModAuthor
- type ModID
- type ModLinks
- type Pagination
- type Rating
- type SearchModsResponse
- type SortableGameVersion
- type StringResponse
Constants ¶
const (
BaseUrl = "https://api.curseforge.com"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiResponseOfListOfMinecraftGameVersion ¶ added in v0.2.0
type ApiResponseOfListOfMinecraftGameVersion struct {
Date []MinecraftGameVersion `json:"data"`
}
https://docs.curseforge.com/#tocS_ApiResponseOfListOfMinecraftGameVersion
type ApiResponseOfListOfMinecraftModLoaderIndex ¶ added in v0.2.0
type ApiResponseOfListOfMinecraftModLoaderIndex struct {
Data []MinecraftModLoaderIndex `json:"data"`
}
https://docs.curseforge.com/#tocS_ApiResponseOfListOfMinecraftModLoaderIndex
type ApiResponseOfMinecraftGameVersion ¶ added in v0.2.0
type ApiResponseOfMinecraftGameVersion struct {
Data MinecraftGameVersion `json:"data"`
}
https://docs.curseforge.com/#tocS_ApiResponseOfMinecraftGameVersion
type ApiResponseOfMinecraftModLoaderVersion ¶ added in v0.2.0
type ApiResponseOfMinecraftModLoaderVersion struct {
Data MinecraftModLoaderVersion `json:"data"`
}
https://docs.curseforge.com/#tocS_ApiResponseOfMinecraftModLoaderVersion
type Category ¶
type Category struct { ID enum.CategoryID `json:"id"` GameID enum.GameID `json:"gameId"` Name string `json:"name"` Slug string `json:"slug"` URL string `json:"url"` IconURL string `json:"iconUrl"` DateModified time.Time `json:"dateModified"` IsClass bool `json:"isClass"` ClassID enum.ClassID `json:"classId"` ParentCategoryID enum.CategoryID `json:"parentCategoryId"` DisplayIndex int32 `json:"displayIndex"` }
type FeaturedModsResponse ¶
type File ¶
type File struct { ID FileID `json:"id"` GameID enum.GameID `json:"gameId"` ModID ModID `json:"modId"` IsAvailable bool `json:"isAvailable"` DisplayName string `json:"displayName"` FileName string `json:"fileName"` ReleaseType enum.FileReleaseType `json:"releaseType"` FileStatus enum.FileStatus `json:"fileStatus"` Hashes []FileHash `json:"hashes"` FileDate time.Time `json:"fileDate"` FileLength int64 `json:"fileLength"` DownloadCount int64 `json:"downloadCount"` FileSizeOnDisk int64 `json:"fileSizeOnDisk"` DownloadURL string `json:"downloadUrl"` GameVersions []GameVersionStr `json:"gameVersions"` SortableGameVersions []SortableGameVersion `json:"sortableGameVersions"` Dependencies []FileDependency `json:"dependencies"` ExposeAsAlternative bool `json:"exposeAsAlternative"` ParentProjectFileID FileID `json:"parentProjectFileId"` AlternateFileID FileID `json:"alternateFileId"` IsServerPack bool `json:"isServerPack"` ServerPackFileID FileID `json:"serverPackFileId"` IsEarlyAccessContent bool `json:"isEarlyAccessContent"` EarlyAccessEndDate time.Time `json:"earlyAccessEndDate"` FileFingerprint int64 `json:"fileFingerprint"` Modules []FileModule `json:"modules"` }
type FileDependency ¶
type FileDependency struct { ModID ModID `json:"modId"` RelationType enum.FileRelationType `json:"relationType"` }
type FileIndex ¶
type FileIndex struct { GameVersion GameVersionStr `json:"gameVersion"` FileID FileID `json:"fileId"` FileName string `json:"fileName"` ReleaseType enum.FileReleaseType `json:"releaseType"` GameVersionTypeID GameVersionTypeID `json:"gameVersionTypeId"` ModLoader enum.ModLoader `json:"modLoader"` }
type FileModule ¶
type Fingerprint ¶ added in v0.5.0
type Fingerprint int
func (Fingerprint) Param ¶ added in v0.5.0
func (f Fingerprint) Param() string
type FingerprintFuzzyMatch ¶ added in v0.5.0
type FingerprintFuzzyMatch struct { ID FingerprintID `json:"id"` File File `json:"file"` LatestFiles []File `json:"latestFiles"` Fingerprints []Fingerprint `json:"fingerprints"` }
type FingerprintFuzzyMatchResult ¶ added in v0.5.0
type FingerprintFuzzyMatchResult struct {
FuzzyMatches []FingerprintFuzzyMatch `json:"fuzzyMatches"`
}
https://docs.curseforge.com/#tocS_FingerprintFuzzyMatchResult
type FingerprintID ¶ added in v0.5.0
type FingerprintID int32
func (FingerprintID) Param ¶ added in v0.5.0
func (f FingerprintID) Param() string
type FingerprintMatch ¶ added in v0.5.0
type FingerprintMatch struct { ID FingerprintID `json:"id"` File File `json:"file"` LatestFiles []File `json:"latestFiles"` }
type FingerprintsMatchesResult ¶ added in v0.5.0
type FingerprintsMatchesResult struct { IsCacheBuilt bool `json:"isCacheBuilt"` ExactMatches []FingerprintMatch `json:"exactMatches"` ExactFingerprints []Fingerprint `json:"exactFingerprints"` PartialMatches []FingerprintMatch `json:"partialMatches"` PartialMatchFingerprints map[string]Fingerprint `json:"partialMatchFingerprints"` InstalledFingerprints []Fingerprint `json:"installedFingerprints"` UnmatchedFingerprints []Fingerprint `json:"unmatchedFingerprints"` }
type FolderFingerprint ¶ added in v0.5.0
type FolderFingerprint struct { FolderName string `json:"foldername"` Fingerprints []Fingerprint `json:"fingerprints"` }
type Game ¶ added in v0.3.0
type Game struct { ID enum.GameID `json:"id"` Name string `json:"name"` Slug string `json:"slug"` DateModified time.Time `json:"dateModified"` Assets GameAssets `json:"assets"` Status enum.CoreStatus `json:"status"` ApiStatus enum.CoreApiStatus `json:"apiStatus"` }
type GameAssets ¶ added in v0.3.0
type GameVersion ¶ added in v0.3.0
type GameVersion struct { ID GameVersionID `json:"id"` Slug string `json:"slug"` Name string `json:"name"` }
type GameVersionID ¶ added in v0.2.0
type GameVersionID int32
func (GameVersionID) Param ¶ added in v0.2.0
func (g GameVersionID) Param() string
type GameVersionStr ¶ added in v0.3.0
type GameVersionStr string
func (GameVersionStr) Param ¶ added in v0.3.0
func (g GameVersionStr) Param() string
type GameVersionType ¶ added in v0.3.0
type GameVersionType struct { ID GameVersionTypeID `json:"id"` GameID enum.GameID `json:"gameId"` Name string `json:"name"` Slug string `json:"slug"` IsSyncable bool `json:"isSyncable"` Status enum.GameVersionTypeStatus `json:"status"` }
type GameVersionTypeID ¶ added in v0.3.0
type GameVersionTypeID int32
func (GameVersionTypeID) Param ¶ added in v0.3.0
func (g GameVersionTypeID) Param() string
type GameVersionsByType ¶ added in v0.3.0
type GameVersionsByType struct { Type GameVersionTypeID `json:"type"` Versions []string `json:"versions"` }
type GameVersionsByType2 ¶ added in v0.3.0
type GameVersionsByType2 struct { Type GameVersionTypeID `json:"type"` Versions []GameVersion `json:"versions"` }
type GetCategoriesResponse ¶ added in v0.4.0
type GetCategoriesResponse struct {
Data []Category `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Categories%20Response
type GetFeaturedModsRequestBody ¶
type GetFeaturedModsRequestBody struct { GameID enum.GameID `json:"gameId"` ExcludedModIDs []ModID `json:"excludedModIds"` GameVersionTypeID GameVersionTypeID `json:"gameVersionTypeId"` }
https://docs.curseforge.com/#tocS_GetFeaturedModsRequestBody
type GetFeaturedModsResponse ¶
type GetFeaturedModsResponse struct {
Data FeaturedModsResponse `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Featured%20Mods%20Response
type GetFilesResponse ¶
type GetFilesResponse struct {
Data []File `json:"data"`
}
type GetFingerprintMatchesRequestBody ¶ added in v0.5.0
type GetFingerprintMatchesRequestBody struct {
Fingerprints []Fingerprint `json:"fingerprints"`
}
https://docs.curseforge.com/#tocS_GetFingerprintMatchesRequestBody
type GetFingerprintMatchesResponse ¶ added in v0.5.0
type GetFingerprintMatchesResponse struct {
Data FingerprintsMatchesResult `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Fingerprint%20Matches%20Response
type GetFingerprintsFuzzyMatchesResponse ¶ added in v0.5.0
type GetFingerprintsFuzzyMatchesResponse struct {
Data FingerprintFuzzyMatchResult `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Fingerprints%20Fuzzy%20Matches%20Response
type GetFuzzyMatchesRequestBody ¶ added in v0.5.0
type GetFuzzyMatchesRequestBody struct { GameID enum.GameID `json:"gameId"` Fingerprints []FolderFingerprint `json:"fingerprints"` }
https://docs.curseforge.com/#tocS_GetFuzzyMatchesRequestBody
type GetGameResponse ¶ added in v0.3.0
type GetGameResponse struct {
Data Game `json:"data"`
}
type GetGamesResponse ¶ added in v0.3.0
type GetGamesResponse struct { Data []Game `json:"data"` Pagination Pagination `json:"pagination"` }
type GetModFileResponse ¶
type GetModFileResponse struct {
Data File `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Mod%20File%20Response
type GetModFilesRequestBody ¶
type GetModFilesRequestBody struct {
FileIDs []FileID `json:"fileIds"`
}
type GetModFilesResponse ¶
type GetModFilesResponse struct { Data []File `json:"data"` Pagination Pagination `json:"pagination"` }
https://docs.curseforge.com/#tocS_Get%20Mod%20Files%20Response
type GetModResponse ¶
type GetModResponse struct {
Data Mod `json:"data"`
}
type GetModsByIdsListRequestBody ¶
type GetModsByIdsListRequestBody struct { ModIDs []ModID `json:"modIds"` OnlyPC bool `json:"filterPcOnly"` }
https://docs.curseforge.com/#tocS_GetModsByIdsListRequestBody
type GetModsResponse ¶
type GetModsResponse struct {
Data []Mod `json:"data"`
}
type GetVersionTypesResponse ¶ added in v0.3.0
type GetVersionTypesResponse struct {
Data []GameVersionType `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Version%20Types%20Response
type GetVersionTypesResponseV2 ¶ added in v0.3.0
type GetVersionTypesResponseV2 struct {
Data []GameVersionsByType2 `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Versions%20Response%20-%20V2
type GetVersionsResponse ¶ added in v0.3.0
type GetVersionsResponse struct {
Data []GameVersionsByType `json:"data"`
}
https://docs.curseforge.com/#tocS_Get%20Versions%20Response%20-%20V1
type MinecraftGameVersion ¶ added in v0.2.0
type MinecraftGameVersion struct { ID MinecraftGameVersionID `json:"id"` GameVersionID GameVersionID `json:"gameVersionId"` VersionString GameVersionStr `json:"versionString"` JarDownloadURL string `json:"jarDownloadUrl"` JsonDownloadURL string `json:"jsonDownloadUrl"` Approved bool `json:"approved"` DateModified time.Time `json:"dateModified"` GameVersionTypeID GameVersionTypeID `json:"gameVersionTypeId"` GameVersionStatus enum.GameVersionStatus `json:"gameVersionStatus"` GameVersionTypeStatus enum.GameVersionTypeStatus `json:"gameVersionTypeStatus"` }
type MinecraftGameVersionID ¶ added in v0.2.0
type MinecraftGameVersionID int32
func (MinecraftGameVersionID) Param ¶ added in v0.3.0
func (m MinecraftGameVersionID) Param() string
type MinecraftModLoaderID ¶ added in v0.2.0
type MinecraftModLoaderID int32
func (MinecraftModLoaderID) Param ¶ added in v0.3.0
func (m MinecraftModLoaderID) Param() string
type MinecraftModLoaderIndex ¶ added in v0.2.0
type MinecraftModLoaderVersion ¶ added in v0.2.0
type MinecraftModLoaderVersion struct { ID MinecraftModLoaderID `json:"id"` GameVersionID GameVersionID `json:"gameVersionId"` MinecraftGameVersionID MinecraftGameVersionID `json:"minecraftGameVersionId"` ForgeVersion string `json:"forgeVersion"` Name string `json:"name"` Type enum.ModLoader `json:"type"` DownloadURL string `json:"downloadUrl"` FileName string `json:"filename"` InstallMethod enum.ModLoaderInstallMethod `json:"installMethod"` Latest bool `json:"latest"` Recommended bool `json:"recommended"` Approved bool `json:"approved"` DateModified time.Time `json:"dateModified"` MavenVersionString string `json:"mavenVersionString"` VersionJson string `json:"versionJson"` LibrariesInstallLocation string `json:"librariesInstallLocation"` MinecraftVersion GameVersionStr `json:"minecraftVersion"` AdditionalFilesJson string `json:"additionalFilesJson"` ModLoaderGameVersionID GameVersionID `json:"modLoaderGameVersionId"` ModLoaderGameVersionTypeID GameVersionTypeID `json:"modLoaderGameVersionTypeId"` ModLoaderGameVersionStatus enum.GameVersionStatus `json:"modLoaderGameVersionStatus"` ModLoaderGameVersionTypeStatus enum.GameVersionTypeStatus `json:"modLoaderGameVersionTypeStatus"` McGameVersionID MinecraftGameVersionID `json:"mcGameVersionId"` McGameVersionTypeID GameVersionTypeID `json:"mcGameVersionTypeId"` McGameVersionStatus enum.GameVersionStatus `json:"mcGameVersionStatus"` McGameVersionTypeStatus enum.GameVersionTypeStatus `json:"mcGameVersionTypeStatus"` InstallProfileJson string `json:"installProfileJson"` }
type Mod ¶
type Mod struct { ID ModID `json:"id"` GameID enum.GameID `json:"gameId"` Name string `json:"name"` Slug string `json:"slug"` Links ModLinks `json:"links"` Summary string `json:"summary"` Status enum.ModStatus `json:"status"` DownloadCount int64 `json:"downloadCount"` IsFeatured bool `json:"isFeatured"` PrimaryCategoryID enum.CategoryID `json:"primaryCategoryId"` Categories []Category `json:"categories"` ClassID enum.ClassID `json:"classId"` Authors []ModAuthor `json:"authors"` Logo ModAsset `json:"logo"` Screenshots []ModAsset `json:"screenshots"` MainFileID FileID `json:"mainFileId"` LatestFiles []File `json:"latestFiles"` LatestFilesIndexes []FileIndex `json:"latestFilesIndexes"` LatestEarlyAccessFilesIndexes []FileIndex `json:"latestEarlyAccessFilesIndexes"` DateCreated time.Time `json:"dateCreated"` DateModified time.Time `json:"dateModified"` DateReleased time.Time `json:"dateReleased"` AllowModDistribution bool `json:"allowModDistribution"` GamePopularityRank int32 `json:"gamePopularityRank"` IsAvailable bool `json:"isAvailable"` ThumbsUpCount int32 `json:"thumbsUpCount"` Rating Rating `json:"rating"` }
type ModAsset ¶
type ModAssetID ¶
type ModAssetID int32
type ModLinks ¶
type Pagination ¶
type SearchModsResponse ¶
type SearchModsResponse struct { Data []Mod `json:"data"` Pagination Pagination `json:"pagination"` }
type SortableGameVersion ¶
type SortableGameVersion struct { GameVersionName string `json:"gameVersionName"` GameVersionPadded string `json:"gameVersionPadded"` GameVersion GameVersionStr `json:"gameVersion"` GameVersionReleaseDate time.Time `json:"gameVersionReleaseDate"` GameVersionTypeID GameVersionTypeID `json:"gameVersionTypeId"` }
type StringResponse ¶
type StringResponse struct {
Data string `json:"data"`
}