You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api.go
    path of file: ./repos/evcc/tariff/entsoe
    
    the code of the file until where you have to start completion: // Package entsoe implements a minimalized version of the European Network of Transmission System Operators for Electricity's
// Transparency Platform API (https://transparency.entsoe.eu)
package entsoe

import (
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"time"

	"github.com/dylanmei/iso8601"
	"github.com/evcc-io/evcc/util/request"
)

const (
	// BaseURI is the root path that the
    
func GetTsPriceData(ts []TimeSeries, resolution ResolutionType) ([]Rate, error) {
	var res []Rate

	for _, v := range ts {
		if v.Period.Resolution != resolution {
			continue
		}

		data, err := ExtractTsPriceData(&v)
		if err != nil {
			return nil, err
		}

		res = append(res, data...)
	}

	if len(res) == 0 {
		return nil, fmt.Errorf("no data for resolution: %v", resolution)
	}

	return res, nil
}