22 lines
354 B
Go
22 lines
354 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
photoprism "github.com/kris-nova/client-go"
|
|
)
|
|
|
|
func main() {
|
|
uuid := os.Getenv("PHOTOPRISM_ID")
|
|
if uuid == "" {
|
|
halt(2, "Missing PHOTOPRISM_UUID")
|
|
}
|
|
client := photoprism.New(auth())
|
|
photo, err := client.V1().GetPhoto(uuid)
|
|
if err != nil {
|
|
halt(3, "Error fetching photo: %v", err)
|
|
}
|
|
fmt.Println(*photo)
|
|
}
|