diff --git a/api/v1/album.go b/api/v1/album.go index 3cf77ed..7dd0eb0 100644 --- a/api/v1/album.go +++ b/api/v1/album.go @@ -111,7 +111,7 @@ func (v1 *V1Client) DislikeAlbum(uuid string) error { } // POST /api/v1/albums/:uid/clone -func (v1 *V1Client) CloneAlbums(object Album) (Album, error) { +func (v1 *V1Client) CloneAlbum(object Album) (Album, error) { if object.AlbumUID == "" { return object, fmt.Errorf("missing album.AlbumUID in album") } @@ -121,14 +121,24 @@ func (v1 *V1Client) CloneAlbums(object Album) (Album, error) { } // POST /api/v1/albums/:uid/photos -func (v1 *V1Client) AddPhotosToAlbum(albumUUID string, objects []Photo) error { - resp := v1.POST(&objects, "/api/v1/albums/%s/photos", albumUUID) +func (v1 *V1Client) AddPhotosToAlbum(albumUUID string, photoIDs []string) error { + payload := struct { + Photos []string `json:"photos"` + }{ + Photos: photoIDs, + } + resp := v1.POST(&payload, "/api/v1/albums/%s/photos", albumUUID) return resp.Error } // DELETE /api/v1/albums/:uid/photos -func (v1 *V1Client) DeletePhotosFromAlbum(albumUUID string, objects []Photo) error { - resp := v1.DELETE(&objects, "/api/v1/albums/%s/photos", albumUUID) +func (v1 *V1Client) DeletePhotosFromAlbum(albumUUID string, photoIDs []string) error { + payload := struct { + Photos []string `json:"photos"` + }{ + Photos: photoIDs, + } + resp := v1.DELETE(&payload, "/api/v1/albums/%s/photos", albumUUID) return resp.Error } diff --git a/api/v1/client.go b/api/v1/client.go index 49d1d15..5c55af0 100644 --- a/api/v1/client.go +++ b/api/v1/client.go @@ -4,11 +4,12 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/kris-nova/logger" "io/ioutil" "net/http" "net/url" "strings" + + "github.com/kris-nova/logger" ) const ( diff --git a/api/v1/index.go b/api/v1/index.go new file mode 100644 index 0000000..7fbb3b4 --- /dev/null +++ b/api/v1/index.go @@ -0,0 +1,13 @@ +package api + +// POST /api/v1/index +func (v1 *V1Client) Index() error { + resp := v1.POST(nil, "/api/v1/index") + return resp.Error +} + +// DELETE /api/v1/index +func (v1 *V1Client) CancelIndex() error { + resp := v1.DELETE(nil, "/api/v1/index") + return resp.Error +} diff --git a/api/v1/photo.go b/api/v1/photo.go index 4e5e6c2..b73b9fe 100644 --- a/api/v1/photo.go +++ b/api/v1/photo.go @@ -1,7 +1,5 @@ package api - - // GET /api/v1/photos/:uuid // // Parameters: @@ -14,6 +12,52 @@ func (v1 *V1Client) GetPhoto(uuid string) (Photo, error) { return object, err } +type PhotoOptions struct { + Count int + Offset int + AlbumUID string + Filter string + Merged bool + Country string + Camera int + Order string + Q string +} + +const ( + DefaultPhotoOptionsCount = 60 + DefaultPhotoOptionsOffset = 0 + DefaultPhotoOptionsMerged = true + DefaultPhotoOptionsCamera = 0 + DefaultPhotoOptionsOrder = "oldest" +) + +// GET /api/v1/photos/ +// +// http://localhost:8080/api/v1/photos? +// count=60&offset=0&album=aqoe4m9204aigugh&filter=&merged=true&country=&camera=0&order=oldest&q= +func (v1 *V1Client) GetPhotos(options *PhotoOptions) ([]Photo, error) { + var photos []Photo + if options == nil { + options = &PhotoOptions{ + Count: DefaultPhotoOptionsCount, + Offset: DefaultPhotoOptionsOffset, + Merged: DefaultPhotoOptionsMerged, + Order: DefaultPhotoOptionsOrder, + Camera: DefaultPhotoOptionsCamera, + } + } + if options.Count == 0 { + return photos, nil + } + if options.Order == "" { + options.Order = DefaultPhotoOptionsOrder + } + err := v1.GET("/api/v1/photos?count=%d&offset=%d&album=%s&filter=%s&merged=%t&country=%s&camera=%d&order=%s&q=%s", + options.Count, options.Offset, options.AlbumUID, options.Filter, options.Merged, options.Country, options.Camera, options.Order, options.Q).JSON(&photos) + return photos, err +} + // PUT /api/v1/photos/:uid // // Parameters: diff --git a/api/v1/types.go b/api/v1/types.go index c3ff7e6..deb1402 100644 --- a/api/v1/types.go +++ b/api/v1/types.go @@ -5,10 +5,12 @@ import ( "time" ) +type Photos []Photo + // Photo represents a photo, all its properties, and link to all its images and sidecar files. type Photo struct { Meta - ID uint `gorm:"primary_key" yaml:"-"` + //ID uint `gorm:"primary_key" yaml:"-"` UUID string `gorm:"type:VARBINARY(42);index;" json:"DocumentID,omitempty" yaml:"DocumentID,omitempty"` TakenAt time.Time `gorm:"type:datetime;index:idx_photos_taken_uid;" json:"TakenAt" yaml:"TakenAt"` TakenAtLocal time.Time `gorm:"type:datetime;" yaml:"-"` @@ -52,13 +54,13 @@ type Photo struct { CameraSrc string `gorm:"type:VARBINARY(8);" json:"CameraSrc" yaml:"-"` LensID uint `gorm:"index:idx_photos_camera_lens;default:1" json:"LensID" yaml:"-"` Details *Details `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Details" yaml:"Details"` - Camera *Camera `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Camera" yaml:"-"` - Lens *Lens `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Lens" yaml:"-"` - Cell *Cell `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Cell" yaml:"-"` - Place *Place `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Place" yaml:"-"` - Keywords []Keyword `json:"-" yaml:"-"` - Albums []Album `json:"-" yaml:"-"` - Files []File `yaml:"-"` + Camera *Camera `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Camera" yaml:"-"` + Lens *Lens `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Lens" yaml:"-"` + Cell *Cell `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Cell" yaml:"-"` + Place *Place `gorm:"association_autoupdate:false;association_autocreate:false;association_save_reference:false" json:"Place" yaml:"-"` + Keywords []Keyword `json:"-" yaml:"-"` + Albums []Album `json:"-" yaml:"-"` + Files []File `yaml:"-"` //Labels []PhotoLabel `yaml:"-"` CreatedAt time.Time `yaml:"CreatedAt,omitempty"` UpdatedAt time.Time `yaml:"UpdatedAt,omitempty"` @@ -193,7 +195,6 @@ type PhotoAlbum struct { Album *Album `gorm:"PRELOAD:true" yaml:"-"` } - // File represents an image or sidecar file that belongs to a photo. type File struct { ID uint `gorm:"primary_key" json:"-" yaml:"-"` @@ -267,7 +268,6 @@ type FileShare struct { UpdatedAt time.Time } - // PhotoLabel represents the many-to-many relation between Photo and label. // Labels are weighted by uncertainty (100 - confidence) type PhotoLabel struct { diff --git a/sample-app/photoprism/storage/albums/album/aqoe0xu1149t43i3.yml b/sample-app/photoprism/storage/albums/album/aqoe0xu1149t43i3.yml index 87f6065..f463f41 100755 --- a/sample-app/photoprism/storage/albums/album/aqoe0xu1149t43i3.yml +++ b/sample-app/photoprism/storage/albums/album/aqoe0xu1149t43i3.yml @@ -7,3 +7,4 @@ Order: oldest Country: zz CreatedAt: 2021-02-11T23:22:42Z UpdatedAt: 2021-02-11T23:22:42.31692892Z +DeletedAt: 2021-02-12T00:14:52.285222547Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1231tb94a48k.yml b/sample-app/photoprism/storage/albums/album/aqoe1231tb94a48k.yml index b0d2460..bbb5c87 100755 --- a/sample-app/photoprism/storage/albums/album/aqoe1231tb94a48k.yml +++ b/sample-app/photoprism/storage/albums/album/aqoe1231tb94a48k.yml @@ -7,3 +7,4 @@ Order: oldest Country: zz CreatedAt: 2021-02-11T23:25:16Z UpdatedAt: 2021-02-11T23:25:15.61908592Z +DeletedAt: 2021-02-12T00:14:52.285222547Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1981fbhzaou2.yml b/sample-app/photoprism/storage/albums/album/aqoe1981fbhzaou2.yml index 47e1787..f83a38d 100755 --- a/sample-app/photoprism/storage/albums/album/aqoe1981fbhzaou2.yml +++ b/sample-app/photoprism/storage/albums/album/aqoe1981fbhzaou2.yml @@ -6,3 +6,4 @@ Order: oldest Country: zz CreatedAt: 2021-02-11T23:29:33Z UpdatedAt: 2021-02-11T23:29:33Z +DeletedAt: 2021-02-12T00:14:52.285222547Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1bw1ywyawhlb.yml b/sample-app/photoprism/storage/albums/album/aqoe1bw1ywyawhlb.yml index 5481caa..c545433 100755 --- a/sample-app/photoprism/storage/albums/album/aqoe1bw1ywyawhlb.yml +++ b/sample-app/photoprism/storage/albums/album/aqoe1bw1ywyawhlb.yml @@ -6,3 +6,4 @@ Order: oldest Country: zz CreatedAt: 2021-02-11T23:31:08Z UpdatedAt: 2021-02-11T23:31:08Z +DeletedAt: 2021-02-11T23:31:08.058407849Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1cs1rrfaer9d.yml b/sample-app/photoprism/storage/albums/album/aqoe1cs1rrfaer9d.yml index 26701d6..57bd71a 100755 --- a/sample-app/photoprism/storage/albums/album/aqoe1cs1rrfaer9d.yml +++ b/sample-app/photoprism/storage/albums/album/aqoe1cs1rrfaer9d.yml @@ -7,3 +7,4 @@ Order: oldest Country: zz CreatedAt: 2021-02-11T23:31:41Z UpdatedAt: 2021-02-11T23:31:40.791556222Z +DeletedAt: 2021-02-11T23:31:40.798855984Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1mn3669ed8vc.yml b/sample-app/photoprism/storage/albums/album/aqoe1mn3669ed8vc.yml new file mode 100755 index 0000000..8ffb002 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe1mn3669ed8vc.yml @@ -0,0 +1,10 @@ +UID: aqoe1mn3669ed8vc +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:37:36Z +UpdatedAt: 2021-02-11T23:37:35.931076271Z +DeletedAt: 2021-02-11T23:37:35.938663557Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1mnib00h33mh.yml b/sample-app/photoprism/storage/albums/album/aqoe1mnib00h33mh.yml new file mode 100755 index 0000000..26e1f86 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe1mnib00h33mh.yml @@ -0,0 +1,9 @@ +UID: aqoe1mnib00h33mh +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:37:36Z +UpdatedAt: 2021-02-11T23:37:36Z +DeletedAt: 2021-02-11T23:37:35.984813813Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1su2yz12rn7r.yml b/sample-app/photoprism/storage/albums/album/aqoe1su2yz12rn7r.yml new file mode 100755 index 0000000..28f3849 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe1su2yz12rn7r.yml @@ -0,0 +1,9 @@ +UID: aqoe1su2yz12rn7r +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:41:19Z +UpdatedAt: 2021-02-11T23:41:19Z +DeletedAt: 2021-02-11T23:41:18.568153261Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1su312pday8a.yml b/sample-app/photoprism/storage/albums/album/aqoe1su312pday8a.yml new file mode 100755 index 0000000..7aaa0b6 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe1su312pday8a.yml @@ -0,0 +1,10 @@ +UID: aqoe1su312pday8a +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:41:18Z +UpdatedAt: 2021-02-11T23:41:18.505274668Z +DeletedAt: 2021-02-11T23:41:18.517183797Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe1su3gj3q7mrk.yml b/sample-app/photoprism/storage/albums/album/aqoe1su3gj3q7mrk.yml new file mode 100755 index 0000000..f1f2f2c --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe1su3gj3q7mrk.yml @@ -0,0 +1,9 @@ +UID: aqoe1su3gj3q7mrk +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:41:19Z +UpdatedAt: 2021-02-11T23:41:19Z +DeletedAt: 2021-02-11T23:41:18.592298473Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2nw1mc3m0c95.yml b/sample-app/photoprism/storage/albums/album/aqoe2nw1mc3m0c95.yml new file mode 100755 index 0000000..171b413 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2nw1mc3m0c95.yml @@ -0,0 +1,9 @@ +UID: aqoe2nw1mc3m0c95 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:59:57Z +UpdatedAt: 2021-02-11T23:59:57Z +DeletedAt: 2021-02-11T23:59:56.834221161Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2nw2mtjrlyuq.yml b/sample-app/photoprism/storage/albums/album/aqoe2nw2mtjrlyuq.yml new file mode 100755 index 0000000..7bfe8aa --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2nw2mtjrlyuq.yml @@ -0,0 +1,9 @@ +UID: aqoe2nw2mtjrlyuq +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:59:57Z +UpdatedAt: 2021-02-11T23:59:57Z +DeletedAt: 2021-02-11T23:59:56.78263971Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2nw310xqz9f1.yml b/sample-app/photoprism/storage/albums/album/aqoe2nw310xqz9f1.yml new file mode 100755 index 0000000..dc273ec --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2nw310xqz9f1.yml @@ -0,0 +1,9 @@ +UID: aqoe2nw310xqz9f1 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:59:57Z +UpdatedAt: 2021-02-11T23:59:57Z +DeletedAt: 2021-02-11T23:59:56.805849627Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2nws4nefmwtt.yml b/sample-app/photoprism/storage/albums/album/aqoe2nws4nefmwtt.yml new file mode 100755 index 0000000..3d9321f --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2nws4nefmwtt.yml @@ -0,0 +1,10 @@ +UID: aqoe2nws4nefmwtt +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-11T23:59:57Z +UpdatedAt: 2021-02-11T23:59:56.727315788Z +DeletedAt: 2021-02-11T23:59:56.734742155Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2u021a4zjufp.yml b/sample-app/photoprism/storage/albums/album/aqoe2u021a4zjufp.yml new file mode 100755 index 0000000..b52de44 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2u021a4zjufp.yml @@ -0,0 +1,9 @@ +UID: aqoe2u021a4zjufp +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:03:37Z +UpdatedAt: 2021-02-12T00:03:37Z +DeletedAt: 2021-02-12T00:03:36.899233684Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2u0299hfp9uf.yml b/sample-app/photoprism/storage/albums/album/aqoe2u0299hfp9uf.yml new file mode 100755 index 0000000..0a3ec1c --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2u0299hfp9uf.yml @@ -0,0 +1,9 @@ +UID: aqoe2u0299hfp9uf +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:03:37Z +UpdatedAt: 2021-02-12T00:03:37Z +DeletedAt: 2021-02-12T00:03:36.927067016Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2u03t1k09mbq.yml b/sample-app/photoprism/storage/albums/album/aqoe2u03t1k09mbq.yml new file mode 100755 index 0000000..ad39aba --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2u03t1k09mbq.yml @@ -0,0 +1,10 @@ +UID: aqoe2u03t1k09mbq +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:03:37Z +UpdatedAt: 2021-02-12T00:03:36.846932177Z +DeletedAt: 2021-02-12T00:03:36.854999187Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2u0zakwm0kh4.yml b/sample-app/photoprism/storage/albums/album/aqoe2u0zakwm0kh4.yml new file mode 100755 index 0000000..14c33f4 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2u0zakwm0kh4.yml @@ -0,0 +1,9 @@ +UID: aqoe2u0zakwm0kh4 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:03:37Z +UpdatedAt: 2021-02-12T00:03:37Z +DeletedAt: 2021-02-12T00:03:36.955701902Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2y1x2v9ulekw.yml b/sample-app/photoprism/storage/albums/album/aqoe2y1x2v9ulekw.yml new file mode 100755 index 0000000..c089c82 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2y1x2v9ulekw.yml @@ -0,0 +1,10 @@ +UID: aqoe2y1x2v9ulekw +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:06:02Z +UpdatedAt: 2021-02-12T00:06:01.997666242Z +DeletedAt: 2021-02-12T00:06:02.008962725Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2y233f9xc3me.yml b/sample-app/photoprism/storage/albums/album/aqoe2y233f9xc3me.yml new file mode 100755 index 0000000..4b7173d --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2y233f9xc3me.yml @@ -0,0 +1,9 @@ +UID: aqoe2y233f9xc3me +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:06:02Z +UpdatedAt: 2021-02-12T00:06:02Z +DeletedAt: 2021-02-12T00:06:02.061930815Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2y23iah7q8dd.yml b/sample-app/photoprism/storage/albums/album/aqoe2y23iah7q8dd.yml new file mode 100755 index 0000000..3cec9bd --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2y23iah7q8dd.yml @@ -0,0 +1,9 @@ +UID: aqoe2y23iah7q8dd +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:06:02Z +UpdatedAt: 2021-02-12T00:06:02Z +DeletedAt: 2021-02-12T00:06:02.107878556Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe2y23n8shfo26.yml b/sample-app/photoprism/storage/albums/album/aqoe2y23n8shfo26.yml new file mode 100755 index 0000000..47fd047 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe2y23n8shfo26.yml @@ -0,0 +1,9 @@ +UID: aqoe2y23n8shfo26 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:06:02Z +UpdatedAt: 2021-02-12T00:06:02Z +DeletedAt: 2021-02-12T00:06:02.083118581Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe310mqejp7sjx.yml b/sample-app/photoprism/storage/albums/album/aqoe310mqejp7sjx.yml new file mode 100755 index 0000000..ac406d7 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe310mqejp7sjx.yml @@ -0,0 +1,9 @@ +UID: aqoe310mqejp7sjx +Slug: novaalbum +Type: album +Title: NovaAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:07:48Z +UpdatedAt: 2021-02-12T00:07:48Z +DeletedAt: 2021-02-12T00:07:48.087397413Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3di2oe0gj7eb.yml b/sample-app/photoprism/storage/albums/album/aqoe3di2oe0gj7eb.yml new file mode 100755 index 0000000..5fae704 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3di2oe0gj7eb.yml @@ -0,0 +1,10 @@ +UID: aqoe3di2oe0gj7eb +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:15:18Z +UpdatedAt: 2021-02-12T00:15:18.326635885Z +DeletedAt: 2021-02-12T00:15:18.337623732Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3di3f013g098.yml b/sample-app/photoprism/storage/albums/album/aqoe3di3f013g098.yml new file mode 100755 index 0000000..151b4c3 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3di3f013g098.yml @@ -0,0 +1,9 @@ +UID: aqoe3di3f013g098 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:15:18Z +UpdatedAt: 2021-02-12T00:15:18Z +DeletedAt: 2021-02-12T00:15:18.387748516Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3di3rfrp4osq.yml b/sample-app/photoprism/storage/albums/album/aqoe3di3rfrp4osq.yml new file mode 100755 index 0000000..e9aeb7d --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3di3rfrp4osq.yml @@ -0,0 +1,9 @@ +UID: aqoe3di3rfrp4osq +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:15:18Z +UpdatedAt: 2021-02-12T00:15:18Z +DeletedAt: 2021-02-12T00:15:18.417353099Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3di9wl91qjy1.yml b/sample-app/photoprism/storage/albums/album/aqoe3di9wl91qjy1.yml new file mode 100755 index 0000000..8c4ee54 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3di9wl91qjy1.yml @@ -0,0 +1,9 @@ +UID: aqoe3di9wl91qjy1 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:15:18Z +UpdatedAt: 2021-02-12T00:15:18Z +DeletedAt: 2021-02-12T00:15:18.441462643Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3go3alpu9g42.yml b/sample-app/photoprism/storage/albums/album/aqoe3go3alpu9g42.yml new file mode 100755 index 0000000..b951c48 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3go3alpu9g42.yml @@ -0,0 +1,9 @@ +UID: aqoe3go3alpu9g42 +Slug: february-2021-2 +Type: album +Title: February 2021 (2) +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:17:12Z +UpdatedAt: 2021-02-12T00:17:12Z +DeletedAt: 2021-02-12T00:25:55.610343844Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3sj140onsu3u.yml b/sample-app/photoprism/storage/albums/album/aqoe3sj140onsu3u.yml new file mode 100755 index 0000000..bdd5863 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3sj140onsu3u.yml @@ -0,0 +1,9 @@ +UID: aqoe3sj140onsu3u +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:24:20Z +UpdatedAt: 2021-02-12T00:24:20Z +DeletedAt: 2021-02-12T00:24:19.584898324Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3sj2oim76rfl.yml b/sample-app/photoprism/storage/albums/album/aqoe3sj2oim76rfl.yml new file mode 100755 index 0000000..e574a59 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3sj2oim76rfl.yml @@ -0,0 +1,10 @@ +UID: aqoe3sj2oim76rfl +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:24:19Z +UpdatedAt: 2021-02-12T00:24:19.452079212Z +DeletedAt: 2021-02-12T00:24:19.46454459Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3sj3d9vpwfs6.yml b/sample-app/photoprism/storage/albums/album/aqoe3sj3d9vpwfs6.yml new file mode 100755 index 0000000..b498869 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3sj3d9vpwfs6.yml @@ -0,0 +1,9 @@ +UID: aqoe3sj3d9vpwfs6 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:24:19Z +UpdatedAt: 2021-02-12T00:24:19Z +DeletedAt: 2021-02-12T00:24:19.513541437Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3sj5v7uxy0xi.yml b/sample-app/photoprism/storage/albums/album/aqoe3sj5v7uxy0xi.yml new file mode 100755 index 0000000..382e0c6 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3sj5v7uxy0xi.yml @@ -0,0 +1,9 @@ +UID: aqoe3sj5v7uxy0xi +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:24:20Z +UpdatedAt: 2021-02-12T00:24:20Z +DeletedAt: 2021-02-12T00:24:19.539899181Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3uk1ztdf4ly1.yml b/sample-app/photoprism/storage/albums/album/aqoe3uk1ztdf4ly1.yml new file mode 100755 index 0000000..21508a4 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3uk1ztdf4ly1.yml @@ -0,0 +1,10 @@ +UID: aqoe3uk1ztdf4ly1 +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:25:32Z +UpdatedAt: 2021-02-12T00:25:32.382246374Z +DeletedAt: 2021-02-12T00:25:32.39451528Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3uk2ssh3wlmu.yml b/sample-app/photoprism/storage/albums/album/aqoe3uk2ssh3wlmu.yml new file mode 100755 index 0000000..e722392 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3uk2ssh3wlmu.yml @@ -0,0 +1,9 @@ +UID: aqoe3uk2ssh3wlmu +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:25:32Z +UpdatedAt: 2021-02-12T00:25:32Z +DeletedAt: 2021-02-12T00:25:32.501491328Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3uk3quu1oau5.yml b/sample-app/photoprism/storage/albums/album/aqoe3uk3quu1oau5.yml new file mode 100755 index 0000000..2a2f4fa --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3uk3quu1oau5.yml @@ -0,0 +1,9 @@ +UID: aqoe3uk3quu1oau5 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:25:32Z +UpdatedAt: 2021-02-12T00:25:32Z +DeletedAt: 2021-02-12T00:25:32.438255604Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe3ukef6k7pr1n.yml b/sample-app/photoprism/storage/albums/album/aqoe3ukef6k7pr1n.yml new file mode 100755 index 0000000..fa3a728 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe3ukef6k7pr1n.yml @@ -0,0 +1,9 @@ +UID: aqoe3ukef6k7pr1n +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:25:32Z +UpdatedAt: 2021-02-12T00:25:32Z +DeletedAt: 2021-02-12T00:25:32.457679012Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe43017x1x557a.yml b/sample-app/photoprism/storage/albums/album/aqoe43017x1x557a.yml new file mode 100755 index 0000000..3965929 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe43017x1x557a.yml @@ -0,0 +1,10 @@ +UID: aqoe43017x1x557a +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:30:36Z +UpdatedAt: 2021-02-12T00:30:36.452565204Z +DeletedAt: 2021-02-12T00:30:36.466024116Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe43038gpo8o62.yml b/sample-app/photoprism/storage/albums/album/aqoe43038gpo8o62.yml new file mode 100755 index 0000000..1131cbf --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe43038gpo8o62.yml @@ -0,0 +1,9 @@ +UID: aqoe43038gpo8o62 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:30:37Z +UpdatedAt: 2021-02-12T00:30:37Z +DeletedAt: 2021-02-12T00:30:36.541728272Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4303e2k7fowx.yml b/sample-app/photoprism/storage/albums/album/aqoe4303e2k7fowx.yml new file mode 100755 index 0000000..7771c32 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4303e2k7fowx.yml @@ -0,0 +1,9 @@ +UID: aqoe4303e2k7fowx +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:30:36Z +UpdatedAt: 2021-02-12T00:30:36Z +DeletedAt: 2021-02-12T00:30:36.515616836Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe430hjepljox7.yml b/sample-app/photoprism/storage/albums/album/aqoe430hjepljox7.yml new file mode 100755 index 0000000..d306a9e --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe430hjepljox7.yml @@ -0,0 +1,9 @@ +UID: aqoe430hjepljox7 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:30:37Z +UpdatedAt: 2021-02-12T00:30:37Z +DeletedAt: 2021-02-12T00:30:36.590399562Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe46u1y7nllowc.yml b/sample-app/photoprism/storage/albums/album/aqoe46u1y7nllowc.yml new file mode 100755 index 0000000..8f6a7e7 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe46u1y7nllowc.yml @@ -0,0 +1,9 @@ +UID: aqoe46u1y7nllowc +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:32:55Z +UpdatedAt: 2021-02-12T00:32:55Z +DeletedAt: 2021-02-12T00:32:54.670452125Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe46u2eytps9ks.yml b/sample-app/photoprism/storage/albums/album/aqoe46u2eytps9ks.yml new file mode 100755 index 0000000..aaebd41 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe46u2eytps9ks.yml @@ -0,0 +1,10 @@ +UID: aqoe46u2eytps9ks +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:32:55Z +UpdatedAt: 2021-02-12T00:32:54.621067369Z +DeletedAt: 2021-02-12T00:32:54.629069306Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe46ugvoopsx2c.yml b/sample-app/photoprism/storage/albums/album/aqoe46ugvoopsx2c.yml new file mode 100755 index 0000000..2b994d5 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe46ugvoopsx2c.yml @@ -0,0 +1,9 @@ +UID: aqoe46ugvoopsx2c +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:32:55Z +UpdatedAt: 2021-02-12T00:32:55Z +DeletedAt: 2021-02-12T00:32:54.738939626Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe46uh3251f3o5.yml b/sample-app/photoprism/storage/albums/album/aqoe46uh3251f3o5.yml new file mode 100755 index 0000000..ea50447 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe46uh3251f3o5.yml @@ -0,0 +1,9 @@ +UID: aqoe46uh3251f3o5 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:32:55Z +UpdatedAt: 2021-02-12T00:32:55Z +DeletedAt: 2021-02-12T00:32:54.694577526Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4k41ws8kl303.yml b/sample-app/photoprism/storage/albums/album/aqoe4k41ws8kl303.yml new file mode 100755 index 0000000..482b9c0 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4k41ws8kl303.yml @@ -0,0 +1,9 @@ +UID: aqoe4k41ws8kl303 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:40:52Z +UpdatedAt: 2021-02-12T00:40:52Z +DeletedAt: 2021-02-12T00:40:52.236143624Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4k420c8937zq.yml b/sample-app/photoprism/storage/albums/album/aqoe4k420c8937zq.yml new file mode 100755 index 0000000..ca24e66 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4k420c8937zq.yml @@ -0,0 +1,10 @@ +UID: aqoe4k420c8937zq +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:40:52Z +UpdatedAt: 2021-02-12T00:40:52.149620745Z +DeletedAt: 2021-02-12T00:40:52.157633931Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4k423kseyeok.yml b/sample-app/photoprism/storage/albums/album/aqoe4k423kseyeok.yml new file mode 100755 index 0000000..2ed345b --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4k423kseyeok.yml @@ -0,0 +1,9 @@ +UID: aqoe4k423kseyeok +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:40:52Z +UpdatedAt: 2021-02-12T00:40:52Z +DeletedAt: 2021-02-12T00:40:52.205835621Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4k42wb7vdpy4.yml b/sample-app/photoprism/storage/albums/album/aqoe4k42wb7vdpy4.yml new file mode 100755 index 0000000..c8027bb --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4k42wb7vdpy4.yml @@ -0,0 +1,9 @@ +UID: aqoe4k42wb7vdpy4 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:40:52Z +UpdatedAt: 2021-02-12T00:40:52Z +DeletedAt: 2021-02-12T00:40:52.346059642Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4m917yd0x5d8.yml b/sample-app/photoprism/storage/albums/album/aqoe4m917yd0x5d8.yml new file mode 100755 index 0000000..cba3661 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4m917yd0x5d8.yml @@ -0,0 +1,9 @@ +UID: aqoe4m917yd0x5d8 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:42:10Z +UpdatedAt: 2021-02-12T00:42:10Z +DeletedAt: 2021-02-12T00:42:09.739048804Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4m91dd475mc2.yml b/sample-app/photoprism/storage/albums/album/aqoe4m91dd475mc2.yml new file mode 100755 index 0000000..06746cf --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4m91dd475mc2.yml @@ -0,0 +1,10 @@ +UID: aqoe4m91dd475mc2 +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:42:10Z +UpdatedAt: 2021-02-12T00:42:09.68534495Z +DeletedAt: 2021-02-12T00:42:09.697602792Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4m9204aigugh.yml b/sample-app/photoprism/storage/albums/album/aqoe4m9204aigugh.yml new file mode 100755 index 0000000..bffede1 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4m9204aigugh.yml @@ -0,0 +1,11 @@ +UID: aqoe4m9204aigugh +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:42:10Z +UpdatedAt: 2021-02-12T00:42:10Z +Photos: +- UID: pqnzigq351j2fqgn + CreatedAt: 2021-02-12T00:42:09.791065836Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe4m93kl5118yf.yml b/sample-app/photoprism/storage/albums/album/aqoe4m93kl5118yf.yml new file mode 100755 index 0000000..095790a --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe4m93kl5118yf.yml @@ -0,0 +1,9 @@ +UID: aqoe4m93kl5118yf +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T00:42:10Z +UpdatedAt: 2021-02-12T00:42:10Z +DeletedAt: 2021-02-12T00:42:09.764632667Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5s018umhsg2z.yml b/sample-app/photoprism/storage/albums/album/aqoe5s018umhsg2z.yml new file mode 100755 index 0000000..cc913ac --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5s018umhsg2z.yml @@ -0,0 +1,9 @@ +UID: aqoe5s018umhsg2z +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:07:12Z +UpdatedAt: 2021-02-12T01:07:12Z +DeletedAt: 2021-02-12T01:07:12.278795475Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5s02eypzy49n.yml b/sample-app/photoprism/storage/albums/album/aqoe5s02eypzy49n.yml new file mode 100755 index 0000000..d893c08 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5s02eypzy49n.yml @@ -0,0 +1,10 @@ +UID: aqoe5s02eypzy49n +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:07:12Z +UpdatedAt: 2021-02-12T01:07:12.18606883Z +DeletedAt: 2021-02-12T01:07:12.20368425Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5s02htbyx02a.yml b/sample-app/photoprism/storage/albums/album/aqoe5s02htbyx02a.yml new file mode 100755 index 0000000..cbd2170 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5s02htbyx02a.yml @@ -0,0 +1,9 @@ +UID: aqoe5s02htbyx02a +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:07:12Z +UpdatedAt: 2021-02-12T01:07:12Z +DeletedAt: 2021-02-12T01:07:12.25672608Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5s0kcesnf038.yml b/sample-app/photoprism/storage/albums/album/aqoe5s0kcesnf038.yml new file mode 100755 index 0000000..b90e8c2 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5s0kcesnf038.yml @@ -0,0 +1,9 @@ +UID: aqoe5s0kcesnf038 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:07:12Z +UpdatedAt: 2021-02-12T01:07:12Z +DeletedAt: 2021-02-12T01:07:12.311501625Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5um2nxaam1jf.yml b/sample-app/photoprism/storage/albums/album/aqoe5um2nxaam1jf.yml new file mode 100755 index 0000000..204b405 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5um2nxaam1jf.yml @@ -0,0 +1,9 @@ +UID: aqoe5um2nxaam1jf +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:08:46Z +UpdatedAt: 2021-02-12T01:08:46Z +DeletedAt: 2021-02-12T01:08:46.441203314Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5um3k2bjzdz3.yml b/sample-app/photoprism/storage/albums/album/aqoe5um3k2bjzdz3.yml new file mode 100755 index 0000000..054a095 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5um3k2bjzdz3.yml @@ -0,0 +1,10 @@ +UID: aqoe5um3k2bjzdz3 +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:08:46Z +UpdatedAt: 2021-02-12T01:08:46.349964437Z +DeletedAt: 2021-02-12T01:08:46.364581421Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5umo46cx9up1.yml b/sample-app/photoprism/storage/albums/album/aqoe5umo46cx9up1.yml new file mode 100755 index 0000000..243b858 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5umo46cx9up1.yml @@ -0,0 +1,9 @@ +UID: aqoe5umo46cx9up1 +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:08:46Z +UpdatedAt: 2021-02-12T01:08:46Z +DeletedAt: 2021-02-12T01:08:46.414981534Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5zd1dhchzyrt.yml b/sample-app/photoprism/storage/albums/album/aqoe5zd1dhchzyrt.yml new file mode 100755 index 0000000..e8425a0 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5zd1dhchzyrt.yml @@ -0,0 +1,9 @@ +UID: aqoe5zd1dhchzyrt +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:11:37Z +UpdatedAt: 2021-02-12T01:11:37Z +DeletedAt: 2021-02-12T01:11:37.410053582Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5zd1n8nyjezg.yml b/sample-app/photoprism/storage/albums/album/aqoe5zd1n8nyjezg.yml new file mode 100755 index 0000000..028d501 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5zd1n8nyjezg.yml @@ -0,0 +1,10 @@ +UID: aqoe5zd1n8nyjezg +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:11:37Z +UpdatedAt: 2021-02-12T01:11:37.317189151Z +DeletedAt: 2021-02-12T01:11:37.337078186Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe5zdgv8bbtzbn.yml b/sample-app/photoprism/storage/albums/album/aqoe5zdgv8bbtzbn.yml new file mode 100755 index 0000000..ecb3fc6 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe5zdgv8bbtzbn.yml @@ -0,0 +1,9 @@ +UID: aqoe5zdgv8bbtzbn +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:11:37Z +UpdatedAt: 2021-02-12T01:11:37Z +DeletedAt: 2021-02-12T01:11:37.38408389Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe63g15cp92acg.yml b/sample-app/photoprism/storage/albums/album/aqoe63g15cp92acg.yml new file mode 100755 index 0000000..5131335 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe63g15cp92acg.yml @@ -0,0 +1,10 @@ +UID: aqoe63g15cp92acg +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:14:05Z +UpdatedAt: 2021-02-12T01:14:04.617839652Z +DeletedAt: 2021-02-12T01:14:04.630483844Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe63g1hvf4c37t.yml b/sample-app/photoprism/storage/albums/album/aqoe63g1hvf4c37t.yml new file mode 100755 index 0000000..2c95386 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe63g1hvf4c37t.yml @@ -0,0 +1,9 @@ +UID: aqoe63g1hvf4c37t +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:14:05Z +UpdatedAt: 2021-02-12T01:14:05Z +DeletedAt: 2021-02-12T01:14:04.683342935Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe63g1wp37dwns.yml b/sample-app/photoprism/storage/albums/album/aqoe63g1wp37dwns.yml new file mode 100755 index 0000000..e6809cc --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe63g1wp37dwns.yml @@ -0,0 +1,9 @@ +UID: aqoe63g1wp37dwns +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:14:05Z +UpdatedAt: 2021-02-12T01:14:05Z +DeletedAt: 2021-02-12T01:14:04.720807005Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe66r266y7x2ct.yml b/sample-app/photoprism/storage/albums/album/aqoe66r266y7x2ct.yml new file mode 100755 index 0000000..19ee1c5 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe66r266y7x2ct.yml @@ -0,0 +1,10 @@ +UID: aqoe66r266y7x2ct +Slug: testalbum +Type: album +Title: TestAlbum +Description: An updated album description +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:16:03Z +UpdatedAt: 2021-02-12T01:16:03.089952155Z +DeletedAt: 2021-02-12T01:16:03.103617951Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe66r304v81itt.yml b/sample-app/photoprism/storage/albums/album/aqoe66r304v81itt.yml new file mode 100755 index 0000000..06fa6e8 --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe66r304v81itt.yml @@ -0,0 +1,9 @@ +UID: aqoe66r304v81itt +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:16:03Z +UpdatedAt: 2021-02-12T01:16:03Z +DeletedAt: 2021-02-12T01:16:03.147574525Z diff --git a/sample-app/photoprism/storage/albums/album/aqoe66r3bjgymp2o.yml b/sample-app/photoprism/storage/albums/album/aqoe66r3bjgymp2o.yml new file mode 100755 index 0000000..62c54ec --- /dev/null +++ b/sample-app/photoprism/storage/albums/album/aqoe66r3bjgymp2o.yml @@ -0,0 +1,9 @@ +UID: aqoe66r3bjgymp2o +Slug: testalbum +Type: album +Title: TestAlbum +Order: oldest +Country: zz +CreatedAt: 2021-02-12T01:16:03Z +UpdatedAt: 2021-02-12T01:16:03Z +DeletedAt: 2021-02-12T01:16:03.168746489Z diff --git a/sample-app/photoprism/storage/cache/sessions.json b/sample-app/photoprism/storage/cache/sessions.json index 942daf7..573218c 100644 --- a/sample-app/photoprism/storage/cache/sessions.json +++ b/sample-app/photoprism/storage/cache/sessions.json @@ -19,11 +19,21 @@ "tokens": null, "expiration": 1613675155095051774 }, + "07c2bbcb1df220261ea59e51cb729aa36a792270cbb1d2e6": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694636430173234 + }, "0957017ab9576154468a8a0df5fd74798be6965b3f5eef90": { "user": "uqnzie01i1nypnt9", "tokens": null, "expiration": 1613523028656083744 }, + "0b41fe7fdd8394795d0fd77aa68f1761178a50abeec9c368": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694332360000052 + }, "0bab87ab1e73344a73e4693465cfa7cd20bc3a448c11db72": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -44,6 +54,11 @@ "tokens": null, "expiration": 1613501612939596202 }, + "0dc38cde05d9e5740a9e37f2748baddca7c46afd1f838cb4": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613691457078516123 + }, "0f257f1b73a31dbb0cf7209bfdf46c02094f99da64e21e05": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -64,6 +79,11 @@ "tokens": null, "expiration": 1613502823940492608 }, + "14387dc41c2f75afa289e88f15f055295e85927dcdc1c2a9": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693016825633348 + }, "163e08d6fc94c7c7c07f1af8638fd5db4aa929b0462d5548": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -89,6 +109,11 @@ "tokens": null, "expiration": 1613519857033524517 }, + "22d46e54121f85c332e42948827f7604dc09fb46929796e8": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613695252131862322 + }, "2521ed30985fb1991e3d1271cbf6e2b53840d614647361af": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -119,6 +144,16 @@ "tokens": null, "expiration": 1613500923020420449 }, + "2dd6d162775366330abeb66b1e04c4e2baac2dd773c435dc": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613695329661942849 + }, + "2ee26b2287c528af16c9f9102371c71bb6b4235cdfad4c17": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613696833569070827 + }, "3201e2a3c31f05c72057a8219ef18418d794dd68ebb6da5a": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -209,11 +244,31 @@ "tokens": null, "expiration": 1613683106227931942 }, + "4ca01d7b57983db5506fbf14a253437f4a4327cc9c416e2f": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697244595185056 + }, + "5013c7649a605d60acdacbb8471c13d13c184207ae632d74": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693163291656795 + }, + "50d59fc456069245c1fb3862de9faaa06bed34a363347b03": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697363065863348 + }, "5225f5600acaefec701d3ab1f3cfe2cf4b10ad025f2bf58e": { "user": "uqnzie01i1nypnt9", "tokens": null, "expiration": 1613512362197250367 }, + "5233ac815403a62faaa51cea93b3a24c8208cbd7ae996619": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613691455910293847 + }, "542cf5000fd4adbc7d1b7d6f2919b3d73afcb4620784adb0": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -244,16 +299,36 @@ "tokens": null, "expiration": 1613502564441892628 }, + "5c57ac112bc4c8c0e2a6ffd1736ff5e6c28e804022b5c934": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613696927682100180 + }, + "5cddcd34e5e1ec2e4c27731e2f205a25faf5dde9e43974be": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694333640204990 + }, "5d748cc67c9c4efec35d910f799113b793a9fc47f9d88bd5": { "user": "uqnzie01i1nypnt9", "tokens": null, "expiration": 1613686778812288997 }, + "5fccb8ed1ac9f5ca4152b071128078b3da8810e88c1d9728": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697364465122850 + }, "6196c51bd2db97cc8aeaaac53bef1c6400c50774fedc97b5": { "user": "uqnzie01i1nypnt9", "tokens": null, "expiration": 1613512018478271866 }, + "674e45bdf14a7b5d6ad2cd21211bebc60930030621c64e1b": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613692798100018887 + }, "69a5ba6601a0b258d6437ec792376eb0401c31b03b786629": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -304,6 +379,11 @@ "tokens": null, "expiration": 1613685000623682231 }, + "812e28420b9f150c4469ddfd9b8f42176cdf30eb2bb2aa30": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613691679743858579 + }, "8173f5cece02b1a41e9bc937bbbbc80960b838d93cef7f2d": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -319,6 +399,11 @@ "tokens": null, "expiration": 1613519957592232701 }, + "84de25dc7ae05b3ecac64025982d1b63fd3886964f2400a5": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697098703845654 + }, "84f19033c3b06fbfb1493bed3e316a29a2d1c1864fb84b7c": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -329,6 +414,11 @@ "tokens": null, "expiration": 1613690562297926322 }, + "86d5676ec062851e44ab241820311b31efd7ca9b4909952d": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697097293896752 + }, "86e47c8475bbab147dc714ca6ae10b2ea64471d20a74e248": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -349,6 +439,11 @@ "tokens": null, "expiration": 1613675036520289034 }, + "8c913bdc6bb46b9bf04573932ec058cf4efdcca6501041f3": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613692796708677593 + }, "8dc3258f4ba5b40648c2917da1a711581f388d88fddfc46c": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -404,6 +499,11 @@ "tokens": null, "expiration": 1613526336803063121 }, + "9415a72cc9f5416dae7dea482e44729df6faf81203ea07d4": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694260717883159 + }, "961077032ebb89103c4e200be0e7517242cbfd0cbb989afc": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -414,6 +514,11 @@ "tokens": null, "expiration": 1613520871647468457 }, + "98e5de0d483f3f5d2ae25f8479ae78ae4c4acb77247769ec": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613696926327240659 + }, "9d382dfa406c01501fc5cc88b025c22d09248834da7e2b8b": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -449,6 +554,11 @@ "tokens": null, "expiration": 1613527553683560802 }, + "a93d51e0c61e45954744bb9e567e1a2e3adf66d6f523bfdc": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613697245890826574 + }, "aa9951b3b6533deadac0376a66a51e63ff6b9c306c82f4c8": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -459,6 +569,11 @@ "tokens": null, "expiration": 1613529105851594272 }, + "aeb3741344eb316aeadb56b74ca8bb6b231ec65813b28a97": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693018238355548 + }, "b03c0a0ffd4568804db70522319c1958aed2f46af39d1b5c": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -469,11 +584,21 @@ "tokens": null, "expiration": 1613502660685792657 }, + "b50e6818199b7570676580eff73ffa346c4896c9bd9305f0": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693718301651019 + }, "b68ba2f95b38fcef5ccb7307406eef6e68b49ec779240e8d": { "user": "uqnzie01i1nypnt9", "tokens": null, "expiration": 1613683356092862862 }, + "b6edd4e9fe74461c523cbe200db0fec1b482a4519a0fc75c": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693161977188987 + }, "b796ead30cc71b1a7dc3865f5271f00061a7c81bf7805f5a": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -484,6 +609,16 @@ "tokens": null, "expiration": 1613691101882965054 }, + "b964c2f2f93c50c371506e580d133dd3d47d04f5dc7e94f8": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693719704975163 + }, + "be6101bcba1fe4f99bc3b1b2f650e659b56d7b29ed028902": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613691678486384988 + }, "c053cc843cd5a58b6e7e4dfb0b896180734df58c6cf6ca88": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -524,6 +659,11 @@ "tokens": null, "expiration": 1613513847101926534 }, + "ca9f2fe1d2d8a307253b185e073efd437f9f4c9980093f7c": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613693268070234462 + }, "cd761cc3f15466f29eb789f5909bf26757d15661710e778c": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -544,6 +684,11 @@ "tokens": null, "expiration": 1613690972875693176 }, + "d64186f2514b44277546563171a1ab7109f1fd7016724f0f": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694259431652776 + }, "d67b4bf0a826d445959290e5de933409b06a6f593b0c665c": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -569,6 +714,11 @@ "tokens": null, "expiration": 1613514516062495823 }, + "e089dfbed493744e24c0cdf9be5f06c81979a17e166d098c": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613695253451697577 + }, "e32e2c906864ae8cd98a474a918c9e1c9cbe64b1acf3e975": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -619,6 +769,11 @@ "tokens": null, "expiration": 1613522175097030333 }, + "f5495743ebbb224a6d212b84473c2ed92721f113b9c005ff": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694774594671280 + }, "f5dd3851137b73d1e039ffa521d0c02e60504aa1f972fe13": { "user": "uqnzie01i1nypnt9", "tokens": null, @@ -629,6 +784,21 @@ "tokens": null, "expiration": 1613525903142014501 }, + "f9a0201abaa6d9be524db280a664ded3b788753744cac1a3": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694637844188675 + }, + "fac40abbc26627be007290d09f2bf060ddfa60f9b3c31cf3": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613696832158347108 + }, + "fcef70746e53856028c122514ee353a7d7ee393f59f9e2e3": { + "user": "uqnzie01i1nypnt9", + "tokens": null, + "expiration": 1613694775895766029 + }, "fdbeb275182730c03ee00fc84da57dc080e60fb9d1dc587e": { "user": "uqnzie01i1nypnt9", "tokens": null, diff --git a/sample-app/photoprism/storage/index.db b/sample-app/photoprism/storage/index.db index 1bb07f4..16f3e28 100644 Binary files a/sample-app/photoprism/storage/index.db and b/sample-app/photoprism/storage/index.db differ diff --git a/sample-app/photoprism/storage/sidecar/2021/02/20210204_031706_5B740007.yml b/sample-app/photoprism/storage/sidecar/2021/02/20210204_031706_5B740007.yml index cbb3dfd..33e6423 100755 --- a/sample-app/photoprism/storage/sidecar/2021/02/20210204_031706_5B740007.yml +++ b/sample-app/photoprism/storage/sidecar/2021/02/20210204_031706_5B740007.yml @@ -3,7 +3,7 @@ UID: pqnzigq351j2fqgn Type: image Title: A really great photo! TitleSrc: manual -Description: 'Sample App Description: 2021-02-11 15:31:40.812509789 -0800 PST m=+1.281183587' +Description: 'Sample App Description: 2021-02-11 17:16:03.257337568 -0800 PST m=+6.449998955' DescriptionSrc: manual OriginalName: IMG_3044 Year: -1 @@ -13,5 +13,5 @@ Details: Keywords: green, tambourine KeywordsSrc: manual CreatedAt: 2021-02-04T03:17:14.613092062Z -UpdatedAt: 2021-02-11T23:31:40.821110735Z -EditedAt: 2021-02-11T23:31:41Z +UpdatedAt: 2021-02-12T01:16:03.266957884Z +EditedAt: 2021-02-12T01:16:03Z diff --git a/test/album_test.go b/test/album_test.go index 0350059..3e8efee 100644 --- a/test/album_test.go +++ b/test/album_test.go @@ -93,9 +93,160 @@ func TestHappyCreateUpdateDeleteAlbum(t *testing.T) { } -// LikeAlbum -// DislikeAlbum +// TestHappyLikeDislikeAlbum +func TestHappyLikeDislikeAlbum(t *testing.T) { + album := api.Album{ + AlbumTitle: WellKnownAlbumTitle, + } + + newAlbum, err := Client.V1().CreateAlbum(album) + if err != nil { + t.Errorf("expected success creating album: %v", err) + t.FailNow() + } + + err = Client.V1().LikeAlbum(newAlbum.AlbumUID) + if err != nil { + t.Errorf("expected to like album: %v", err) + // Note: We do NOT FailNow() here because we want to clean up + } + + err = Client.V1().DislikeAlbum(newAlbum.AlbumUID) + if err != nil { + t.Errorf("expected to unlike album: %v", err) + // Note: We do NOT FailNow() here because we want to clean up + } + + err = Client.V1().DeleteAlbums([]string{newAlbum.AlbumUID}) + if err != nil { + t.Errorf("expected delete album %s, album not deleted: %v", newAlbum.AlbumUID, err) + t.FailNow() + } +} + +// TestHappyLikeDislikeAlbum +func TestSadLikeDislikeAlbum(t *testing.T) { + err := Client.V1().LikeAlbum(UnknownAlbumID) + if err == nil { + t.Errorf("expected to error during unknown like album: %v", err) + t.FailNow() + } + + err = Client.V1().DislikeAlbum(UnknownAlbumID) + if err == nil { + t.Errorf("expected to error during unknown dislike album: %v", err) + t.FailNow() + } +} + // CloneAlbums +// TestHappyLikeDislikeAlbum +func TestHappyCloneAlbum(t *testing.T) { + album := api.Album{ + AlbumTitle: WellKnownAlbumTitle, + } + + newAlbum, err := Client.V1().CreateAlbum(album) + if err != nil { + t.Errorf("expected success creating album: %v", err) + t.FailNow() + } + + clonedAlbum, err := Client.V1().CloneAlbum(newAlbum) + if err != nil { + t.Errorf("expected to like album: %v", err) + // Note: We do NOT FailNow() here because we want to clean up + } + + err = Client.V1().DeleteAlbums([]string{newAlbum.AlbumUID, clonedAlbum.AlbumUID}) + if err != nil { + t.Errorf("expected delete album %s, album not deleted: %v", newAlbum.AlbumUID, err) + t.FailNow() + } +} + +// TestSadCloneAlbum +func TestSadCloneAlbum(t *testing.T) { + album := api.Album{ + AlbumUID: UnknownAlbumID, + } + _, err := Client.V1().CloneAlbum(album) + if err == nil { + t.Errorf("expected to error during unknown clone album: %v", err) + t.FailNow() + } +} + +// TestAlbumAddDeletePhoto is a giant integration test +// that will exercise many methods in the SDK +//func TestAlbumAddDeletePhoto(t *testing.T) { +// album := api.Album{ +// AlbumTitle: WellKnownAlbumTitle, +// } +// +// newAlbum, err := Client.V1().CreateAlbum(album) +// if err != nil { +// t.Errorf("expected success creating album: %v", err) +// t.FailNow() +// } +// +// // Add Photos +// photos := []string{ +// WellKnownPhotoID, +// } +// err = Client.V1().AddPhotosToAlbum(newAlbum.AlbumUID, photos) +// if err != nil { +// t.Errorf("expected to add photos to album: %v", err) +// // Note: We do NOT FailNow() here because we want to clean up +// } +// +// // Get the photos by album +// updatedPhotos, err := Client.V1().GetPhotos(&api.PhotoOptions{ +// Count: 100, +// AlbumUID: newAlbum.AlbumUID, +// }) +// if err != nil { +// t.Errorf("expecting to list photos by album: %v", err) +// // Note: We do NOT FailNow() here because we want to clean up +// } +// +// var updatedPhotoIDs []string +// for _, photo := range updatedPhotos { +// updatedPhotoIDs = append(updatedPhotoIDs, photo.PhotoUID) +// } +// if len(updatedPhotos) != 1 { +// t.Errorf("expecting 1 well known photo in album, found: %d", len(updatedPhotos)) +// } +// +// err = Client.V1().DeletePhotosFromAlbum(newAlbum.AlbumUID, updatedPhotoIDs) +// if err != nil { +// t.Errorf("expected to delete newly created photos from album: %v", err) +// // Note: We do NOT FailNow() here because we want to clean up +// } +// +// // Get the photos by album +// updatedPhotos, err = Client.V1().GetPhotos(&api.PhotoOptions{ +// Count: 100, +// AlbumUID: newAlbum.AlbumUID, +// }) +// if err != nil { +// t.Errorf("expecting to list photos by album: %v", err) +// // Note: We do NOT FailNow() here because we want to clean up +// } +// +// if len(updatedPhotos) != 0 { +// t.Errorf("expected empty album, found %d photos", len(updatedPhotos)) +// // Note: We do NOT FailNow() here because we want to clean up +// } +// +// err = Client.V1().DeleteAlbums([]string{newAlbum.AlbumUID}) +// if err != nil { +// t.Errorf("expected delete album %s, album not deleted: %v", newAlbum.AlbumUID, err) +// t.FailNow() +// } +//} + // AddPhotosToAlbum // DeletePhotosFromAlbum + // GetAlbumDownload diff --git a/test/index_test.go b/test/index_test.go new file mode 100644 index 0000000..78f9f56 --- /dev/null +++ b/test/index_test.go @@ -0,0 +1,10 @@ +package test + +import "testing" + +func TestHappyIndex(t *testing.T) { + err := Client.V1().Index() + if err != nil { + t.Errorf("failed indexing: %v", err) + } +} diff --git a/test/photo_test.go b/test/photo_test.go index 6d1f64d..d0767ad 100644 --- a/test/photo_test.go +++ b/test/photo_test.go @@ -5,8 +5,23 @@ import ( "path" "testing" "time" + + "github.com/kris-nova/client-go/api/v1" ) +//TODO Test GetPhotos() + +func TestHappyGetPhotos(t *testing.T) { + _, err := Client.V1().GetPhotos(&api.PhotoOptions{ + Count: 1, + AlbumUID: WellKnownAlbumID, + }) + if err != nil { + t.Errorf("expected success getting well known photo: %v", err) + t.FailNow() + } +} + func TestHappyGetPhoto(t *testing.T) { _, err := Client.V1().GetPhoto(WellKnownPhotoID) if err != nil {