PhotoStructure’s v2.1 REST-ish API is pretty simple:
/api/asset/:assetId
returns ApiAsset = SimpleAsset & (ImageAttrs | VideoAttrs)
interface SimpleAsset {
assetId: number
name?: string
width: number
height: number
rotation: number
capturedAtLocale: string
aspectRatio: number
contextTag?: ApiTag // this is the tag shown in the header
beforeAssetId?: AssetId
afterAssetId?: AssetId
durationHMS?: string
hidden: boolean
liked: boolean
excluded: boolean
deleted: boolean
}
interface ImageAttrs {
/** for the fit reducer */
imgAttrs: StrBoolValued // src, srcSet, sizes, width, ...
}
interface VideoAttrs {
videoAttrs: StrBoolValued
videoSources: StrBoolValued[]
}
/api/asset/:assetId/info
Returns
interface ApiAssetInfo {
assetId: number
description?: string
capturedAtLocale: string
mimetype: string
files: ApiAssetFile[]
tags: ApiTag[]
showOpenFile: boolean // only true if the request is from localhost
durationHMS?: string // only set for videos
fps?: number // only set for videos
focalLength?: string // 35 mm
// AKA "F number"
aperture?: number // 4.8
// AKA "exposure time", but is more often referred as "shutter speed"
shutterSpeed?: string // 1/100 (does this need to be cleaned up?)
iso?: number // 100
}