Working auth and photo json endpoint
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
ef275f97f4
commit
e4323b6047
2032 changed files with 821464 additions and 52 deletions
17
examples/login.go
Normal file
17
examples/login.go
Normal 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!")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue