Skip to content

Use CurseForge batch POST /v1/mods endpoint #28

@dyoung522

Description

@dyoung522

Background

internal/source/curseforge/client.go (GetMods at ~L180) currently fans out per-mod GET /v1/mods/{id} calls when asked for multiple mods. CurseForge exposes a batch POST /v1/mods that takes a JSON body of IDs and returns them in one round trip — much faster on update checks and dependency resolution where we routinely fetch dozens of mods.

Suggested approach

Replace the per-id loop in GetMods with a single POST /v1/mods containing { "modIds": [...] }. Keep GetMod(single) as the public single-id helper. Plumb through the same httpclient.Client plumbing used elsewhere — this needs the JSON body and POST method, so either extend httpclient.DoJSON to accept a body or add a DoJSONBody variant.

Originally tracked as a TODO in internal/source/curseforge/client.go; converted to an issue as part of the Phase 6 cleanup pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions