GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP.
(ctx context.Context, req *search.RecentRequest)
| 677 | |
| 678 | // GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP. |
| 679 | func (c *Client) GetRecentPermanodes(ctx context.Context, req *search.RecentRequest) (*search.RecentResponse, error) { |
| 680 | sr, err := c.SearchRoot() |
| 681 | if err != nil { |
| 682 | return nil, err |
| 683 | } |
| 684 | url := sr + req.URLSuffix() |
| 685 | hreq := c.newRequest(ctx, "GET", url) |
| 686 | hres, err := c.expect2XX(hreq) |
| 687 | if err != nil { |
| 688 | return nil, err |
| 689 | } |
| 690 | res := new(search.RecentResponse) |
| 691 | if err := httputil.DecodeJSON(hres, res); err != nil { |
| 692 | return nil, err |
| 693 | } |
| 694 | if err := res.Err(); err != nil { |
| 695 | return nil, err |
| 696 | } |
| 697 | return res, nil |
| 698 | } |
| 699 | |
| 700 | // GetPermanodesWithAttr searches for permanodes that match the given search request. |
| 701 | // The Fuzzy option in the request must not be set, and the Attribute option |
nothing calls this directly
no test coverage detected