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

package bsky

// schema: app.bsky.graph.getKnownFollowers

import (
	"context"

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

// GraphGetKnownFollowers_Output is the output of a app.bsky.graph.getKnownFollowers call.
type GraphGetKnownFollowers_Output struct {
	Cursor    *string                  `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	Followers []*ActorDefs_ProfileView `json:"followers" cborgen:"followers"`
	Subject   *ActorDefs_ProfileView   `json:"subject" cborgen:"subject"`
}

// GraphGetKnownFollowers calls the XRPC method "app.bsky.graph.getKnownFollowers".
func GraphGetKnownFollowers(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetKnownFollowers_Output, error) {
	var out GraphGetKnownFollowers_Output

	params := map[string]interface{}{}
	params["actor"] = actor
	if cursor != "" {
		params["cursor"] = cursor
	}
	if limit != 0 {
		params["limit"] = limit
	}
	if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getKnownFollowers", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
