// Views returns the views in the given field.
Views returns the views in the given field.
// Views returns the views in the given field .
func (api *API) Views(ctx context.Context, indexName string, fieldName string) ([]*view, error) {
	span, _ := tracing.StartSpanFromContext(ctx, "API.Views")
	defer span.Finish()
	if err := api.validate(apiViews); err != nil {
		return nil, errors.Wrap(err, "validating api method")
	}
	f := api.holder.Field(indexName, fieldName)
	if f == nil {
		return nil, ErrFieldNotFound
	}
	views := f.views()
	return views, nil
}
func ( api * API ) Views ( ctx context . Context , indexName string , fieldName string ) ( [ ] * view , error ) { span , _ := tracing . StartSpanFromContext ( ctx , " " ) defer span . Finish ( ) if err := api . validate ( apiViews ) ; err != nil { return nil , errors . Wrap ( err , " " ) } f := api . holder . Field ( indexName , fieldName ) if f == nil { return nil , ErrFieldNotFound } views := f . views ( ) return views , nil }
Views returns the views in the given field.
Views returns the views in the given field .
// Retrieve views. // Fetch views.