// GetGenreWithAllChildren gets genre with all lower hierarchy genre
GetGenreWithAllChildren gets genre with all lower hierarchy genre
// GetGenreWithAllChildren gets genre with all lower hierarchy genre
func (c *Client) GetGenreWithAllChildren(ctx context.Context, genreID string) (*Genre, error) {
	resp, err := c.SearchGenre(ctx, genreID)
	if err != nil {
		return nil, fmt.Errorf("httputil.GetAndUnmarshal: %w", err)
	}
	genre := &Genre{
		ID:        resp.Current.ID,
		Name:      resp.Current.Name,
		Level:     resp.Current.Level,
		TagGroups: resp.TagGroups,
	}
	if err := c.setChildGenres(ctx, genre); err != nil {
		return nil, fmt.Errorf("c.setChildGenres: %w", err)
	}
	return genre, nil
}
func ( c * Client ) GetGenreWithAllChildren ( ctx context . Context , genreID string ) ( * Genre , error ) { resp , err := c . SearchGenre ( ctx , genreID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } genre := & Genre { ID : resp . Current . ID , Name : resp . Current . Name , Level : resp . Current . Level , TagGroups : resp . TagGroups , } if err := c . setChildGenres ( ctx , genre ) ; err != nil { return nil , fmt . Errorf ( " " , err ) } return genre , nil }
GetGenreWithAllChildren gets genre with all lower hierarchy genre
GetGenreWithAllChildren gets genre with all lower hierarchy genre