// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.actor.getProfiles

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	ActorGetProfilesNSID = "org.tangled.actor.getProfiles"
)

// ActorGetProfiles_Output is the output of a org.tangled.actor.getProfiles call.
type ActorGetProfiles_Output struct {
	Items []*ActorGetProfiles_RecordView `json:"items" cborgen:"items"`
}

// ActorGetProfiles_RecordView is a "recordView" in the org.tangled.actor.getProfiles schema.
type ActorGetProfiles_RecordView struct {
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	Uri string  `json:"uri" cborgen:"uri"`
	// value: Embedded sh.tangled.actor.profile record.
	Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}

// ActorGetProfiles calls the XRPC method "org.tangled.actor.getProfiles".
//
// actors: AT-URIs of the sh.tangled.actor.profile records to fetch. At most 50 per request.
func ActorGetProfiles(ctx context.Context, c util.LexClient, actors []string) (*ActorGetProfiles_Output, error) {
	var out ActorGetProfiles_Output

	params := map[string]interface{}{}
	params["actors"] = actors
	if err := c.LexDo(ctx, util.Query, "", "org.tangled.actor.getProfiles", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
