func (c *Client) ResolveCharm(ref *charm.URL) (*charm.URL, error) {
	args := params.ResolveCharms{References: []string{ref.String()}}
	result := new(params.ResolveCharmResults)
	if err := c.facade.FacadeCall("ResolveCharms", args, result); err != nil {
		return nil, err
	}
	if len(result.URLs) == 0 {
		return nil, errors.New("unexpected empty response")
	}
	urlInfo := result.URLs[0]
	if urlInfo.Error != "" {
		return nil, errors.New(urlInfo.Error)
	}
	url, err := charm.ParseURL(urlInfo.URL)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return url, nil
}
// ResolveCharm resolves the best available charm URLs with series, for charm
// locations without a series specified.
ResolveCharm resolves the best available charm URLs with series, for charm
locations without a series specified.
// ResolveCharm resolves the best available charm URLs with series for charm // locations without a series specified .
func (c *Client) ResolveCharm(ref *charm.URL) (*charm.URL, error) {
	args := params.ResolveCharms{References: []string{ref.String()}}
	result := new(params.ResolveCharmResults)
	if err := c.facade.FacadeCall("ResolveCharms", args, result); err != nil {
		return nil, err
	}
	if len(result.URLs) == 0 {
		return nil, errors.New("unexpected empty response")
	}
	urlInfo := result.URLs[0]
	if urlInfo.Error != "" {
		return nil, errors.New(urlInfo.Error)
	}
	url, err := charm.ParseURL(urlInfo.URL)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return url, nil
}
func ( c * Client ) ResolveCharm ( ref * charm . URL ) ( * charm . URL , error ) { args := params . ResolveCharms { References : [ ] string { ref . String ( ) } } result := new ( params . ResolveCharmResults ) if err := c . facade . FacadeCall ( " " , args , result ) ; err != nil { return nil , err } if len ( result . URLs ) == 0 { return nil , errors . New ( " " ) } urlInfo := result . URLs [ 0 ] if urlInfo . Error != " " { return nil , errors . New ( urlInfo . Error ) } url , err := charm . ParseURL ( urlInfo . URL ) if err != nil { return nil , errors . Trace ( err ) } return url , nil }
ResolveCharm resolves the best available charm URLs with series, for charm
locations without a series specified.
ResolveCharm resolves the best available charm URLs with series for charm locations without a series specified .