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

API plugin download type #10

Open
talwat opened this issue Apr 8, 2023 · 1 comment
Open

API plugin download type #10

talwat opened this issue Apr 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@talwat
Copy link
Owner

talwat commented Apr 8, 2023

For each plugin, perhaps there could be an api plugin type which fetches a url defined by the plugin and get's the download url from that.
For example:

{
  "downloads": [
    {
      "type": "api",
      "goto": {
         "api_url": "https://api.example.com/plugin/get/myplugin"
         "id": ".plugin.info.id" // Gets json data from the api_url
         "goto": {
           "api_url": "https://api.example.com/plugin/get/files/{id}"
           "url": ".files[0].download_url" // Whenever the url property is defined, pap will use it as the download url
         }
       },
      "filename": "plugin.jar"
    }
  ]
}

Any other ways to implement this are welcome, especially parsing the data from the api, I'm not sure about a format to use.

@talwat talwat added the enhancement New feature or request label Apr 8, 2023
@talwat
Copy link
Owner Author

talwat commented Apr 8, 2023

Doing this primarily to further reduce the plugins without the latest version.

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

No branches or pull requests

1 participant