Adding GetUserWithMetadataResponse

This commit is contained in:
gfleury 2020-03-18 11:09:19 -03:00
parent 254a11e522
commit ffb767fdb8

View File

@ -470,6 +470,13 @@ func GetContentResponse(r *APIResponse) (Content, error) {
return c, err
}
// GetUserWithMetadataResponse casts users into structure
func GetUserWithMetadataResponse(r *APIResponse) (UserWithMetadata, error) {
var c UserWithMetadata
err := mapstructure.Decode(r.Values, &c)
return c, err
}
// GetUsersResponse casts users into structure
func GetUsersResponse(r *APIResponse) ([]User, error) {
var c []User