Description
the purpose of this package is to interact with the Curseforge API with simple functions instead of having to write all the requests yourself.
Details

getMods

Members


<static, readonly> SORT_TYPES :number

Description
Helper Object for variations of sort options
Properties
Name Type Default Description
FEATURED number 0
POPULARITY number 1
LAST_UPDATE number 2
NAME number 3
AUTHOR number 4
TOTAL_DOWNLOADS number 5
Details
number

<static, readonly> DEPENDENCY_TYPE :number

Description
Helper Object for types of dependencies and incompatibilities.
Properties
Name Type Default Description
EMBEDDED_LIBRARY number 1
OPTIONAL number 2
REQUIRED number 3
TOOL number 4
INCOMPATIBLE number 5
INCLUDE number 6
Details
number

Methods


<inner> getMods( options, callback ) → {Promise.<Array.<Mod>, Error>}

Description
Get an overview of all possible mods.
Parameters
Name Type Description
options Object A Object containing optional parameters.
Name Type Description
gameVersion string The Minecraft version string to use. ("1.12.2", "1.13")
searchFilter string Term to search for.
index number The page to use.
pageSize number The amount of items to show per page. (Limit 500)
sort number The method to sort with @see SORT_TYPES
callback function Optional callback to use instead of Promise.
Returns
A promise containing the json object returned by the Curse API on successful 200 response.
Details

<inner> getMod( identifier, callback ) → {Promise.<Mod, Error>}

Description
Get information about a specific mod using the identifier.
Parameters
Name Type Description
identifier number The mods curse id to find the mod with.
callback function Optional callback to use instead of Promise.
Returns
A promise containing the json object returned by the Curse API on successful 200 response.
Details

<inner> getModFiles( identifier, callback ) → {Promise.<Array.<ModFile>, Error>}

Description
Get information about the releases of a specific mod.
Parameters
Name Type Description
identifier number The mods curse id to find the mod with.
callback function Optional callback to use instead of Promise.
Returns
A promise containing the json object returned by the Curse API on successful 200 response.
Details

<inner> getModDescription( identifier, callback ) → {Promise.<string, Error>}

Description
Get the html string for the mod description.
Parameters
Name Type Description
identifier number The mods curse id to find the mod with.
callback function Optional callback to use instead of Promise.
Returns
A promise containing the html string returned by the Curse API on successful 200 response.
Details