From 25ee1a57984a1b5e0c94d27e5fa8ab3969a7b2e7 Mon Sep 17 00:00:00 2001 From: Jonathan Pyle Date: Thu, 19 Sep 2024 09:31:23 -0400 Subject: [PATCH] API for downloading package from Playground --- _docs/api.md | 10 +++++++--- _docs/changelog.md | 7 +++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/_docs/api.md b/_docs/api.md index a17808324..42eb265d7 100644 --- a/_docs/api.md +++ b/_docs/api.md @@ -2344,13 +2344,14 @@ Parameters: key. - `folder` (optional): the folder in the [Playground] from which to obtain the list of files. Must be one of `questions`, `sources`, - `static`, `templates`, or `modules`. The default is `static`. + `static`, `templates`, `modules`, or `packages`. The default is `static`. - `project` (optional): the project in the [Playground] from which to obtain the list of files. The default is `default`, which is the "Default Playground" project. - `filename` (optional): the name of the file to be downloaded. If a `filename` is not provided, a [JSON] list of files will be - returned. + returned. If `folder` is `packages`, a ZIP file of the package + indicated by `filename` will be downloaded. Required privileges: @@ -2371,7 +2372,10 @@ Responses on failure: Response on success: [200] -Body of response: a [JSON] array of file names +Body of response: a [JSON] array of file names, or if `filename` is +provided, the content of the file. If `folder` is `packages` and +`filename` is provided, the response will be a ZIP file containing the +package. ## Delete a file in the Playground diff --git a/_docs/changelog.md b/_docs/changelog.md index 497a7806e..1b0da10a9 100644 --- a/_docs/changelog.md +++ b/_docs/changelog.md @@ -3,6 +3,13 @@ layout: docs title: Change Log short_title: Change Log --- +## [1.5.10](https://github.com/jhpyle/docassemble/releases/tag/v1.5.10) - 2024-09-19 + + +### Added +- Option in the `/api/playground` GET endpoint for downloading the ZIP + file of a Playground package. + ## [1.5.9](https://github.com/jhpyle/docassemble/releases/tag/v1.5.9) - 2024-09-18