about summary refs log tree commit diff
path: root/bundles/immich
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2025-09-07 17:32:13 +0200
committerRobert Günzler <r@gnzler.io>2025-09-25 13:16:25 +0200
commit99e5cfd96016c2816affda1ceba50e2673ba42fc (patch)
treeb10a2bc2be79f8afe277718ef2b26f1a4a6c1fb8 /bundles/immich
parent7f9285e827dab648e72e1fbcbf4cd4e6709fb591 (diff)
immich: move api tool to root
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bundles/immich')
-rwxr-xr-xbundles/immich/files/immich-api-tool49
1 files changed, 0 insertions, 49 deletions
diff --git a/bundles/immich/files/immich-api-tool b/bundles/immich/files/immich-api-tool
deleted file mode 100755
index d0a1a41..0000000
--- a/bundles/immich/files/immich-api-tool
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-set -eu
-
-API_URL=https://photos.gzr.im/api
-API_KEY=zaJUJGHpFqY9OA6kAhuauTj9tC1YVfA8umtZc6ls8U
-
-request() {
-  ENDPOINT=${1:?}
-  shift 1
-
-  curl -sSfL "${API_URL}${ENDPOINT}" \
-    -H "x-api-key: $API_KEY" \
-    -H 'Content-Type: application/json' \
-    "$@"
-}
-
-validateAccessToken() {
-  request '/auth/validateToken' -X POST >/dev/null
-}
-
-# returns full json response
-searchFavorites() {
-  request '/search/metadata' \
-    -H 'Accept: application/json' \
-    -d '{"isFavorite": true}'
-}
-
-# requires '{"assetIds":["list","of","ids",...]}' on stdin
-# downloads to PWD
-downloadArchive() {
-  request '/download/archive' \
-    -H 'Accept: application/octet-stream' \
-    -d @- \
-    -o "archive.zip" \
-    --no-silent
-}
-
-main() {
-  validateAccessToken || exit 1
-
-  # download favorites as archive
-  searchFavorites |
-    jq '[.assets.items[].id] | {assetIds:.}' -rc |
-    downloadArchive
-}
-
-test -n "${DEBUG:-}" && set -x
-main
-exit 0