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

Document Ore deployment API #670

Merged
merged 2 commits into from Apr 11, 2018
Merged

Document Ore deployment API #670

merged 2 commits into from Apr 11, 2018

Conversation

Katrix
Copy link
Member

@Katrix Katrix commented Mar 6, 2018

Documents the Ore deployment API, including the two recent pull requests to add more options to it.

@Inscrutable Inscrutable added the needs review The submission is ready and needs to be reviewed label Mar 6, 2018
Copy link
Member

@ST-DDT ST-DDT left a 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_"
}
Copy link
Member

@ST-DDT ST-DDT Mar 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Newline at EOF.

Copy link
Member

@Inscrutable Inscrutable left a 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.

+-------------+------------------------------+------------------------------------------------------------------------------------------------+
| Name | Data Type | Description |
+=============+==============================+================================================================================================+
| apiKey | String | An Ore deployment key gotten through the Ore settings. |
Copy link
Member

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"?

+-------------+------------------------------+------------------------------------------------------------------------------------------------+
| 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. |
Copy link
Member

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." ?

Copy link
Member

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.


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.

+-------------+------------------------------+------------------------------------------------------------------------------------------------+
Copy link
Member

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.

@Katrix
Copy link
Member Author

Katrix commented Mar 17, 2018

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.

@Inscrutable Inscrutable added help wanted We would appreciate contributions and removed needs review The submission is ready and needs to be reviewed labels Mar 18, 2018
@Inscrutable
Copy link
Member

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.

@phit
Copy link
Contributor

phit commented Mar 18, 2018

this should work for a deployment, not tested

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

@Katrix
Copy link
Member Author

Katrix commented Mar 18, 2018

Ok, added the curl usage. The newline should already be there.


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
Copy link
Member

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.

@ST-DDT
Copy link
Member

ST-DDT commented Mar 18, 2018

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?

@phit
Copy link
Contributor

phit commented Mar 18, 2018

shouldnt really be needed, https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/

@Inscrutable Inscrutable added needs review The submission is ready and needs to be reviewed and removed help wanted We would appreciate contributions labels Mar 31, 2018
@ST-DDT
Copy link
Member

ST-DDT commented Apr 10, 2018

@Katrix- AFAICT the url is the only remaining issue with this PR.
Could you please update it or is there anything else missing before merge?

@Katrix
Copy link
Member Author

Katrix commented Apr 10, 2018

Sorry, kind of forgot about that one. Fixed

@Inscrutable Inscrutable removed the needs review The submission is ready and needs to be reviewed label Apr 11, 2018
@Inscrutable Inscrutable merged commit 172598a into SpongePowered:stable Apr 11, 2018
@Katrix Katrix deleted the featue/ore-deploy branch May 16, 2019 10:23
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

Successfully merging this pull request may close these issues.

None yet

4 participants