• published the article API

    CurseForge API

    The CurseForge API allows users to automate managing their projects, and retrieve data such as game versions and dependencies from CurseForge.

    Please note URIs relative to the site the project is on (https://minecraft.curseforge.com for example), unless otherwise noted

     


    Generate a Token

    To access the API, you must first generate an API token. To do that, go to API Tokens.

     


    Authentication

    To authenticate with the API, you must provide your generated token using the X-Api-Token header, or the tokenquery string parameter.

     


    Game Dependencies API

    To retrieve a list of game dependencies issue a GET request to /api/game/dependencies. It will return an array of json objects containing the following data:

    {
        id: 42,
        name: "Bukkit",
        slug: "bukkit"
    }

     


    Game Versions API

    To retrieve a list of game versions issue a GET request to /api/game/versions. It will return an array of json objects containing the following data:

    {
        id: 158,
    gameVersionTypeID: 42, name: "1.8.4", slug: "1-8-4" }

     


    Project Upload File API

    To upload a file, issue a POST multipart/form-data request to /api/projects//upload-file, containing two fields: metadata and file, which must be the actual file. The ID of your project will be in the URL when you go to its overview page.

    metadata must contain a json object with the following fields:

    {
        changelog: "A string describing changes.", // Can be HTML or markdown if changelogType is set.
    changelogType: ["text", "html", "markdown"], // Optional: defaults to text displayName: "Foo", // Optional: A friendly display name used on the site if provided. parentFileID: 42, // Optional: The parent file of this file. gameVersions: [157, 158], // A list of supported game versions, see the Game Versions API for details. Not supported if parentFileID is provided. releaseType: "alpha", // One of "alpha", "beta", "release".
    relations: {
    projects: [{
    slug: "mantle", // Slug of related plugin.
    type: ["embeddedLibrary", "incompatible", "optionalDependency", "requiredDependency", "tool"] // Choose one
    }]
    } // Optional: An array of project relations by slug and type of dependency for inclusion in your project. }

    On successful upload, returns a json object containing the new file's ID:

    {
        id: 20402
    }

     


     

    Project File Management API

    To update a file, issue a POST multipart/form-data request to /api/projects//update-file, containing the field: metadata. The ID of your project will be in the URL when you go to its overview page.

    metadata must contain a json object with the following fields:

    {
    fileID: 20402, // This is the file ID you are updating. This is required.

    // Note: These are all optional fields, you can include any of these in any combination.
    // The API will fail if you do not include any settings to change.
    changelog: "A string describing changes.", // Can be HTML or markdown if changelogType is set.
    changelogType: ["text", "html", "markdown"], // Choose one, defaults to text displayName: "Foo", // A friendly display name used on the site if provided. gameVersions: [157, 158], // A list of supported game versions, see the Game Versions API for details. Not supported if parentFileID is provided. releaseType: "alpha", // One of "alpha", "beta", "release".
    relations: {
    projects: [{
    slug: "mantle", // Slug of related plugin.
    type: ["embeddedLibrary", "incompatible", "optionalDependency", "requiredDependency", "tool"] // Choose one
    }]
    } // Optional: An array of project relations by slug and type of dependency for inclusion in your project.
    }

    On successful upload, returns a json object containing the old file ID:

    {
        id: 20402
    }

     


    Maven

    CurseForge includes a maven endpoint so that you can include your dependancies using any build scripts that support maven. Please note that due to how maven works you do not provide your API key as a header, but as part of the maven URL. 

     

    https://www.curseforge.com/api/maven/{projectSlug}/{mavenArtifact}/{mavenVersion}/{projectFileNameArtifact}-{projectFileNameVersion}-{projectFileNameTag}.jar

     

    This is the Maven full URL. Below is the explanation of each part, and where you can find that information. For the examples below we will be using the CoFHCore Project.

     

    {projectSlug}: The slug of the project you want to use. In our example its cofhcore

    {mavenArtifiact}: This should be the files name, in our example CoFHCore-1.10.2

    {mavenVersion}: This should be what release you want, in our case we are going to use release as this gives us the latest, but you can also use the file version in the name (Such as 4.1.0.155 for CoFHCore-1.10.2-4.1.0.155-universal.jar)

    {projectFileNameArtifact}: The same as mavenArtifact

    {projectFileNameVersion}: The same as mavenVersion

    {projectFileNameTag}: The name tag on the file, on older mods it would be dev on newer ones it might be universal, in our case its universal

     

    This puts our final example link at:

    https://minecraft.curseforge.com/api/maven/cofhcore/CoFHCore-1.10.2/release/CoFHCore-1.10.2-release-universal.jar

     

    If you want to use the maven with ForgeGradle I've also provided the same example in the script below

     

    This goes above apply plugin: 'forge'

    repositories {
        maven {
            name = "CurseForge"
            url = "https://minecraft.curseforge.com/api/maven/"
        }
    }


    Then add this to dependencies

    compile 'cofhcore:CoFHCore-1.10.2:release:universal'

    Localization

    Export

    The localization API allows exporting via a GET request. Below is the list of optional parameters that are accepted by the endpoint. These all correspond to the available feature on the export page, and none are required.

    https://wow.curseforge.com/api/projects/{projectID}/localization/export

     

    Parameter
    Options
    Default
    Description
    export-type [Table, TableAdditions, GlobalStrings] TableAdditions What format you want your export to be in
    lang [enUS, deDE, esES, ect] enUS The locale for language you are exporting 
    unlocalized [ShowPrimary, ShowPrimaryAsComment, ShowBlankAsComment, Ignore] ShowPrimary What happens to unlocalized phrases must be one of the following
    table-name Any string L Name of the your table, this defaults to L
    escape-non-ascii-characters [true, false] false Escape non-ASCII characters
    true-if-value-equals-key [true, false] false Set value to true if equals to key
    concatenante-subnamespaces [true, false] false Concatenate subnamespaces with /
    namespaces Any namespace name, comma delimited Base Namespace

    List of namespaces you want to include by name, defaults to your base namespace

     

     

    Import

    The localization API allows importing via a POST request with a JSON data blob. 

    https://wow.curseforge.com/api/projects/{projectID}/localization/import

    Below is an example payload

    {
    metadata: {
    //Note all of these are optional exception language
    language: "enUS", //[enUS, deDE, esES, ect], Required, No Default
    namespace: "toc", //Any namespace name, comma delimited. Default: Base Namespace
    formatType: TableAdditions, //['GlobalStrings','TableAdditions','SimpleTable']. Default: TableAdditions
    missing-phrase-handling: DoNothing //['DoNothing', 'DeleteIfNoTranslations', 'DeleteIfTranslationsOnlyExistForSelectedLanguage', 'DeletePhrase']. Default: DoNothing
    },
    localizations: "Localizations To Import"
    }
    Posted in: API
  • published the article CurseForge & WoWAce Forums Move

    Hey guys!

     

    Legion is right around the corner, and as such we've been taking a hard look at how we service the WoW community. The security of your information is very important to us, so we're taking a proactive step to help protect the information you've trusted us with.

     

    Effective today, the current forums for CurseForge and WowAce have been switched to read-only mode, and new forums are now available at https://www.curseforge.com/forums to continue discussions. Unfortunately, we're not able to import the old posts just yet, but we'll be tackling this as soon as possible.

     

    We hope this is not too disruptive, and we're sorry we couldn't give more of a heads up.

     

    Thanks,

    Zeldo

    Posted in: CurseForge & WoWAce Forums Move
  • published the article WoW Mod Migration Update
    With WoW addons now available in the Curse app, we’re ready for some of you to choose to migrate over early to test it out and provide feedback -- as a thank you, most premium addon features are available to app users at no cost for a promotional period.
    Posted in: WoW Mod Migration Update
  • published the article Upcoming Curse Client v5 Changes and WoW Mod Migration
    TL;DR: Curse Client v5 is being phased out, and all of its functionality is being added to the Curse app. This will occur for WoW mod users in the near future, and for other Curse modding communities later. We’ll have a way for WoW mod users who want to check it out earlier to opt-in and provide feedback before we complete everyone’s migration to the app.
    Posted in: Upcoming Curse Client v5 Changes and WoW Mod Migration
  • published the article WoW Legion Beta Invites

    Hey guys!

     

    We are excited to announce that we will be able to help our WoW authors get access to Legion's Beta!

     

    In order to participate in this, you must be a member of a WoW project on either WowAce.com or CurseForge's WoW portal and you must have your Battle.net email address filled in. Don't worry about other users getting your Battle.net email, this information is only visible to you and the admins and will only be used for this (and possibly future) beta invites!

     

    Please note that we are forwarding this list to Blizzard and ultimately in their discretion when and if you will receive a beta invite.

    To fill in your Battle.Net email address you can go to your profile page and "Edit Battle.net Email".

    See all you folks out there in Azeroth!

    Posted in: WoW Legion Beta Invites