func (st *state) apiEndpoint(path, query string) (*url.URL, error) {
	path, err := apiPath(st.modelTag, path)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &url.URL{
		Scheme:   st.serverScheme,
		Host:     st.Addr(),
		Path:     path,
		RawQuery: query,
	}, nil
}
// apiEndpoint returns a URL that refers to the given API slash-prefixed
// endpoint path and query parameters.
apiEndpoint returns a URL that refers to the given API slash-prefixed
endpoint path and query parameters.
// apiEndpoint returns a URL that refers to the given API slash - prefixed // endpoint path and query parameters .
func (st *state) apiEndpoint(path, query string) (*url.URL, error) {
	path, err := apiPath(st.modelTag, path)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &url.URL{
		Scheme:   st.serverScheme,
		Host:     st.Addr(),
		Path:     path,
		RawQuery: query,
	}, nil
}
func ( st * state ) apiEndpoint ( path , query string ) ( * url . URL , error ) { path , err := apiPath ( st . modelTag , path ) if err != nil { return nil , errors . Trace ( err ) } return & url . URL { Scheme : st . serverScheme , Host : st . Addr ( ) , Path : path , RawQuery : query , } , nil }
apiEndpoint returns a URL that refers to the given API slash-prefixed
endpoint path and query parameters.
apiEndpoint returns a URL that refers to the given API slash - prefixed endpoint path and query parameters .