// FetchYearlyQuotes return a Quote slice containing yearly quotes of all time.
FetchYearlyQuotes return a Quote slice containing yearly quotes of all time.
// FetchYearlyQuotes return a Quote slice containing yearly quotes of all time .
func (c *Client) FetchYearlyQuotes(code string) ([]Quote, error) {
	rawData, err := c.fetchYearlyQuotes(code)
	if err != nil {
		var e *noDataError
		if errors.As(err, &e) {
			return []Quote{}, nil
		}
		return nil, err
	}
	rawYearlyQuotes := zipFieldsAndItems(rawData, "fields", "data")
	qs := make([]Quote, 0)
	for _, rawYearlyQuote := range rawYearlyQuotes {
		qs = append(qs, *convertRawYearlyQuote(rawYearlyQuote, code))
	}
	return qs, nil
}
func ( c * Client ) FetchYearlyQuotes ( code string ) ( [ ] Quote , error ) { rawData , err := c . fetchYearlyQuotes ( code ) if err != nil { var e * noDataError if errors . As ( err , & e ) { return [ ] Quote { } , nil } return nil , err } rawYearlyQuotes := zipFieldsAndItems ( rawData , " " , " " ) qs := make ( [ ] Quote , 0 ) for _ , rawYearlyQuote := range rawYearlyQuotes { qs = append ( qs , * convertRawYearlyQuote ( rawYearlyQuote , code ) ) } return qs , nil }
FetchYearlyQuotes return a Quote slice containing yearly quotes of all time.
FetchYearlyQuotes return a Quote slice containing yearly quotes of all time .