Files
search-go/task_documents.go
zeekayandHanzo Dev f62ee2198f Go 1.27.1, and the code it can say more simply
Modules declare go 1.27.1 and the build images follow. go fix applied the
modernizers, and the test and example pointer helpers went once new(expr)
could say them; omitzero is not applied, since it changes what the JSON says.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-16 19:12:06 -07:00

27 lines
764 B
Go

package meilisearch
import (
"context"
"net/http"
"strconv"
)
func (m *meilisearch) GetTaskDocuments(taskUID int64, dst any) error {
return m.GetTaskDocumentsWithContext(context.Background(), taskUID, dst)
}
func (m *meilisearch) GetTaskDocumentsWithContext(ctx context.Context, taskUID int64, dst any) error {
req := &internalRequest{
endpoint: "/tasks/" + strconv.FormatInt(taskUID, 10) + "/documents",
method: http.MethodGet,
withRequest: nil,
withResponse: dst,
withQueryParams: nil,
withResponseEncoding: true,
acceptedStatusCodes: []int{http.StatusOK},
acceptedContentType: contentTypeNDJSON,
functionName: "GetTaskDocuments",
}
return m.client.executeRequest(ctx, req)
}