diff --git a/album.go b/album.go new file mode 100644 index 0000000..7c205b4 --- /dev/null +++ b/album.go @@ -0,0 +1,17 @@ +package snapas + +import ( + "html/template" + "time" +) + +// Album represents a Snap.as photo album / gallery. +type Album struct { + Created time.Time `json:"created"` + Title string `json:"title"` + Body *string `json:"body"` + HTMLBody *template.HTML `json:"html_body"` + Alias string `json:"alias"` + Views int64 `json:"views"` + Photos []Photo `json:"photos"` +} diff --git a/photo.go b/photo.go new file mode 100644 index 0000000..656248b --- /dev/null +++ b/photo.go @@ -0,0 +1,14 @@ +package snapas + +import "time" + +// Photo represents a photo on Snap.as. +type Photo struct { + ID string `json:"id"` + Created time.Time `json:"created"` + Body *string `json:"body"` + Filename string `json:"filename"` + Size int64 `json:"size"` + URL string `json:"url"` + Album *Album `json:"album"` +}