Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support numeric gameVersionTypeId #16

Open
Jikoo opened this issue May 3, 2022 · 0 comments
Open

Support numeric gameVersionTypeId #16

Jikoo opened this issue May 3, 2022 · 0 comments

Comments

@Jikoo
Copy link

Jikoo commented May 3, 2022

Request

Allow specifying a numeric gameVersionTypeId instead of performing a lookup via the version-types endpoint.
Ex: Java:Java 18 -> 2:Java 18

Why?

Due to how messy CF's API is it's hard to say that this would even work as expected - the existing request somehow has worked for me even though it probably shouldn't.

The bukkit endpoint exists but is basically empty. All actual Bukkit versions are available via the minecraft endpoint instead. The API's version-types (https://minecraft.curseforge.com/api/game/version-types?token=<your token>) does not yield Bukkit at all, but Bukkit's version ID is 1. This can be confirmed by viewing source for Bukkit/CF pages.

Project on Curseforge's file:

<p class="text-gray-500 font-bold mb-2">Supported Bukkit Versions</p>
<div class="form-controls convert-list" id="field-game-version-1">
<li class="list-none field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-2">
<label for="field-game-version-1-1.18.2">
<input type="checkbox" name="ff58f8aa7e8f8368fe36153765e3f1cd7" value="9016" checked="checked" id="field-game-version-1-1.18.2" class="form-game-version-container form-game-version-container-1-18-2" />
<span>
1.18.2
</span>
</label>
</li>
<li class="list-none field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-1">
<label for="field-game-version-1-1.18.1">
<input type="checkbox" name="ff58f8aa7e8f8368fe36153765e3f1cd7" value="8897" id="field-game-version-1-1.18.1" class="form-game-version-container form-game-version-container-1-18-1" />
<span>
1.18.1
</span>
</label>
</li>
...

Same project on devbukkit:

               <section class="e-game-versions">
                    <h3>Supported Bukkit Versions</h3>
                    
    <!-- Field -->
       
   
<ul class="covert-list checkbox form-game-version-container form-field-model-multiple-choice-field`1" id="field-game-version-1">

       
    <li class="field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-2">
        <label for="field-game-version-1-1-18-2">
            <input type="checkbox" 
                name="fe93305e74d3d1a5a6380ebcbd3b70383"                
                value="9016"
                
                id="field-game-version-1-1-18-2" 
                class="form-game-version-container form-game-version-container-1-18-2" />           
                <span>
                    1.18.2
                </span>
            </label>
        
    </li>

       
    <li class="field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-1">
        <label for="field-game-version-1-1-18-1">
            <input type="checkbox" 
                name="fe93305e74d3d1a5a6380ebcbd3b70383"                
                value="8897"
                
                id="field-game-version-1-1-18-1" 
                class="form-game-version-container form-game-version-container-1-18-1" />           
                <span>
                    1.18.1
                </span>
            </label>
        
    </li>
    ...

From https://minecraft.curseforge.com/api/game/versions?token=<your token>:

{
  "id": 9016,
  "gameVersionTypeID": 1,
  "name": "1.18.2",
  "slug": "1-18-2"
},
...

It's pretty clear both from the base list and the actual entries' data that the game ID is 1. However, as Bukkit does not exist in the version-types output, I cannot specify Bukkit:1.18.2 when using the action to guarantee that ID 9016 will be selected. I don't believe including a hardcoded list of additional game IDs is a good idea, so I want to be able to instead use 1:1.18.2 and have it yield the same result that Bukkit:1.18.2 would if CF actually had Bukkit in the version types list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant