func (c *ResourcesClient) ListResourceRevisions(ctx context.Context, charm, resource string) ([]transport.ResourceRevision, error) {
	c.logger.Tracef("ListResourceRevisions(%s, %s)", charm, resource)
	var resp transport.ResourcesResponse
	path, err := c.path.Join(charm, resource, "revisions")
	if err != nil {
		return nil, errors.Trace(err)
	}
	restResp, err := c.client.Get(ctx, path, &resp)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if restResp.StatusCode == http.StatusNotFound {
		return nil, errors.NotFoundf("%q for %q", charm, resource)
	}
	if c.logger.IsTraceEnabled() {
		c.logger.Tracef("ListResourceRevisions(%s, %s) unmarshalled: %s", charm, resource, pretty.Sprint(resp.Revisions))
	}
	return resp.Revisions, nil
}
// ListResourceRevisions returns a slice of resource revisions for the provided
// resource of the given charm.
ListResourceRevisions returns a slice of resource revisions for the provided
resource of the given charm.
// ListResourceRevisions returns a slice of resource revisions for the provided // resource of the given charm .
func (c *ResourcesClient) ListResourceRevisions(ctx context.Context, charm, resource string) ([]transport.ResourceRevision, error) {
	c.logger.Tracef("ListResourceRevisions(%s, %s)", charm, resource)
	var resp transport.ResourcesResponse
	path, err := c.path.Join(charm, resource, "revisions")
	if err != nil {
		return nil, errors.Trace(err)
	}
	restResp, err := c.client.Get(ctx, path, &resp)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if restResp.StatusCode == http.StatusNotFound {
		return nil, errors.NotFoundf("%q for %q", charm, resource)
	}
	if c.logger.IsTraceEnabled() {
		c.logger.Tracef("ListResourceRevisions(%s, %s) unmarshalled: %s", charm, resource, pretty.Sprint(resp.Revisions))
	}
	return resp.Revisions, nil
}
func ( c * ResourcesClient ) ListResourceRevisions ( ctx context . Context , charm , resource string ) ( [ ] transport . ResourceRevision , error ) { c . logger . Tracef ( " " , charm , resource ) var resp transport . ResourcesResponse path , err := c . path . Join ( charm , resource , " " ) if err != nil { return nil , errors . Trace ( err ) } restResp , err := c . client . Get ( ctx , path , & resp ) if err != nil { return nil , errors . Trace ( err ) } if restResp . StatusCode == http . StatusNotFound { return nil , errors . NotFoundf ( " " , charm , resource ) } if c . logger . IsTraceEnabled ( ) { c . logger . Tracef ( " " , charm , resource , pretty . Sprint ( resp . Revisions ) ) } return resp . Revisions , nil }
ListResourceRevisions returns a slice of resource revisions for the provided
resource of the given charm.
ListResourceRevisions returns a slice of resource revisions for the provided resource of the given charm .