immich-client-go

module
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: GPL-3.0

README

Introduction

This is an Immich client library written in Go. It is still a work in progress and should be considered pre-alpha. Interfaces may be subject to change at short notice. Things might not work.

Quickstart

package main

import (
    "fmt"
    "log"

    immichclient "codeberg.org/pdwerryhouse/immich-client-go/client"
)

func main() {
    endpoint := "http://localhost:2283/api"
    api_key := "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

	c, err := immichclient.NewClient(&endpoint, &api_key)

	if err != nil {
		log.Fatal("Failed to create Immich Client")
	}

	albums, err := c.GetAlbums()

	if err != nil {
		log.Fatal("GetAlbums failed")
	}

	for _, album := range albums {
		fmt.Printf("%+v\n", album)
	}

}

Tests

There are some tests available, not even close to complete.

Unit tests with mock servers:

make unit_test

Integration tests with a real server:

export TEST_IMMICH_ENDPOINT=http://localhost:2283/api  # Obviously, you need to have your own server running
read -p "Enter key: " -s TEST_IMMICH_API_KEY  # Create an API key before running this
export TEST_IMMICH_API_KEY
make integration_test

License

This project is licensed under the GPL 3.0 (or later). See details in the LICENSE file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL