Working auth and photo json endpoint

Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
Kris Nóva 2021-02-09 11:17:06 -08:00
parent ef275f97f4
commit e4323b6047
2032 changed files with 821464 additions and 52 deletions

17
examples/login.go Normal file
View file

@ -0,0 +1,17 @@
package main
import (
photoprism "github.com/kris-nova/client-go"
"github.com/kris-nova/logger"
)
func main() {
logger.Level = 4
creds := photoprism.NewClientAuthLogin("admin", "missy")
client := photoprism.New("localhost:8080")
err := client.Auth(creds)
if err != nil {
halt(4, "Error logging into API: %v", err)
}
logger.Always("Login Success!")
}