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

package bsky

// schema: app.bsky.graph.getBlocks

import (
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

// GraphGetBlocks_Output is the output of a app.bsky.graph.getBlocks call.
type GraphGetBlocks_Output struct {
	Blocks []*ActorDefs_ProfileView `json:"blocks" cborgen:"blocks"`
	Cursor *string                  `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
}

// GraphGetBlocks calls the XRPC method "app.bsky.graph.getBlocks".
func GraphGetBlocks(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetBlocks_Output, error) {
	var out GraphGetBlocks_Output

	params := map[string]interface{}{
		"cursor": cursor,
		"limit":  limit,
	}
	if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getBlocks", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
