More API refactoring and working on cleaning up

Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
Kris Nóva 2021-02-09 14:45:36 -08:00
parent e4323b6047
commit 3b41c9dd5f
9 changed files with 232 additions and 148 deletions

View file

@ -11,9 +11,8 @@ import (
func main() {
logger.Level = 4
uuid := "pqnzigq351j2fqgn" // This is a known ID
creds := photoprism.NewClientAuthLogin("admin", "missy")
client := photoprism.New("localhost:8080")
err := client.Auth(creds)
client := photoprism.New("http://localhost:8080")
err := client.Auth(photoprism.NewClientAuthLogin("admin", "missy"))
if err != nil {
halt(4, "Error logging into API: %v", err)
}