func (s *FavoritesService) Add(opt *FavoritesAddOption) (resp *http.Response, err error) {
	err = s.ValidateAddOpt(opt)
	if err != nil {
		return
	}
	req, err := s.client.NewRequest("POST", "favorites/add", opt)
	if err != nil {
		return
	}
	resp, err = s.client.Do(req, nil)
	if err != nil {
		return
	}
	return
}
Add Add a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication and the following permission: 'Browse' on the project of the specified component.
package sonargo
import "net/http"
type FavoritesService struct {
	client *Client
}
type FavoritesSearchObject struct {
	Favorites []*Favorite `json:"favorites,omitempty"`
	Paging    Paging      `json:"paging,omitempty"`
}
type Favorite struct {
	Key          string `json:"key,omitempty"`
	Name         string `json:"name,omitempty"`
	Organization string `json:"organization,omitempty"`
	Qualifier    string `json:"qualifier,omitempty"`
}
type FavoritesAddOption struct {
	Component string `url:"component,omitempty"`  
}