Adding sample auth code that will most likely change and api implementation
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
ef15a0ac15
commit
95794522e0
7 changed files with 279 additions and 278 deletions
|
@ -25,7 +25,8 @@ func main() {
|
|||
if pass == "" {
|
||||
halt(2, "Missing PHOTOPRISM_PASS")
|
||||
}
|
||||
photoclient := photoprism.New()
|
||||
login := photoprism.NewClientAuthLogin("username", "password")
|
||||
photoclient := photoprism.New(login)
|
||||
photo, err := photoclient.V1().GetPhoto("123")
|
||||
if err != nil {
|
||||
halt(3, "Error fetching photo: %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue