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
Document Ore deployment API #670
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an example curl
request which specifies the above parameter so its easier to decipher what you actually have to send. Because some APIs wrap their (meta)data in json.
}], | ||
"downloads": 26, | ||
"author": "ewoutvs_" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Newline at EOF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly makes sense. Table is big and ugly but not a critical issue.
source/ore/routes/deploy-version.rst
Outdated
+-------------+------------------------------+------------------------------------------------------------------------------------------------+ | ||
| Name | Data Type | Description | | ||
+=============+==============================+================================================================================================+ | ||
| apiKey | String | An Ore deployment key gotten through the Ore settings. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use "obtained" instead of "gotten"?
source/ore/routes/deploy-version.rst
Outdated
+-------------+------------------------------+------------------------------------------------------------------------------------------------+ | ||
| recommended | Boolean | If this version should be set as the recommended version. Defaults to true. | | ||
+-------------+------------------------------+------------------------------------------------------------------------------------------------+ | ||
| forumPost | Boolean | Overrides the project setting of if a forum post should be created for this version. Optional. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really mean "If True, create a forum post for this version. This overrides the project setting." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could phrase it like this.
Whether a forum post should be created or not. If no value is specified, it will default to the project's setting.
source/ore/routes/deploy-version.rst
Outdated
|
||
Deploys a new version for the specified project. The body should be sent as ``multipart/form-data`` with the fields shown below. Returns a JSON representation of the deployed version. | ||
|
||
+-------------+------------------------------+------------------------------------------------------------------------------------------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the table really need to be this wide in raw format? Our preference is 120 character wide or lower. (Guideline 13 in https://docs.spongepowered.org/stable/en/contributing/spongedocs.html). It's easier to edit.
Fixed problems and included suggestions. Not too familiar with Curl (generally just use Powershell) so it would be nice if someone else could fix that. |
If someone can provide a curl example it would be handy, but otherwise I'm happy to merge this. Pending the addition of a final newline, of course. |
this should work for a deployment, not tested
|
Ok, added the curl usage. The newline should already be there. |
source/ore/routes/deploy-version.rst
Outdated
|
||
curl -F "apiKey=string" -F "apiKey=string" -F "channel=string" -F "recommended=boolean" \ | ||
-F "forumPost=boolean" -F "changelog=string" -F pluginFile=@localPluginFile \ | ||
-F pluginSig=@localpluginSig https://URL.org/api/v1/projects/:pluginId/versions/:version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace URL.org
with the real URL.
I guess there a quite a few developers using Windows out there. Maybe we should add an Powershell example as well? That way we could encourage new developers to try the API as well. What do you think? |
shouldnt really be needed, https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/ |
@Katrix- AFAICT the url is the only remaining issue with this PR. |
Sorry, kind of forgot about that one. Fixed |
Documents the Ore deployment API, including the two recent pull requests to add more options to it.