endpoints #6

Closed
opened 2026-04-15 13:25:57 +02:00 by rik · 1 comment
Owner

Keep it simple. Add one endpoint /episode/add that can be used by API as well as browser. Let the API check either cookie auth or password auth.

For updates, /episode/edit endpoint which may pass missing elements.

From bash, this is easy to use, pseudocode:

#/usr/bin/env bash

# Usage ./podlite episode/add "foo" "this is an episode" "foo.mp3" (need to take audio too for keep it simple).
# Usage ./podlite edit 2 '{"title", "foo2"}'
# Usage ./podlite edit 2 file=foo.mp3 (this should add the file and then check whether unused files and remove those.)

if "$1 == add"; then
  curl -X POST /episodes/add
else "$1 == modify"; then
   curl -X PUT /episodes/edit
fi

The less surprising the API, the easier it will be to use.

Keep it simple. Add one endpoint `/episode/add` that can be used by API as well as browser. Let the API check either cookie auth or password auth. For updates, `/episode/edit` endpoint which may pass missing elements. From bash, this is easy to use, pseudocode: ``` #/usr/bin/env bash # Usage ./podlite episode/add "foo" "this is an episode" "foo.mp3" (need to take audio too for keep it simple). # Usage ./podlite edit 2 '{"title", "foo2"}' # Usage ./podlite edit 2 file=foo.mp3 (this should add the file and then check whether unused files and remove those.) if "$1 == add"; then curl -X POST /episodes/add else "$1 == modify"; then curl -X PUT /episodes/edit fi ``` The less surprising the API, the easier it will be to use.
Author
Owner

See episodes.rs for typical rails defaults

See episodes.rs for typical rails defaults
rik closed this issue 2026-05-07 08:39:23 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rik/podlite#6
No description provided.