Skip to content

Instantly share code, notes, and snippets.

@Owez
Created June 19, 2020 03:10
Show Gist options
  • Save Owez/45fbcca598cdabe50b9f3935410f862a to your computer and use it in GitHub Desktop.
Save Owez/45fbcca598cdabe50b9f3935410f862a to your computer and use it in GitHub Desktop.
Please Package Manager current spec
DOMAIN: pleasepm.com
API PREFIX: /api/v1
GET /package/[name]
ABOUT: Query for a package using it's unique name.
EXAMPLE REQUEST: `GET https://pleasepm.com/package/mypackage`
EXAMPLE RESPONSE:
{
"status": "success",
"body": {
"name": "mypackage",
"versions": [
"1.3.4": {
"created": "2018-12-12 10:58:26",
"hash": "82F231898694E893389F7FC7F0D4B2AE1DDFB69ED2D59295603593C8529DB673",
"download": "https://pleasepm/package/mypackage/1.3.4/download"
}
]
"description": "A simple package with a specific version number",
"license": "MIT",
"repository": "https://github.com/scowez/mypackage",
"created": "2017-02-29 03:48:40"
}
}, 200 OK
GET /package/[name]/[version]
ABOUT: Query for a package using it's unique name and specific version number.
EXAMPLE REQUEST: `GET https://pleasepm.com/package/mypackage/1.3.4`
EXAMPLE RESPONSE:
{
"status": "success",
"body": {
"name": "mypackage",
"versions": [
"1.3.4": {
"created": "2018-12-12 10:58:26",
"hash": "82F231898694E893389F7FC7F0D4B2AE1DDFB69ED2D59295603593C8529DB673",
"download": "https://pleasepm/package/mypackage/1.3.4/download"
}
]
"description": "A simple package with a specific version number",
"license": "MIT",
"repository": "https://github.com/scowez/mypackage",
"created": "2017-02-29 03:48:40"
}
}, 200 OK
GET /package/[name]/[version]/download
ABOUT: Downloads the packaged .zip file as a typically encoded file for a specific version if it exists. If not a simple `404` will be returned.
EXAMPLE REQUEST: `GET https://pleasepm.com/package/mypackage/1.3.4/download`
EXAMPLE RESPONSE: [a .zip-encoded package file], 200 OK
POST /package/[name]/[version]
ABOUT: Create a new package or update a package's version you have access to. If you do not have access to the package, you will have a `403` displayed to you.
EXAMPLE REQUEST: COMING SOON!
EXAMPLE RESPONSE: {"status": "success"}, 200 OK
DELETE /package/[name]
ABOUT: Deletes an entire package from pleasepm permenently, provided there has only been 1 released version. If you would like to delete in accordance with GDPR or other measures, please contact `root@ogriffiths.com`.
DELETE /package/[name]/[version]
ABOUT: Hides a package version from the public mostly, indicating it's no longer available. It can still be downloaded but will only be referenced in a "show more - hidden" section of the website.
@Owez
Copy link
Author

Owez commented Jun 19, 2020

For a future package manager for the jingo programming language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment