// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. // Lexicon schema: tools.ozone.report.getAssignments package ozone import ( "context" lexutil "github.com/bluesky-social/indigo/lex/util" ) // ReportGetAssignments_Output is the output of a tools.ozone.report.getAssignments call. type ReportGetAssignments_Output struct { Assignments []*ReportDefs_AssignmentView `json:"assignments" cborgen:"assignments"` Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` } // ReportGetAssignments calls the XRPC method "tools.ozone.report.getAssignments". // // dids: If specified, returns assignments for these moderators only. // onlyActive: When true, only returns active assignments. // reportIds: If specified, returns assignments for these reports only. func ReportGetAssignments(ctx context.Context, c lexutil.LexClient, cursor string, dids []string, limit int64, onlyActive bool, reportIds []int64) (*ReportGetAssignments_Output, error) { var out ReportGetAssignments_Output params := map[string]interface{}{} if cursor != "" { params["cursor"] = cursor } if len(dids) != 0 { params["dids"] = dids } if limit != 0 { params["limit"] = limit } if onlyActive { params["onlyActive"] = onlyActive } if len(reportIds) != 0 { params["reportIds"] = reportIds } if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getAssignments", params, nil, &out); err != nil { return nil, err } return &out, nil }