// 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/lex/util"
)

// 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 util.LexClient, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) {
	var out SyncListBlobs_Output

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

	return &out, nil
}
