Adding GetAlbum method and unite tests
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
0476727633
commit
6b742a1db4
9 changed files with 102 additions and 6 deletions
11
api/v1/album.go
Normal file
11
api/v1/album.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package api
|
||||
|
||||
// GET /api/v1/albums
|
||||
func (v1 *V1Client) GetAlbum(uuid string) (Album, error) {
|
||||
album := Album{}
|
||||
|
||||
// NOTE: Even though this method is singular GetAlbum
|
||||
// if will call the "albums" plural endpoint.
|
||||
err := v1.GET("/api/v1/albums/%s", uuid).JSON(&album)
|
||||
return album, err
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue