diff --git a/api_response.go b/api_response.go index d0972fe..cecc357 100644 --- a/api_response.go +++ b/api_response.go @@ -561,6 +561,12 @@ func (k *SSHKey) String() string { return strings.Join(parts, " ") } +func GetProjectsResponse(r *APIResponse) ([]Project, error) { + var m []Project + err := mapstructure.Decode(r.Values["values"], &m) + return m, err +} + // GetCommitsResponse cast Commits into structure func GetCommitsResponse(r *APIResponse) ([]Commit, error) { var m []Commit