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

package atproto

// schema: com.atproto.sync.listBlobs

import (
	"context"

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

// SyncListBlobs_Output is the output of a com.atproto.sync.listBlobs call.
type SyncListBlobs_Output struct {
	Cids   []string `json:"cids" cborgen:"cids"`
	Cursor *string  `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
}

// SyncListBlobs calls the XRPC method "com.atproto.sync.listBlobs".
//
// did: The DID of the repo.
// since: Optional revision of the repo to list blobs since.
func SyncListBlobs(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) {
	var out SyncListBlobs_Output

	params := map[string]interface{}{
		"cursor": cursor,
		"did":    did,
		"limit":  limit,
		"since":  since,
	}
	if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
