Options
The base URL of your Framalab panel. Trailing slashes are stripped automatically.
The gallery token for a specific project. Sent as
X-Gallery-Token on every request.
See Authentication to generate one.Returns
AFramalabClient object with these methods:
| Method | Returns | Async |
|---|---|---|
getProject() | GalleryProject | Yes |
getPhotos() | GalleryPhoto[] | Yes |
getCollections() | GalleryCollection[] | Yes |
getCollection(id) | GalleryCollectionDetail | Yes |
getMediaUrl(photoId, opts?) | string | No |
Singleton pattern
The client is a plain object — no connection is opened at creation time. Initialize once and reuse across your app.lib/framalab.ts
app.ts