Skip to content

Files — Get, Changelog, Download URL, Save #8

Description

Parent: #4

Delivers functions for retrieving mod files, changelogs, download URLs, and a convenience download wrapper. Files represent the actual downloadable artifacts attached to mods.

Acceptance criteria:

  • Get-CurseForgeFile retrieves files: single by modId+fileId, all for a mod (paginated+filtered), or batch by file IDs (parameter sets)
  • Get-CurseForgeFileChangelog retrieves file changelog in HTML format
  • Get-CurseForgeFileDownloadUrl retrieves the download URL for a file
  • Save-CurseForgeFile downloads a file to disk (composite: resolves URL then downloads)
  • CurseForgeFile class models the response (Id, GameId, ModId, IsAvailable, DisplayName, FileName, ReleaseType, FileStatus, Hashes, FileDate, FileLength, DownloadCount, FileSizeOnDisk, DownloadUrl, GameVersions, Dependencies, FileFingerprint, Modules)
  • Supporting classes: CurseForgeFileDependency, CurseForgeFileHash, CurseForgeFileModule, CurseForgeFileIndex, CurseForgeSortableGameVersion
  • Enums: CurseForgeFileReleaseType, CurseForgeFileStatus, CurseForgeFileRelationType, CurseForgeHashAlgorithm
  • Format files provide default table views
  • Unit tests cover all parameter sets and response parsing

Endpoints:

Function Method Path
Get-CurseForgeFile (single) GET /v1/mods/{modId}/files/{fileId}
Get-CurseForgeFile (by mod) GET /v1/mods/{modId}/files
Get-CurseForgeFile (batch) POST /v1/mods/files
Get-CurseForgeFileChangelog GET /v1/mods/{modId}/files/{fileId}/changelog
Get-CurseForgeFileDownloadUrl GET /v1/mods/{modId}/files/{fileId}/download-url
Save-CurseForgeFile Composite Resolve URL → download binary

File list filters: gameVersion, modLoaderType, gameVersionTypeId, index, pageSize.

Enums:

  • CurseForgeFileReleaseType: Release, Beta, Alpha
  • CurseForgeFileStatus: Processing, ChangesRequired, UnderReview, Approved, Rejected, MalwareDetected, Deleted, Archived, Testing, Released, ReadyForReview, Deprecated, Baking, AwaitingPublishing, FailedPublishing, Cooking, Cooked, UnderManualReview, ScanningForMalware, ProcessingFile, PendingRelease, ReadyForCooking, PostProcessing
  • CurseForgeFileRelationType: EmbeddedLibrary, OptionalDependency, RequiredDependency, Tool, Incompatible, Include
  • CurseForgeHashAlgorithm: Sha1, Md5

Sub-issues

See linked Tasks below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions