GetPermanodesWithAttr searches for permanodes that match the given search request. The Fuzzy option in the request must not be set, and the Attribute option must be set. Only indexed attributes may be queried.
(ctx context.Context, req *search.WithAttrRequest)
| 702 | // must be set. |
| 703 | // Only indexed attributes may be queried. |
| 704 | func (c *Client) GetPermanodesWithAttr(ctx context.Context, req *search.WithAttrRequest) (*search.WithAttrResponse, error) { |
| 705 | sr, err := c.SearchRoot() |
| 706 | if err != nil { |
| 707 | return nil, err |
| 708 | } |
| 709 | url := sr + req.URLSuffix() |
| 710 | hreq := c.newRequest(ctx, "GET", url) |
| 711 | hres, err := c.expect2XX(hreq) |
| 712 | if err != nil { |
| 713 | return nil, err |
| 714 | } |
| 715 | res := new(search.WithAttrResponse) |
| 716 | if err := httputil.DecodeJSON(hres, res); err != nil { |
| 717 | return nil, err |
| 718 | } |
| 719 | if err := res.Err(); err != nil { |
| 720 | return nil, err |
| 721 | } |
| 722 | return res, nil |
| 723 | } |
| 724 | |
| 725 | func (c *Client) Describe(ctx context.Context, req *search.DescribeRequest) (*search.DescribeResponse, error) { |
| 726 | sr, err := c.SearchRoot() |
no test coverage detected