+3
-1
api/agnostic/repogetRecord.go
+3
-1
api/agnostic/repogetRecord.go
···
29
29
var out RepoGetRecord_Output
30
30
31
31
params := map[string]interface{}{
32
-
"cid": cid,
33
32
"collection": collection,
34
33
"repo": repo,
35
34
"rkey": rkey,
35
+
}
36
+
if cid != "" {
37
+
params["cid"] = cid
36
38
}
37
39
if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil {
38
40
return nil, err
+10
-3
api/agnostic/repolistRecords.go
+10
-3
api/agnostic/repolistRecords.go
···
36
36
37
37
params := map[string]interface{}{
38
38
"collection": collection,
39
-
"cursor": cursor,
40
-
"limit": limit,
41
39
"repo": repo,
42
-
"reverse": reverse,
40
+
}
41
+
if cursor != "" {
42
+
params["cursor"] = cursor
43
+
}
44
+
if limit != 0 {
45
+
params["limit"] = limit
43
46
}
47
+
if reverse != false {
48
+
params["reverse"] = reverse
49
+
}
50
+
44
51
if err := c.LexDo(ctx, util.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil {
45
52
return nil, err
46
53
}
+2
-3
api/atproto/admingetAccountInfo.go
+2
-3
api/atproto/admingetAccountInfo.go
···
14
14
func AdminGetAccountInfo(ctx context.Context, c *xrpc.Client, did string) (*AdminDefs_AccountView, error) {
15
15
var out AdminDefs_AccountView
16
16
17
-
params := map[string]interface{}{
18
-
"did": did,
19
-
}
17
+
params := map[string]interface{}{}
18
+
params["did"] = did
20
19
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getAccountInfo", params, nil, &out); err != nil {
21
20
return nil, err
22
21
}
+2
-3
api/atproto/admingetAccountInfos.go
+2
-3
api/atproto/admingetAccountInfos.go
···
19
19
func AdminGetAccountInfos(ctx context.Context, c *xrpc.Client, dids []string) (*AdminGetAccountInfos_Output, error) {
20
20
var out AdminGetAccountInfos_Output
21
21
22
-
params := map[string]interface{}{
23
-
"dids": dids,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["dids"] = dids
25
24
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getAccountInfos", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+9
-4
api/atproto/admingetInviteCodes.go
+9
-4
api/atproto/admingetInviteCodes.go
···
20
20
func AdminGetInviteCodes(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sort string) (*AdminGetInviteCodes_Output, error) {
21
21
var out AdminGetInviteCodes_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
26
-
"sort": sort,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
29
+
}
30
+
if sort != "" {
31
+
params["sort"] = sort
27
32
}
28
33
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getInviteCodes", params, nil, &out); err != nil {
29
34
return nil, err
+9
-4
api/atproto/admingetSubjectStatus.go
+9
-4
api/atproto/admingetSubjectStatus.go
···
67
67
func AdminGetSubjectStatus(ctx context.Context, c *xrpc.Client, blob string, did string, uri string) (*AdminGetSubjectStatus_Output, error) {
68
68
var out AdminGetSubjectStatus_Output
69
69
70
-
params := map[string]interface{}{
71
-
"blob": blob,
72
-
"did": did,
73
-
"uri": uri,
70
+
params := map[string]interface{}{}
71
+
if blob != "" {
72
+
params["blob"] = blob
73
+
}
74
+
if did != "" {
75
+
params["did"] = did
76
+
}
77
+
if uri != "" {
78
+
params["uri"] = uri
74
79
}
75
80
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getSubjectStatus", params, nil, &out); err != nil {
76
81
return nil, err
+9
-4
api/atproto/adminsearchAccounts.go
+9
-4
api/atproto/adminsearchAccounts.go
···
20
20
func AdminSearchAccounts(ctx context.Context, c *xrpc.Client, cursor string, email string, limit int64) (*AdminSearchAccounts_Output, error) {
21
21
var out AdminSearchAccounts_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"email": email,
26
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if email != "" {
28
+
params["email"] = email
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
27
32
}
28
33
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.searchAccounts", params, nil, &out); err != nil {
29
34
return nil, err
+2
-3
api/atproto/identityresolveDid.go
+2
-3
api/atproto/identityresolveDid.go
···
22
22
func IdentityResolveDid(ctx context.Context, c *xrpc.Client, did string) (*IdentityResolveDid_Output, error) {
23
23
var out IdentityResolveDid_Output
24
24
25
-
params := map[string]interface{}{
26
-
"did": did,
27
-
}
25
+
params := map[string]interface{}{}
26
+
params["did"] = did
28
27
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveDid", params, nil, &out); err != nil {
29
28
return nil, err
30
29
}
+2
-3
api/atproto/identityresolveHandle.go
+2
-3
api/atproto/identityresolveHandle.go
···
21
21
func IdentityResolveHandle(ctx context.Context, c *xrpc.Client, handle string) (*IdentityResolveHandle_Output, error) {
22
22
var out IdentityResolveHandle_Output
23
23
24
-
params := map[string]interface{}{
25
-
"handle": handle,
26
-
}
24
+
params := map[string]interface{}{}
25
+
params["handle"] = handle
27
26
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveHandle", params, nil, &out); err != nil {
28
27
return nil, err
29
28
}
+2
-3
api/atproto/identityresolveIdentity.go
+2
-3
api/atproto/identityresolveIdentity.go
···
16
16
func IdentityResolveIdentity(ctx context.Context, c *xrpc.Client, identifier string) (*IdentityDefs_IdentityInfo, error) {
17
17
var out IdentityDefs_IdentityInfo
18
18
19
-
params := map[string]interface{}{
20
-
"identifier": identifier,
21
-
}
19
+
params := map[string]interface{}{}
20
+
params["identifier"] = identifier
22
21
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveIdentity", params, nil, &out); err != nil {
23
22
return nil, err
24
23
}
+10
-5
api/atproto/labelqueryLabels.go
+10
-5
api/atproto/labelqueryLabels.go
···
23
23
func LabelQueryLabels(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sources []string, uriPatterns []string) (*LabelQueryLabels_Output, error) {
24
24
var out LabelQueryLabels_Output
25
25
26
-
params := map[string]interface{}{
27
-
"cursor": cursor,
28
-
"limit": limit,
29
-
"sources": sources,
30
-
"uriPatterns": uriPatterns,
26
+
params := map[string]interface{}{}
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
32
+
}
33
+
if len(sources) != 0 {
34
+
params["sources"] = sources
31
35
}
36
+
params["uriPatterns"] = uriPatterns
32
37
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.label.queryLabels", params, nil, &out); err != nil {
33
38
return nil, err
34
39
}
+2
-3
api/atproto/repodescribeRepo.go
+2
-3
api/atproto/repodescribeRepo.go
···
28
28
func RepoDescribeRepo(ctx context.Context, c *xrpc.Client, repo string) (*RepoDescribeRepo_Output, error) {
29
29
var out RepoDescribeRepo_Output
30
30
31
-
params := map[string]interface{}{
32
-
"repo": repo,
33
-
}
31
+
params := map[string]interface{}{}
32
+
params["repo"] = repo
34
33
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil {
35
34
return nil, err
36
35
}
+6
-5
api/atproto/repogetRecord.go
+6
-5
api/atproto/repogetRecord.go
···
27
27
func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) {
28
28
var out RepoGetRecord_Output
29
29
30
-
params := map[string]interface{}{
31
-
"cid": cid,
32
-
"collection": collection,
33
-
"repo": repo,
34
-
"rkey": rkey,
30
+
params := map[string]interface{}{}
31
+
if cid != "" {
32
+
params["cid"] = cid
35
33
}
34
+
params["collection"] = collection
35
+
params["repo"] = repo
36
+
params["rkey"] = rkey
36
37
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil {
37
38
return nil, err
38
39
}
+6
-3
api/atproto/repolistMissingBlobs.go
+6
-3
api/atproto/repolistMissingBlobs.go
···
26
26
func RepoListMissingBlobs(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*RepoListMissingBlobs_Output, error) {
27
27
var out RepoListMissingBlobs_Output
28
28
29
-
params := map[string]interface{}{
30
-
"cursor": cursor,
31
-
"limit": limit,
29
+
params := map[string]interface{}{}
30
+
if cursor != "" {
31
+
params["cursor"] = cursor
32
+
}
33
+
if limit != 0 {
34
+
params["limit"] = limit
32
35
}
33
36
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listMissingBlobs", params, nil, &out); err != nil {
34
37
return nil, err
+11
-6
api/atproto/repolistRecords.go
+11
-6
api/atproto/repolistRecords.go
···
33
33
func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) {
34
34
var out RepoListRecords_Output
35
35
36
-
params := map[string]interface{}{
37
-
"collection": collection,
38
-
"cursor": cursor,
39
-
"limit": limit,
40
-
"repo": repo,
41
-
"reverse": reverse,
36
+
params := map[string]interface{}{}
37
+
params["collection"] = collection
38
+
if cursor != "" {
39
+
params["cursor"] = cursor
40
+
}
41
+
if limit != 0 {
42
+
params["limit"] = limit
43
+
}
44
+
params["repo"] = repo
45
+
if reverse {
46
+
params["reverse"] = reverse
42
47
}
43
48
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil {
44
49
return nil, err
+6
-3
api/atproto/servergetAccountInviteCodes.go
+6
-3
api/atproto/servergetAccountInviteCodes.go
···
21
21
func ServerGetAccountInviteCodes(ctx context.Context, c *xrpc.Client, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) {
22
22
var out ServerGetAccountInviteCodes_Output
23
23
24
-
params := map[string]interface{}{
25
-
"createAvailable": createAvailable,
26
-
"includeUsed": includeUsed,
24
+
params := map[string]interface{}{}
25
+
if createAvailable {
26
+
params["createAvailable"] = createAvailable
27
+
}
28
+
if includeUsed {
29
+
params["includeUsed"] = includeUsed
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil {
29
32
return nil, err
+7
-4
api/atproto/servergetServiceAuth.go
+7
-4
api/atproto/servergetServiceAuth.go
···
23
23
func ServerGetServiceAuth(ctx context.Context, c *xrpc.Client, aud string, exp int64, lxm string) (*ServerGetServiceAuth_Output, error) {
24
24
var out ServerGetServiceAuth_Output
25
25
26
-
params := map[string]interface{}{
27
-
"aud": aud,
28
-
"exp": exp,
29
-
"lxm": lxm,
26
+
params := map[string]interface{}{}
27
+
params["aud"] = aud
28
+
if exp != 0 {
29
+
params["exp"] = exp
30
+
}
31
+
if lxm != "" {
32
+
params["lxm"] = lxm
30
33
}
31
34
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getServiceAuth", params, nil, &out); err != nil {
32
35
return nil, err
+3
-4
api/atproto/syncgetBlob.go
+3
-4
api/atproto/syncgetBlob.go
···
18
18
func SyncGetBlob(ctx context.Context, c *xrpc.Client, cid string, did string) ([]byte, error) {
19
19
buf := new(bytes.Buffer)
20
20
21
-
params := map[string]interface{}{
22
-
"cid": cid,
23
-
"did": did,
24
-
}
21
+
params := map[string]interface{}{}
22
+
params["cid"] = cid
23
+
params["did"] = did
25
24
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getBlob", params, nil, buf); err != nil {
26
25
return nil, err
27
26
}
+3
-4
api/atproto/syncgetBlocks.go
+3
-4
api/atproto/syncgetBlocks.go
···
17
17
func SyncGetBlocks(ctx context.Context, c *xrpc.Client, cids []string, did string) ([]byte, error) {
18
18
buf := new(bytes.Buffer)
19
19
20
-
params := map[string]interface{}{
21
-
"cids": cids,
22
-
"did": did,
23
-
}
20
+
params := map[string]interface{}{}
21
+
params["cids"] = cids
22
+
params["did"] = did
24
23
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getBlocks", params, nil, buf); err != nil {
25
24
return nil, err
26
25
}
+2
-3
api/atproto/syncgetCheckout.go
+2
-3
api/atproto/syncgetCheckout.go
···
17
17
func SyncGetCheckout(ctx context.Context, c *xrpc.Client, did string) ([]byte, error) {
18
18
buf := new(bytes.Buffer)
19
19
20
-
params := map[string]interface{}{
21
-
"did": did,
22
-
}
20
+
params := map[string]interface{}{}
21
+
params["did"] = did
23
22
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil {
24
23
return nil, err
25
24
}
+2
-3
api/atproto/syncgetHead.go
+2
-3
api/atproto/syncgetHead.go
···
21
21
func SyncGetHead(ctx context.Context, c *xrpc.Client, did string) (*SyncGetHead_Output, error) {
22
22
var out SyncGetHead_Output
23
23
24
-
params := map[string]interface{}{
25
-
"did": did,
26
-
}
24
+
params := map[string]interface{}{}
25
+
params["did"] = did
27
26
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil {
28
27
return nil, err
29
28
}
+2
-3
api/atproto/syncgetHostStatus.go
+2
-3
api/atproto/syncgetHostStatus.go
···
26
26
func SyncGetHostStatus(ctx context.Context, c *xrpc.Client, hostname string) (*SyncGetHostStatus_Output, error) {
27
27
var out SyncGetHostStatus_Output
28
28
29
-
params := map[string]interface{}{
30
-
"hostname": hostname,
31
-
}
29
+
params := map[string]interface{}{}
30
+
params["hostname"] = hostname
32
31
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil {
33
32
return nil, err
34
33
}
+2
-3
api/atproto/syncgetLatestCommit.go
+2
-3
api/atproto/syncgetLatestCommit.go
···
22
22
func SyncGetLatestCommit(ctx context.Context, c *xrpc.Client, did string) (*SyncGetLatestCommit_Output, error) {
23
23
var out SyncGetLatestCommit_Output
24
24
25
-
params := map[string]interface{}{
26
-
"did": did,
27
-
}
25
+
params := map[string]interface{}{}
26
+
params["did"] = did
28
27
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil {
29
28
return nil, err
30
29
}
+4
-5
api/atproto/syncgetRecord.go
+4
-5
api/atproto/syncgetRecord.go
···
18
18
func SyncGetRecord(ctx context.Context, c *xrpc.Client, collection string, did string, rkey string) ([]byte, error) {
19
19
buf := new(bytes.Buffer)
20
20
21
-
params := map[string]interface{}{
22
-
"collection": collection,
23
-
"did": did,
24
-
"rkey": rkey,
25
-
}
21
+
params := map[string]interface{}{}
22
+
params["collection"] = collection
23
+
params["did"] = did
24
+
params["rkey"] = rkey
26
25
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil {
27
26
return nil, err
28
27
}
+4
-3
api/atproto/syncgetRepo.go
+4
-3
api/atproto/syncgetRepo.go
···
18
18
func SyncGetRepo(ctx context.Context, c *xrpc.Client, did string, since string) ([]byte, error) {
19
19
buf := new(bytes.Buffer)
20
20
21
-
params := map[string]interface{}{
22
-
"did": did,
23
-
"since": since,
21
+
params := map[string]interface{}{}
22
+
params["did"] = did
23
+
if since != "" {
24
+
params["since"] = since
24
25
}
25
26
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil {
26
27
return nil, err
+2
-3
api/atproto/syncgetRepoStatus.go
+2
-3
api/atproto/syncgetRepoStatus.go
···
26
26
func SyncGetRepoStatus(ctx context.Context, c *xrpc.Client, did string) (*SyncGetRepoStatus_Output, error) {
27
27
var out SyncGetRepoStatus_Output
28
28
29
-
params := map[string]interface{}{
30
-
"did": did,
31
-
}
29
+
params := map[string]interface{}{}
30
+
params["did"] = did
32
31
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepoStatus", params, nil, &out); err != nil {
33
32
return nil, err
34
33
}
+10
-5
api/atproto/synclistBlobs.go
+10
-5
api/atproto/synclistBlobs.go
···
23
23
func SyncListBlobs(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) {
24
24
var out SyncListBlobs_Output
25
25
26
-
params := map[string]interface{}{
27
-
"cursor": cursor,
28
-
"did": did,
29
-
"limit": limit,
30
-
"since": since,
26
+
params := map[string]interface{}{}
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
params["did"] = did
31
+
if limit != 0 {
32
+
params["limit"] = limit
33
+
}
34
+
if since != "" {
35
+
params["since"] = since
31
36
}
32
37
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil {
33
38
return nil, err
+6
-3
api/atproto/synclistHosts.go
+6
-3
api/atproto/synclistHosts.go
···
31
31
func SyncListHosts(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*SyncListHosts_Output, error) {
32
32
var out SyncListHosts_Output
33
33
34
-
params := map[string]interface{}{
35
-
"cursor": cursor,
36
-
"limit": limit,
34
+
params := map[string]interface{}{}
35
+
if cursor != "" {
36
+
params["cursor"] = cursor
37
+
}
38
+
if limit != 0 {
39
+
params["limit"] = limit
37
40
}
38
41
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listHosts", params, nil, &out); err != nil {
39
42
return nil, err
+6
-3
api/atproto/synclistRepos.go
+6
-3
api/atproto/synclistRepos.go
···
31
31
func SyncListRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*SyncListRepos_Output, error) {
32
32
var out SyncListRepos_Output
33
33
34
-
params := map[string]interface{}{
35
-
"cursor": cursor,
36
-
"limit": limit,
34
+
params := map[string]interface{}{}
35
+
if cursor != "" {
36
+
params["cursor"] = cursor
37
+
}
38
+
if limit != 0 {
39
+
params["limit"] = limit
37
40
}
38
41
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listRepos", params, nil, &out); err != nil {
39
42
return nil, err
+7
-4
api/atproto/synclistReposByCollection.go
+7
-4
api/atproto/synclistReposByCollection.go
···
27
27
func SyncListReposByCollection(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64) (*SyncListReposByCollection_Output, error) {
28
28
var out SyncListReposByCollection_Output
29
29
30
-
params := map[string]interface{}{
31
-
"collection": collection,
32
-
"cursor": cursor,
33
-
"limit": limit,
30
+
params := map[string]interface{}{}
31
+
params["collection"] = collection
32
+
if cursor != "" {
33
+
params["cursor"] = cursor
34
+
}
35
+
if limit != 0 {
36
+
params["limit"] = limit
34
37
}
35
38
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listReposByCollection", params, nil, &out); err != nil {
36
39
return nil, err
+6
-3
api/atproto/tempfetchLabels.go
+6
-3
api/atproto/tempfetchLabels.go
···
19
19
func TempFetchLabels(ctx context.Context, c *xrpc.Client, limit int64, since int64) (*TempFetchLabels_Output, error) {
20
20
var out TempFetchLabels_Output
21
21
22
-
params := map[string]interface{}{
23
-
"limit": limit,
24
-
"since": since,
22
+
params := map[string]interface{}{}
23
+
if limit != 0 {
24
+
params["limit"] = limit
25
+
}
26
+
if since != 0 {
27
+
params["since"] = since
25
28
}
26
29
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.temp.fetchLabels", params, nil, &out); err != nil {
27
30
return nil, err
+2
-3
api/bsky/actorgetProfile.go
+2
-3
api/bsky/actorgetProfile.go
···
16
16
func ActorGetProfile(ctx context.Context, c *xrpc.Client, actor string) (*ActorDefs_ProfileViewDetailed, error) {
17
17
var out ActorDefs_ProfileViewDetailed
18
18
19
-
params := map[string]interface{}{
20
-
"actor": actor,
21
-
}
19
+
params := map[string]interface{}{}
20
+
params["actor"] = actor
22
21
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getProfile", params, nil, &out); err != nil {
23
22
return nil, err
24
23
}
+2
-3
api/bsky/actorgetProfiles.go
+2
-3
api/bsky/actorgetProfiles.go
···
19
19
func ActorGetProfiles(ctx context.Context, c *xrpc.Client, actors []string) (*ActorGetProfiles_Output, error) {
20
20
var out ActorGetProfiles_Output
21
21
22
-
params := map[string]interface{}{
23
-
"actors": actors,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["actors"] = actors
25
24
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getProfiles", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+6
-3
api/bsky/actorgetSuggestions.go
+6
-3
api/bsky/actorgetSuggestions.go
···
22
22
func ActorGetSuggestions(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*ActorGetSuggestions_Output, error) {
23
23
var out ActorGetSuggestions_Output
24
24
25
-
params := map[string]interface{}{
26
-
"cursor": cursor,
27
-
"limit": limit,
25
+
params := map[string]interface{}{}
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
28
31
}
29
32
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getSuggestions", params, nil, &out); err != nil {
30
33
return nil, err
+12
-5
api/bsky/actorsearchActors.go
+12
-5
api/bsky/actorsearchActors.go
···
23
23
func ActorSearchActors(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ActorSearchActors_Output, error) {
24
24
var out ActorSearchActors_Output
25
25
26
-
params := map[string]interface{}{
27
-
"cursor": cursor,
28
-
"limit": limit,
29
-
"q": q,
30
-
"term": term,
26
+
params := map[string]interface{}{}
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
32
+
}
33
+
if q != "" {
34
+
params["q"] = q
35
+
}
36
+
if term != "" {
37
+
params["term"] = term
31
38
}
32
39
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.searchActors", params, nil, &out); err != nil {
33
40
return nil, err
+9
-4
api/bsky/actorsearchActorsTypeahead.go
+9
-4
api/bsky/actorsearchActorsTypeahead.go
···
22
22
func ActorSearchActorsTypeahead(ctx context.Context, c *xrpc.Client, limit int64, q string, term string) (*ActorSearchActorsTypeahead_Output, error) {
23
23
var out ActorSearchActorsTypeahead_Output
24
24
25
-
params := map[string]interface{}{
26
-
"limit": limit,
27
-
"q": q,
28
-
"term": term,
25
+
params := map[string]interface{}{}
26
+
if limit != 0 {
27
+
params["limit"] = limit
28
+
}
29
+
if q != "" {
30
+
params["q"] = q
31
+
}
32
+
if term != "" {
33
+
params["term"] = term
29
34
}
30
35
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.searchActorsTypeahead", params, nil, &out); err != nil {
31
36
return nil, err
+7
-4
api/bsky/feedgetActorFeeds.go
+7
-4
api/bsky/feedgetActorFeeds.go
···
20
20
func FeedGetActorFeeds(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*FeedGetActorFeeds_Output, error) {
21
21
var out FeedGetActorFeeds_Output
22
22
23
-
params := map[string]interface{}{
24
-
"actor": actor,
25
-
"cursor": cursor,
26
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
params["actor"] = actor
25
+
if cursor != "" {
26
+
params["cursor"] = cursor
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getActorFeeds", params, nil, &out); err != nil {
29
32
return nil, err
+7
-4
api/bsky/feedgetActorLikes.go
+7
-4
api/bsky/feedgetActorLikes.go
···
20
20
func FeedGetActorLikes(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*FeedGetActorLikes_Output, error) {
21
21
var out FeedGetActorLikes_Output
22
22
23
-
params := map[string]interface{}{
24
-
"actor": actor,
25
-
"cursor": cursor,
26
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
params["actor"] = actor
25
+
if cursor != "" {
26
+
params["cursor"] = cursor
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getActorLikes", params, nil, &out); err != nil {
29
32
return nil, err
+13
-6
api/bsky/feedgetAuthorFeed.go
+13
-6
api/bsky/feedgetAuthorFeed.go
···
22
22
func FeedGetAuthorFeed(ctx context.Context, c *xrpc.Client, actor string, cursor string, filter string, includePins bool, limit int64) (*FeedGetAuthorFeed_Output, error) {
23
23
var out FeedGetAuthorFeed_Output
24
24
25
-
params := map[string]interface{}{
26
-
"actor": actor,
27
-
"cursor": cursor,
28
-
"filter": filter,
29
-
"includePins": includePins,
30
-
"limit": limit,
25
+
params := map[string]interface{}{}
26
+
params["actor"] = actor
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if filter != "" {
31
+
params["filter"] = filter
32
+
}
33
+
if includePins {
34
+
params["includePins"] = includePins
35
+
}
36
+
if limit != 0 {
37
+
params["limit"] = limit
31
38
}
32
39
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getAuthorFeed", params, nil, &out); err != nil {
33
40
return nil, err
+7
-4
api/bsky/feedgetFeed.go
+7
-4
api/bsky/feedgetFeed.go
···
20
20
func FeedGetFeed(ctx context.Context, c *xrpc.Client, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) {
21
21
var out FeedGetFeed_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"feed": feed,
26
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
params["feed"] = feed
28
+
if limit != 0 {
29
+
params["limit"] = limit
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil {
29
32
return nil, err
+2
-3
api/bsky/feedgetFeedGenerator.go
+2
-3
api/bsky/feedgetFeedGenerator.go
···
25
25
func FeedGetFeedGenerator(ctx context.Context, c *xrpc.Client, feed string) (*FeedGetFeedGenerator_Output, error) {
26
26
var out FeedGetFeedGenerator_Output
27
27
28
-
params := map[string]interface{}{
29
-
"feed": feed,
30
-
}
28
+
params := map[string]interface{}{}
29
+
params["feed"] = feed
31
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedGenerator", params, nil, &out); err != nil {
32
31
return nil, err
33
32
}
+2
-3
api/bsky/feedgetFeedGenerators.go
+2
-3
api/bsky/feedgetFeedGenerators.go
···
19
19
func FeedGetFeedGenerators(ctx context.Context, c *xrpc.Client, feeds []string) (*FeedGetFeedGenerators_Output, error) {
20
20
var out FeedGetFeedGenerators_Output
21
21
22
-
params := map[string]interface{}{
23
-
"feeds": feeds,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["feeds"] = feeds
25
24
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedGenerators", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+7
-4
api/bsky/feedgetFeedSkeleton.go
+7
-4
api/bsky/feedgetFeedSkeleton.go
···
24
24
func FeedGetFeedSkeleton(ctx context.Context, c *xrpc.Client, cursor string, feed string, limit int64) (*FeedGetFeedSkeleton_Output, error) {
25
25
var out FeedGetFeedSkeleton_Output
26
26
27
-
params := map[string]interface{}{
28
-
"cursor": cursor,
29
-
"feed": feed,
30
-
"limit": limit,
27
+
params := map[string]interface{}{}
28
+
if cursor != "" {
29
+
params["cursor"] = cursor
30
+
}
31
+
params["feed"] = feed
32
+
if limit != 0 {
33
+
params["limit"] = limit
31
34
}
32
35
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedSkeleton", params, nil, &out); err != nil {
33
36
return nil, err
+10
-5
api/bsky/feedgetLikes.go
+10
-5
api/bsky/feedgetLikes.go
···
32
32
func FeedGetLikes(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetLikes_Output, error) {
33
33
var out FeedGetLikes_Output
34
34
35
-
params := map[string]interface{}{
36
-
"cid": cid,
37
-
"cursor": cursor,
38
-
"limit": limit,
39
-
"uri": uri,
35
+
params := map[string]interface{}{}
36
+
if cid != "" {
37
+
params["cid"] = cid
38
+
}
39
+
if cursor != "" {
40
+
params["cursor"] = cursor
41
+
}
42
+
if limit != 0 {
43
+
params["limit"] = limit
40
44
}
45
+
params["uri"] = uri
41
46
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getLikes", params, nil, &out); err != nil {
42
47
return nil, err
43
48
}
+7
-4
api/bsky/feedgetListFeed.go
+7
-4
api/bsky/feedgetListFeed.go
···
22
22
func FeedGetListFeed(ctx context.Context, c *xrpc.Client, cursor string, limit int64, list string) (*FeedGetListFeed_Output, error) {
23
23
var out FeedGetListFeed_Output
24
24
25
-
params := map[string]interface{}{
26
-
"cursor": cursor,
27
-
"limit": limit,
28
-
"list": list,
25
+
params := map[string]interface{}{}
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
29
31
}
32
+
params["list"] = list
30
33
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getListFeed", params, nil, &out); err != nil {
31
34
return nil, err
32
35
}
+7
-4
api/bsky/feedgetPostThread.go
+7
-4
api/bsky/feedgetPostThread.go
···
70
70
func FeedGetPostThread(ctx context.Context, c *xrpc.Client, depth int64, parentHeight int64, uri string) (*FeedGetPostThread_Output, error) {
71
71
var out FeedGetPostThread_Output
72
72
73
-
params := map[string]interface{}{
74
-
"depth": depth,
75
-
"parentHeight": parentHeight,
76
-
"uri": uri,
73
+
params := map[string]interface{}{}
74
+
if depth != 0 {
75
+
params["depth"] = depth
76
+
}
77
+
if parentHeight != 0 {
78
+
params["parentHeight"] = parentHeight
77
79
}
80
+
params["uri"] = uri
78
81
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getPostThread", params, nil, &out); err != nil {
79
82
return nil, err
80
83
}
+2
-3
api/bsky/feedgetPosts.go
+2
-3
api/bsky/feedgetPosts.go
···
21
21
func FeedGetPosts(ctx context.Context, c *xrpc.Client, uris []string) (*FeedGetPosts_Output, error) {
22
22
var out FeedGetPosts_Output
23
23
24
-
params := map[string]interface{}{
25
-
"uris": uris,
26
-
}
24
+
params := map[string]interface{}{}
25
+
params["uris"] = uris
27
26
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getPosts", params, nil, &out); err != nil {
28
27
return nil, err
29
28
}
+10
-5
api/bsky/feedgetQuotes.go
+10
-5
api/bsky/feedgetQuotes.go
···
25
25
func FeedGetQuotes(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetQuotes_Output, error) {
26
26
var out FeedGetQuotes_Output
27
27
28
-
params := map[string]interface{}{
29
-
"cid": cid,
30
-
"cursor": cursor,
31
-
"limit": limit,
32
-
"uri": uri,
28
+
params := map[string]interface{}{}
29
+
if cid != "" {
30
+
params["cid"] = cid
31
+
}
32
+
if cursor != "" {
33
+
params["cursor"] = cursor
34
+
}
35
+
if limit != 0 {
36
+
params["limit"] = limit
33
37
}
38
+
params["uri"] = uri
34
39
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getQuotes", params, nil, &out); err != nil {
35
40
return nil, err
36
41
}
+10
-5
api/bsky/feedgetRepostedBy.go
+10
-5
api/bsky/feedgetRepostedBy.go
···
25
25
func FeedGetRepostedBy(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetRepostedBy_Output, error) {
26
26
var out FeedGetRepostedBy_Output
27
27
28
-
params := map[string]interface{}{
29
-
"cid": cid,
30
-
"cursor": cursor,
31
-
"limit": limit,
32
-
"uri": uri,
28
+
params := map[string]interface{}{}
29
+
if cid != "" {
30
+
params["cid"] = cid
31
+
}
32
+
if cursor != "" {
33
+
params["cursor"] = cursor
34
+
}
35
+
if limit != 0 {
36
+
params["limit"] = limit
33
37
}
38
+
params["uri"] = uri
34
39
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getRepostedBy", params, nil, &out); err != nil {
35
40
return nil, err
36
41
}
+6
-3
api/bsky/feedgetSuggestedFeeds.go
+6
-3
api/bsky/feedgetSuggestedFeeds.go
···
20
20
func FeedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*FeedGetSuggestedFeeds_Output, error) {
21
21
var out FeedGetSuggestedFeeds_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
26
29
}
27
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getSuggestedFeeds", params, nil, &out); err != nil {
28
31
return nil, err
+9
-4
api/bsky/feedgetTimeline.go
+9
-4
api/bsky/feedgetTimeline.go
···
22
22
func FeedGetTimeline(ctx context.Context, c *xrpc.Client, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) {
23
23
var out FeedGetTimeline_Output
24
24
25
-
params := map[string]interface{}{
26
-
"algorithm": algorithm,
27
-
"cursor": cursor,
28
-
"limit": limit,
25
+
params := map[string]interface{}{}
26
+
if algorithm != "" {
27
+
params["algorithm"] = algorithm
28
+
}
29
+
if cursor != "" {
30
+
params["cursor"] = cursor
31
+
}
32
+
if limit != 0 {
33
+
params["limit"] = limit
29
34
}
30
35
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil {
31
36
return nil, err
+34
-13
api/bsky/feedsearchPosts.go
+34
-13
api/bsky/feedsearchPosts.go
···
34
34
func FeedSearchPosts(ctx context.Context, c *xrpc.Client, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string) (*FeedSearchPosts_Output, error) {
35
35
var out FeedSearchPosts_Output
36
36
37
-
params := map[string]interface{}{
38
-
"author": author,
39
-
"cursor": cursor,
40
-
"domain": domain,
41
-
"lang": lang,
42
-
"limit": limit,
43
-
"mentions": mentions,
44
-
"q": q,
45
-
"since": since,
46
-
"sort": sort,
47
-
"tag": tag,
48
-
"until": until,
49
-
"url": url,
37
+
params := map[string]interface{}{}
38
+
if author != "" {
39
+
params["author"] = author
40
+
}
41
+
if cursor != "" {
42
+
params["cursor"] = cursor
43
+
}
44
+
if domain != "" {
45
+
params["domain"] = domain
46
+
}
47
+
if lang != "" {
48
+
params["lang"] = lang
49
+
}
50
+
if limit != 0 {
51
+
params["limit"] = limit
52
+
}
53
+
if mentions != "" {
54
+
params["mentions"] = mentions
55
+
}
56
+
params["q"] = q
57
+
if since != "" {
58
+
params["since"] = since
59
+
}
60
+
if sort != "" {
61
+
params["sort"] = sort
62
+
}
63
+
if len(tag) != 0 {
64
+
params["tag"] = tag
65
+
}
66
+
if until != "" {
67
+
params["until"] = until
68
+
}
69
+
if url != "" {
70
+
params["url"] = url
50
71
}
51
72
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.searchPosts", params, nil, &out); err != nil {
52
73
return nil, err
+7
-4
api/bsky/graphgetActorStarterPacks.go
+7
-4
api/bsky/graphgetActorStarterPacks.go
···
20
20
func GraphGetActorStarterPacks(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetActorStarterPacks_Output, error) {
21
21
var out GraphGetActorStarterPacks_Output
22
22
23
-
params := map[string]interface{}{
24
-
"actor": actor,
25
-
"cursor": cursor,
26
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
params["actor"] = actor
25
+
if cursor != "" {
26
+
params["cursor"] = cursor
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getActorStarterPacks", params, nil, &out); err != nil {
29
32
return nil, err
+6
-3
api/bsky/graphgetBlocks.go
+6
-3
api/bsky/graphgetBlocks.go
···
20
20
func GraphGetBlocks(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetBlocks_Output, error) {
21
21
var out GraphGetBlocks_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
26
29
}
27
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getBlocks", params, nil, &out); err != nil {
28
31
return nil, err
+7
-4
api/bsky/graphgetFollowers.go
+7
-4
api/bsky/graphgetFollowers.go
···
21
21
func GraphGetFollowers(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollowers_Output, error) {
22
22
var out GraphGetFollowers_Output
23
23
24
-
params := map[string]interface{}{
25
-
"actor": actor,
26
-
"cursor": cursor,
27
-
"limit": limit,
24
+
params := map[string]interface{}{}
25
+
params["actor"] = actor
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
28
31
}
29
32
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getFollowers", params, nil, &out); err != nil {
30
33
return nil, err
+7
-4
api/bsky/graphgetFollows.go
+7
-4
api/bsky/graphgetFollows.go
···
21
21
func GraphGetFollows(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollows_Output, error) {
22
22
var out GraphGetFollows_Output
23
23
24
-
params := map[string]interface{}{
25
-
"actor": actor,
26
-
"cursor": cursor,
27
-
"limit": limit,
24
+
params := map[string]interface{}{}
25
+
params["actor"] = actor
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
28
31
}
29
32
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getFollows", params, nil, &out); err != nil {
30
33
return nil, err
+7
-4
api/bsky/graphgetKnownFollowers.go
+7
-4
api/bsky/graphgetKnownFollowers.go
···
21
21
func GraphGetKnownFollowers(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetKnownFollowers_Output, error) {
22
22
var out GraphGetKnownFollowers_Output
23
23
24
-
params := map[string]interface{}{
25
-
"actor": actor,
26
-
"cursor": cursor,
27
-
"limit": limit,
24
+
params := map[string]interface{}{}
25
+
params["actor"] = actor
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
28
31
}
29
32
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getKnownFollowers", params, nil, &out); err != nil {
30
33
return nil, err
+7
-4
api/bsky/graphgetList.go
+7
-4
api/bsky/graphgetList.go
···
23
23
func GraphGetList(ctx context.Context, c *xrpc.Client, cursor string, limit int64, list string) (*GraphGetList_Output, error) {
24
24
var out GraphGetList_Output
25
25
26
-
params := map[string]interface{}{
27
-
"cursor": cursor,
28
-
"limit": limit,
29
-
"list": list,
26
+
params := map[string]interface{}{}
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
30
32
}
33
+
params["list"] = list
31
34
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getList", params, nil, &out); err != nil {
32
35
return nil, err
33
36
}
+6
-3
api/bsky/graphgetListBlocks.go
+6
-3
api/bsky/graphgetListBlocks.go
···
20
20
func GraphGetListBlocks(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetListBlocks_Output, error) {
21
21
var out GraphGetListBlocks_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
26
29
}
27
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getListBlocks", params, nil, &out); err != nil {
28
31
return nil, err
+6
-3
api/bsky/graphgetListMutes.go
+6
-3
api/bsky/graphgetListMutes.go
···
20
20
func GraphGetListMutes(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetListMutes_Output, error) {
21
21
var out GraphGetListMutes_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
26
29
}
27
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getListMutes", params, nil, &out); err != nil {
28
31
return nil, err
+7
-4
api/bsky/graphgetLists.go
+7
-4
api/bsky/graphgetLists.go
···
22
22
func GraphGetLists(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetLists_Output, error) {
23
23
var out GraphGetLists_Output
24
24
25
-
params := map[string]interface{}{
26
-
"actor": actor,
27
-
"cursor": cursor,
28
-
"limit": limit,
25
+
params := map[string]interface{}{}
26
+
params["actor"] = actor
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
29
32
}
30
33
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getLists", params, nil, &out); err != nil {
31
34
return nil, err
+6
-3
api/bsky/graphgetMutes.go
+6
-3
api/bsky/graphgetMutes.go
···
20
20
func GraphGetMutes(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetMutes_Output, error) {
21
21
var out GraphGetMutes_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
26
29
}
27
30
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getMutes", params, nil, &out); err != nil {
28
31
return nil, err
+4
-3
api/bsky/graphgetRelationships.go
+4
-3
api/bsky/graphgetRelationships.go
···
61
61
func GraphGetRelationships(ctx context.Context, c *xrpc.Client, actor string, others []string) (*GraphGetRelationships_Output, error) {
62
62
var out GraphGetRelationships_Output
63
63
64
-
params := map[string]interface{}{
65
-
"actor": actor,
66
-
"others": others,
64
+
params := map[string]interface{}{}
65
+
params["actor"] = actor
66
+
if len(others) != 0 {
67
+
params["others"] = others
67
68
}
68
69
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getRelationships", params, nil, &out); err != nil {
69
70
return nil, err
+2
-3
api/bsky/graphgetStarterPack.go
+2
-3
api/bsky/graphgetStarterPack.go
···
21
21
func GraphGetStarterPack(ctx context.Context, c *xrpc.Client, starterPack string) (*GraphGetStarterPack_Output, error) {
22
22
var out GraphGetStarterPack_Output
23
23
24
-
params := map[string]interface{}{
25
-
"starterPack": starterPack,
26
-
}
24
+
params := map[string]interface{}{}
25
+
params["starterPack"] = starterPack
27
26
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getStarterPack", params, nil, &out); err != nil {
28
27
return nil, err
29
28
}
+2
-3
api/bsky/graphgetStarterPacks.go
+2
-3
api/bsky/graphgetStarterPacks.go
···
19
19
func GraphGetStarterPacks(ctx context.Context, c *xrpc.Client, uris []string) (*GraphGetStarterPacks_Output, error) {
20
20
var out GraphGetStarterPacks_Output
21
21
22
-
params := map[string]interface{}{
23
-
"uris": uris,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["uris"] = uris
25
24
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getStarterPacks", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+2
-3
api/bsky/graphgetSuggestedFollowsByActor.go
+2
-3
api/bsky/graphgetSuggestedFollowsByActor.go
···
23
23
func GraphGetSuggestedFollowsByActor(ctx context.Context, c *xrpc.Client, actor string) (*GraphGetSuggestedFollowsByActor_Output, error) {
24
24
var out GraphGetSuggestedFollowsByActor_Output
25
25
26
-
params := map[string]interface{}{
27
-
"actor": actor,
28
-
}
26
+
params := map[string]interface{}{}
27
+
params["actor"] = actor
29
28
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getSuggestedFollowsByActor", params, nil, &out); err != nil {
30
29
return nil, err
31
30
}
+7
-4
api/bsky/graphsearchStarterPacks.go
+7
-4
api/bsky/graphsearchStarterPacks.go
···
22
22
func GraphSearchStarterPacks(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string) (*GraphSearchStarterPacks_Output, error) {
23
23
var out GraphSearchStarterPacks_Output
24
24
25
-
params := map[string]interface{}{
26
-
"cursor": cursor,
27
-
"limit": limit,
28
-
"q": q,
25
+
params := map[string]interface{}{}
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
29
31
}
32
+
params["q"] = q
30
33
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.searchStarterPacks", params, nil, &out); err != nil {
31
34
return nil, err
32
35
}
+4
-3
api/bsky/labelergetServices.go
+4
-3
api/bsky/labelergetServices.go
···
57
57
func LabelerGetServices(ctx context.Context, c *xrpc.Client, detailed bool, dids []string) (*LabelerGetServices_Output, error) {
58
58
var out LabelerGetServices_Output
59
59
60
-
params := map[string]interface{}{
61
-
"detailed": detailed,
62
-
"dids": dids,
60
+
params := map[string]interface{}{}
61
+
if detailed {
62
+
params["detailed"] = detailed
63
63
}
64
+
params["dids"] = dids
64
65
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.labeler.getServices", params, nil, &out); err != nil {
65
66
return nil, err
66
67
}
+6
-3
api/bsky/notificationgetUnreadCount.go
+6
-3
api/bsky/notificationgetUnreadCount.go
···
19
19
func NotificationGetUnreadCount(ctx context.Context, c *xrpc.Client, priority bool, seenAt string) (*NotificationGetUnreadCount_Output, error) {
20
20
var out NotificationGetUnreadCount_Output
21
21
22
-
params := map[string]interface{}{
23
-
"priority": priority,
24
-
"seenAt": seenAt,
22
+
params := map[string]interface{}{}
23
+
if priority {
24
+
params["priority"] = priority
25
+
}
26
+
if seenAt != "" {
27
+
params["seenAt"] = seenAt
25
28
}
26
29
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.getUnreadCount", params, nil, &out); err != nil {
27
30
return nil, err
+15
-6
api/bsky/notificationlistNotifications.go
+15
-6
api/bsky/notificationlistNotifications.go
···
40
40
func NotificationListNotifications(ctx context.Context, c *xrpc.Client, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) {
41
41
var out NotificationListNotifications_Output
42
42
43
-
params := map[string]interface{}{
44
-
"cursor": cursor,
45
-
"limit": limit,
46
-
"priority": priority,
47
-
"reasons": reasons,
48
-
"seenAt": seenAt,
43
+
params := map[string]interface{}{}
44
+
if cursor != "" {
45
+
params["cursor"] = cursor
46
+
}
47
+
if limit != 0 {
48
+
params["limit"] = limit
49
+
}
50
+
if priority {
51
+
params["priority"] = priority
52
+
}
53
+
if len(reasons) != 0 {
54
+
params["reasons"] = reasons
55
+
}
56
+
if seenAt != "" {
57
+
params["seenAt"] = seenAt
49
58
}
50
59
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil {
51
60
return nil, err
+9
-4
api/bsky/unspeccedgetPopularFeedGenerators.go
+9
-4
api/bsky/unspeccedgetPopularFeedGenerators.go
···
20
20
func UnspeccedGetPopularFeedGenerators(ctx context.Context, c *xrpc.Client, cursor string, limit int64, query string) (*UnspeccedGetPopularFeedGenerators_Output, error) {
21
21
var out UnspeccedGetPopularFeedGenerators_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
26
-
"query": query,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
29
+
}
30
+
if query != "" {
31
+
params["query"] = query
27
32
}
28
33
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getPopularFeedGenerators", params, nil, &out); err != nil {
29
34
return nil, err
+3
-2
api/bsky/unspeccedgetSuggestedFeeds.go
+3
-2
api/bsky/unspeccedgetSuggestedFeeds.go
···
19
19
func UnspeccedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedFeeds_Output, error) {
20
20
var out UnspeccedGetSuggestedFeeds_Output
21
21
22
-
params := map[string]interface{}{
23
-
"limit": limit,
22
+
params := map[string]interface{}{}
23
+
if limit != 0 {
24
+
params["limit"] = limit
24
25
}
25
26
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeeds", params, nil, &out); err != nil {
26
27
return nil, err
+6
-3
api/bsky/unspeccedgetSuggestedFeedsSkeleton.go
+6
-3
api/bsky/unspeccedgetSuggestedFeedsSkeleton.go
···
21
21
func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedFeedsSkeleton_Output, error) {
22
22
var out UnspeccedGetSuggestedFeedsSkeleton_Output
23
23
24
-
params := map[string]interface{}{
25
-
"limit": limit,
26
-
"viewer": viewer,
24
+
params := map[string]interface{}{}
25
+
if limit != 0 {
26
+
params["limit"] = limit
27
+
}
28
+
if viewer != "" {
29
+
params["viewer"] = viewer
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeedsSkeleton", params, nil, &out); err != nil {
29
32
return nil, err
+3
-2
api/bsky/unspeccedgetSuggestedStarterPacks.go
+3
-2
api/bsky/unspeccedgetSuggestedStarterPacks.go
···
19
19
func UnspeccedGetSuggestedStarterPacks(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedStarterPacks_Output, error) {
20
20
var out UnspeccedGetSuggestedStarterPacks_Output
21
21
22
-
params := map[string]interface{}{
23
-
"limit": limit,
22
+
params := map[string]interface{}{}
23
+
if limit != 0 {
24
+
params["limit"] = limit
24
25
}
25
26
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacks", params, nil, &out); err != nil {
26
27
return nil, err
+6
-3
api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go
+6
-3
api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go
···
21
21
func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) {
22
22
var out UnspeccedGetSuggestedStarterPacksSkeleton_Output
23
23
24
-
params := map[string]interface{}{
25
-
"limit": limit,
26
-
"viewer": viewer,
24
+
params := map[string]interface{}{}
25
+
if limit != 0 {
26
+
params["limit"] = limit
27
+
}
28
+
if viewer != "" {
29
+
params["viewer"] = viewer
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", params, nil, &out); err != nil {
29
32
return nil, err
+6
-3
api/bsky/unspeccedgetSuggestedUsers.go
+6
-3
api/bsky/unspeccedgetSuggestedUsers.go
···
21
21
func UnspeccedGetSuggestedUsers(ctx context.Context, c *xrpc.Client, category string, limit int64) (*UnspeccedGetSuggestedUsers_Output, error) {
22
22
var out UnspeccedGetSuggestedUsers_Output
23
23
24
-
params := map[string]interface{}{
25
-
"category": category,
26
-
"limit": limit,
24
+
params := map[string]interface{}{}
25
+
if category != "" {
26
+
params["category"] = category
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsers", params, nil, &out); err != nil {
29
32
return nil, err
+9
-4
api/bsky/unspeccedgetSuggestedUsersSkeleton.go
+9
-4
api/bsky/unspeccedgetSuggestedUsersSkeleton.go
···
22
22
func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c *xrpc.Client, category string, limit int64, viewer string) (*UnspeccedGetSuggestedUsersSkeleton_Output, error) {
23
23
var out UnspeccedGetSuggestedUsersSkeleton_Output
24
24
25
-
params := map[string]interface{}{
26
-
"category": category,
27
-
"limit": limit,
28
-
"viewer": viewer,
25
+
params := map[string]interface{}{}
26
+
if category != "" {
27
+
params["category"] = category
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
31
+
}
32
+
if viewer != "" {
33
+
params["viewer"] = viewer
29
34
}
30
35
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsersSkeleton", params, nil, &out); err != nil {
31
36
return nil, err
+12
-5
api/bsky/unspeccedgetSuggestionsSkeleton.go
+12
-5
api/bsky/unspeccedgetSuggestionsSkeleton.go
···
27
27
func UnspeccedGetSuggestionsSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, relativeToDid string, viewer string) (*UnspeccedGetSuggestionsSkeleton_Output, error) {
28
28
var out UnspeccedGetSuggestionsSkeleton_Output
29
29
30
-
params := map[string]interface{}{
31
-
"cursor": cursor,
32
-
"limit": limit,
33
-
"relativeToDid": relativeToDid,
34
-
"viewer": viewer,
30
+
params := map[string]interface{}{}
31
+
if cursor != "" {
32
+
params["cursor"] = cursor
33
+
}
34
+
if limit != 0 {
35
+
params["limit"] = limit
36
+
}
37
+
if relativeToDid != "" {
38
+
params["relativeToDid"] = relativeToDid
39
+
}
40
+
if viewer != "" {
41
+
params["viewer"] = viewer
35
42
}
36
43
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestionsSkeleton", params, nil, &out); err != nil {
37
44
return nil, err
+6
-3
api/bsky/unspeccedgetTrendingTopics.go
+6
-3
api/bsky/unspeccedgetTrendingTopics.go
···
22
22
func UnspeccedGetTrendingTopics(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) {
23
23
var out UnspeccedGetTrendingTopics_Output
24
24
25
-
params := map[string]interface{}{
26
-
"limit": limit,
27
-
"viewer": viewer,
25
+
params := map[string]interface{}{}
26
+
if limit != 0 {
27
+
params["limit"] = limit
28
+
}
29
+
if viewer != "" {
30
+
params["viewer"] = viewer
28
31
}
29
32
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil {
30
33
return nil, err
+3
-2
api/bsky/unspeccedgetTrends.go
+3
-2
api/bsky/unspeccedgetTrends.go
···
19
19
func UnspeccedGetTrends(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetTrends_Output, error) {
20
20
var out UnspeccedGetTrends_Output
21
21
22
-
params := map[string]interface{}{
23
-
"limit": limit,
22
+
params := map[string]interface{}{}
23
+
if limit != 0 {
24
+
params["limit"] = limit
24
25
}
25
26
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrends", params, nil, &out); err != nil {
26
27
return nil, err
+6
-3
api/bsky/unspeccedgetTrendsSkeleton.go
+6
-3
api/bsky/unspeccedgetTrendsSkeleton.go
···
21
21
func UnspeccedGetTrendsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) {
22
22
var out UnspeccedGetTrendsSkeleton_Output
23
23
24
-
params := map[string]interface{}{
25
-
"limit": limit,
26
-
"viewer": viewer,
24
+
params := map[string]interface{}{}
25
+
if limit != 0 {
26
+
params["limit"] = limit
27
+
}
28
+
if viewer != "" {
29
+
params["viewer"] = viewer
27
30
}
28
31
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendsSkeleton", params, nil, &out); err != nil {
29
32
return nil, err
+13
-6
api/bsky/unspeccedsearchActorsSkeleton.go
+13
-6
api/bsky/unspeccedsearchActorsSkeleton.go
···
27
27
func UnspeccedSearchActorsSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, typeahead bool, viewer string) (*UnspeccedSearchActorsSkeleton_Output, error) {
28
28
var out UnspeccedSearchActorsSkeleton_Output
29
29
30
-
params := map[string]interface{}{
31
-
"cursor": cursor,
32
-
"limit": limit,
33
-
"q": q,
34
-
"typeahead": typeahead,
35
-
"viewer": viewer,
30
+
params := map[string]interface{}{}
31
+
if cursor != "" {
32
+
params["cursor"] = cursor
33
+
}
34
+
if limit != 0 {
35
+
params["limit"] = limit
36
+
}
37
+
params["q"] = q
38
+
if typeahead {
39
+
params["typeahead"] = typeahead
40
+
}
41
+
if viewer != "" {
42
+
params["viewer"] = viewer
36
43
}
37
44
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchActorsSkeleton", params, nil, &out); err != nil {
38
45
return nil, err
+37
-14
api/bsky/unspeccedsearchPostsSkeleton.go
+37
-14
api/bsky/unspeccedsearchPostsSkeleton.go
···
35
35
func UnspeccedSearchPostsSkeleton(ctx context.Context, c *xrpc.Client, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string, viewer string) (*UnspeccedSearchPostsSkeleton_Output, error) {
36
36
var out UnspeccedSearchPostsSkeleton_Output
37
37
38
-
params := map[string]interface{}{
39
-
"author": author,
40
-
"cursor": cursor,
41
-
"domain": domain,
42
-
"lang": lang,
43
-
"limit": limit,
44
-
"mentions": mentions,
45
-
"q": q,
46
-
"since": since,
47
-
"sort": sort,
48
-
"tag": tag,
49
-
"until": until,
50
-
"url": url,
51
-
"viewer": viewer,
38
+
params := map[string]interface{}{}
39
+
if author != "" {
40
+
params["author"] = author
41
+
}
42
+
if cursor != "" {
43
+
params["cursor"] = cursor
44
+
}
45
+
if domain != "" {
46
+
params["domain"] = domain
47
+
}
48
+
if lang != "" {
49
+
params["lang"] = lang
50
+
}
51
+
if limit != 0 {
52
+
params["limit"] = limit
53
+
}
54
+
if mentions != "" {
55
+
params["mentions"] = mentions
56
+
}
57
+
params["q"] = q
58
+
if since != "" {
59
+
params["since"] = since
60
+
}
61
+
if sort != "" {
62
+
params["sort"] = sort
63
+
}
64
+
if len(tag) != 0 {
65
+
params["tag"] = tag
66
+
}
67
+
if until != "" {
68
+
params["until"] = until
69
+
}
70
+
if url != "" {
71
+
params["url"] = url
72
+
}
73
+
if viewer != "" {
74
+
params["viewer"] = viewer
52
75
}
53
76
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchPostsSkeleton", params, nil, &out); err != nil {
54
77
return nil, err
+10
-5
api/bsky/unspeccedsearchStarterPacksSkeleton.go
+10
-5
api/bsky/unspeccedsearchStarterPacksSkeleton.go
···
26
26
func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, viewer string) (*UnspeccedSearchStarterPacksSkeleton_Output, error) {
27
27
var out UnspeccedSearchStarterPacksSkeleton_Output
28
28
29
-
params := map[string]interface{}{
30
-
"cursor": cursor,
31
-
"limit": limit,
32
-
"q": q,
33
-
"viewer": viewer,
29
+
params := map[string]interface{}{}
30
+
if cursor != "" {
31
+
params["cursor"] = cursor
32
+
}
33
+
if limit != 0 {
34
+
params["limit"] = limit
35
+
}
36
+
params["q"] = q
37
+
if viewer != "" {
38
+
params["viewer"] = viewer
34
39
}
35
40
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchStarterPacksSkeleton", params, nil, &out); err != nil {
36
41
return nil, err
+2
-3
api/bsky/videogetJobStatus.go
+2
-3
api/bsky/videogetJobStatus.go
···
19
19
func VideoGetJobStatus(ctx context.Context, c *xrpc.Client, jobId string) (*VideoGetJobStatus_Output, error) {
20
20
var out VideoGetJobStatus_Output
21
21
22
-
params := map[string]interface{}{
23
-
"jobId": jobId,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["jobId"] = jobId
25
24
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.video.getJobStatus", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+2
-3
api/chat/convogetConvo.go
+2
-3
api/chat/convogetConvo.go
···
19
19
func ConvoGetConvo(ctx context.Context, c *xrpc.Client, convoId string) (*ConvoGetConvo_Output, error) {
20
20
var out ConvoGetConvo_Output
21
21
22
-
params := map[string]interface{}{
23
-
"convoId": convoId,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["convoId"] = convoId
25
24
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvo", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+2
-3
api/chat/convogetConvoAvailability.go
+2
-3
api/chat/convogetConvoAvailability.go
···
20
20
func ConvoGetConvoAvailability(ctx context.Context, c *xrpc.Client, members []string) (*ConvoGetConvoAvailability_Output, error) {
21
21
var out ConvoGetConvoAvailability_Output
22
22
23
-
params := map[string]interface{}{
24
-
"members": members,
25
-
}
23
+
params := map[string]interface{}{}
24
+
params["members"] = members
26
25
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvoAvailability", params, nil, &out); err != nil {
27
26
return nil, err
28
27
}
+2
-3
api/chat/convogetConvoForMembers.go
+2
-3
api/chat/convogetConvoForMembers.go
···
19
19
func ConvoGetConvoForMembers(ctx context.Context, c *xrpc.Client, members []string) (*ConvoGetConvoForMembers_Output, error) {
20
20
var out ConvoGetConvoForMembers_Output
21
21
22
-
params := map[string]interface{}{
23
-
"members": members,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["members"] = members
25
24
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvoForMembers", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+3
-2
api/chat/convogetLog.go
+3
-2
api/chat/convogetLog.go
···
122
122
func ConvoGetLog(ctx context.Context, c *xrpc.Client, cursor string) (*ConvoGetLog_Output, error) {
123
123
var out ConvoGetLog_Output
124
124
125
-
params := map[string]interface{}{
126
-
"cursor": cursor,
125
+
params := map[string]interface{}{}
126
+
if cursor != "" {
127
+
params["cursor"] = cursor
127
128
}
128
129
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getLog", params, nil, &out); err != nil {
129
130
return nil, err
+7
-4
api/chat/convogetMessages.go
+7
-4
api/chat/convogetMessages.go
···
58
58
func ConvoGetMessages(ctx context.Context, c *xrpc.Client, convoId string, cursor string, limit int64) (*ConvoGetMessages_Output, error) {
59
59
var out ConvoGetMessages_Output
60
60
61
-
params := map[string]interface{}{
62
-
"convoId": convoId,
63
-
"cursor": cursor,
64
-
"limit": limit,
61
+
params := map[string]interface{}{}
62
+
params["convoId"] = convoId
63
+
if cursor != "" {
64
+
params["cursor"] = cursor
65
+
}
66
+
if limit != 0 {
67
+
params["limit"] = limit
65
68
}
66
69
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getMessages", params, nil, &out); err != nil {
67
70
return nil, err
+12
-5
api/chat/convolistConvos.go
+12
-5
api/chat/convolistConvos.go
···
20
20
func ConvoListConvos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, readState string, status string) (*ConvoListConvos_Output, error) {
21
21
var out ConvoListConvos_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"limit": limit,
26
-
"readState": readState,
27
-
"status": status,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if limit != 0 {
28
+
params["limit"] = limit
29
+
}
30
+
if readState != "" {
31
+
params["readState"] = readState
32
+
}
33
+
if status != "" {
34
+
params["status"] = status
28
35
}
29
36
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil {
30
37
return nil, err
+2
-3
api/chat/moderationgetActorMetadata.go
+2
-3
api/chat/moderationgetActorMetadata.go
···
29
29
func ModerationGetActorMetadata(ctx context.Context, c *xrpc.Client, actor string) (*ModerationGetActorMetadata_Output, error) {
30
30
var out ModerationGetActorMetadata_Output
31
31
32
-
params := map[string]interface{}{
33
-
"actor": actor,
34
-
}
32
+
params := map[string]interface{}{}
33
+
params["actor"] = actor
35
34
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.moderation.getActorMetadata", params, nil, &out); err != nil {
36
35
return nil, err
37
36
}
+10
-5
api/chat/moderationgetMessageContext.go
+10
-5
api/chat/moderationgetMessageContext.go
···
59
59
func ModerationGetMessageContext(ctx context.Context, c *xrpc.Client, after int64, before int64, convoId string, messageId string) (*ModerationGetMessageContext_Output, error) {
60
60
var out ModerationGetMessageContext_Output
61
61
62
-
params := map[string]interface{}{
63
-
"after": after,
64
-
"before": before,
65
-
"convoId": convoId,
66
-
"messageId": messageId,
62
+
params := map[string]interface{}{}
63
+
if after != 0 {
64
+
params["after"] = after
65
+
}
66
+
if before != 0 {
67
+
params["before"] = before
68
+
}
69
+
if convoId != "" {
70
+
params["convoId"] = convoId
67
71
}
72
+
params["messageId"] = messageId
68
73
if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.moderation.getMessageContext", params, nil, &out); err != nil {
69
74
return nil, err
70
75
}
+10
-5
api/ozone/hostinggetAccountHistory.go
+10
-5
api/ozone/hostinggetAccountHistory.go
···
129
129
func HostingGetAccountHistory(ctx context.Context, c *xrpc.Client, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) {
130
130
var out HostingGetAccountHistory_Output
131
131
132
-
params := map[string]interface{}{
133
-
"cursor": cursor,
134
-
"did": did,
135
-
"events": events,
136
-
"limit": limit,
132
+
params := map[string]interface{}{}
133
+
if cursor != "" {
134
+
params["cursor"] = cursor
135
+
}
136
+
params["did"] = did
137
+
if len(events) != 0 {
138
+
params["events"] = events
139
+
}
140
+
if limit != 0 {
141
+
params["limit"] = limit
137
142
}
138
143
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil {
139
144
return nil, err
+2
-3
api/ozone/moderationgetEvent.go
+2
-3
api/ozone/moderationgetEvent.go
···
14
14
func ModerationGetEvent(ctx context.Context, c *xrpc.Client, id int64) (*ModerationDefs_ModEventViewDetail, error) {
15
15
var out ModerationDefs_ModEventViewDetail
16
16
17
-
params := map[string]interface{}{
18
-
"id": id,
19
-
}
17
+
params := map[string]interface{}{}
18
+
params["id"] = id
20
19
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil {
21
20
return nil, err
22
21
}
+4
-3
api/ozone/moderationgetRecord.go
+4
-3
api/ozone/moderationgetRecord.go
···
14
14
func ModerationGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) {
15
15
var out ModerationDefs_RecordViewDetail
16
16
17
-
params := map[string]interface{}{
18
-
"cid": cid,
19
-
"uri": uri,
17
+
params := map[string]interface{}{}
18
+
if cid != "" {
19
+
params["cid"] = cid
20
20
}
21
+
params["uri"] = uri
21
22
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil {
22
23
return nil, err
23
24
}
+2
-3
api/ozone/moderationgetRecords.go
+2
-3
api/ozone/moderationgetRecords.go
···
57
57
func ModerationGetRecords(ctx context.Context, c *xrpc.Client, uris []string) (*ModerationGetRecords_Output, error) {
58
58
var out ModerationGetRecords_Output
59
59
60
-
params := map[string]interface{}{
61
-
"uris": uris,
62
-
}
60
+
params := map[string]interface{}{}
61
+
params["uris"] = uris
63
62
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecords", params, nil, &out); err != nil {
64
63
return nil, err
65
64
}
+2
-3
api/ozone/moderationgetRepo.go
+2
-3
api/ozone/moderationgetRepo.go
···
14
14
func ModerationGetRepo(ctx context.Context, c *xrpc.Client, did string) (*ModerationDefs_RepoViewDetail, error) {
15
15
var out ModerationDefs_RepoViewDetail
16
16
17
-
params := map[string]interface{}{
18
-
"did": did,
19
-
}
17
+
params := map[string]interface{}{}
18
+
params["did"] = did
20
19
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil {
21
20
return nil, err
22
21
}
+2
-3
api/ozone/moderationgetReporterStats.go
+2
-3
api/ozone/moderationgetReporterStats.go
···
19
19
func ModerationGetReporterStats(ctx context.Context, c *xrpc.Client, dids []string) (*ModerationGetReporterStats_Output, error) {
20
20
var out ModerationGetReporterStats_Output
21
21
22
-
params := map[string]interface{}{
23
-
"dids": dids,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["dids"] = dids
25
24
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getReporterStats", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+2
-3
api/ozone/moderationgetRepos.go
+2
-3
api/ozone/moderationgetRepos.go
···
57
57
func ModerationGetRepos(ctx context.Context, c *xrpc.Client, dids []string) (*ModerationGetRepos_Output, error) {
58
58
var out ModerationGetRepos_Output
59
59
60
-
params := map[string]interface{}{
61
-
"dids": dids,
62
-
}
60
+
params := map[string]interface{}{}
61
+
params["dids"] = dids
63
62
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepos", params, nil, &out); err != nil {
64
63
return nil, err
65
64
}
+2
-3
api/ozone/moderationgetSubjects.go
+2
-3
api/ozone/moderationgetSubjects.go
···
19
19
func ModerationGetSubjects(ctx context.Context, c *xrpc.Client, subjects []string) (*ModerationGetSubjects_Output, error) {
20
20
var out ModerationGetSubjects_Output
21
21
22
-
params := map[string]interface{}{
23
-
"subjects": subjects,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["subjects"] = subjects
25
24
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getSubjects", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+57
-20
api/ozone/moderationqueryEvents.go
+57
-20
api/ozone/moderationqueryEvents.go
···
34
34
func ModerationQueryEvents(ctx context.Context, c *xrpc.Client, addedLabels []string, addedTags []string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) {
35
35
var out ModerationQueryEvents_Output
36
36
37
-
params := map[string]interface{}{
38
-
"addedLabels": addedLabels,
39
-
"addedTags": addedTags,
40
-
"collections": collections,
41
-
"comment": comment,
42
-
"createdAfter": createdAfter,
43
-
"createdBefore": createdBefore,
44
-
"createdBy": createdBy,
45
-
"cursor": cursor,
46
-
"hasComment": hasComment,
47
-
"includeAllUserRecords": includeAllUserRecords,
48
-
"limit": limit,
49
-
"policies": policies,
50
-
"removedLabels": removedLabels,
51
-
"removedTags": removedTags,
52
-
"reportTypes": reportTypes,
53
-
"sortDirection": sortDirection,
54
-
"subject": subject,
55
-
"subjectType": subjectType,
56
-
"types": types,
37
+
params := map[string]interface{}{}
38
+
if len(addedLabels) != 0 {
39
+
params["addedLabels"] = addedLabels
40
+
}
41
+
if len(addedTags) != 0 {
42
+
params["addedTags"] = addedTags
43
+
}
44
+
if len(collections) != 0 {
45
+
params["collections"] = collections
46
+
}
47
+
if comment != "" {
48
+
params["comment"] = comment
49
+
}
50
+
if createdAfter != "" {
51
+
params["createdAfter"] = createdAfter
52
+
}
53
+
if createdBefore != "" {
54
+
params["createdBefore"] = createdBefore
55
+
}
56
+
if createdBy != "" {
57
+
params["createdBy"] = createdBy
58
+
}
59
+
if cursor != "" {
60
+
params["cursor"] = cursor
61
+
}
62
+
if hasComment {
63
+
params["hasComment"] = hasComment
64
+
}
65
+
if includeAllUserRecords {
66
+
params["includeAllUserRecords"] = includeAllUserRecords
67
+
}
68
+
if limit != 0 {
69
+
params["limit"] = limit
70
+
}
71
+
if len(policies) != 0 {
72
+
params["policies"] = policies
73
+
}
74
+
if len(removedLabels) != 0 {
75
+
params["removedLabels"] = removedLabels
76
+
}
77
+
if len(removedTags) != 0 {
78
+
params["removedTags"] = removedTags
79
+
}
80
+
if len(reportTypes) != 0 {
81
+
params["reportTypes"] = reportTypes
82
+
}
83
+
if sortDirection != "" {
84
+
params["sortDirection"] = sortDirection
85
+
}
86
+
if subject != "" {
87
+
params["subject"] = subject
88
+
}
89
+
if subjectType != "" {
90
+
params["subjectType"] = subjectType
91
+
}
92
+
if len(types) != 0 {
93
+
params["types"] = types
57
94
}
58
95
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil {
59
96
return nil, err
+102
-35
api/ozone/moderationqueryStatuses.go
+102
-35
api/ozone/moderationqueryStatuses.go
···
48
48
func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) {
49
49
var out ModerationQueryStatuses_Output
50
50
51
-
params := map[string]interface{}{
52
-
"appealed": appealed,
53
-
"collections": collections,
54
-
"comment": comment,
55
-
"cursor": cursor,
56
-
"excludeTags": excludeTags,
57
-
"hostingDeletedAfter": hostingDeletedAfter,
58
-
"hostingDeletedBefore": hostingDeletedBefore,
59
-
"hostingStatuses": hostingStatuses,
60
-
"hostingUpdatedAfter": hostingUpdatedAfter,
61
-
"hostingUpdatedBefore": hostingUpdatedBefore,
62
-
"ignoreSubjects": ignoreSubjects,
63
-
"includeAllUserRecords": includeAllUserRecords,
64
-
"includeMuted": includeMuted,
65
-
"lastReviewedBy": lastReviewedBy,
66
-
"limit": limit,
67
-
"minAccountSuspendCount": minAccountSuspendCount,
68
-
"minPriorityScore": minPriorityScore,
69
-
"minReportedRecordsCount": minReportedRecordsCount,
70
-
"minTakendownRecordsCount": minTakendownRecordsCount,
71
-
"onlyMuted": onlyMuted,
72
-
"queueCount": queueCount,
73
-
"queueIndex": queueIndex,
74
-
"queueSeed": queueSeed,
75
-
"reportedAfter": reportedAfter,
76
-
"reportedBefore": reportedBefore,
77
-
"reviewState": reviewState,
78
-
"reviewedAfter": reviewedAfter,
79
-
"reviewedBefore": reviewedBefore,
80
-
"sortDirection": sortDirection,
81
-
"sortField": sortField,
82
-
"subject": subject,
83
-
"subjectType": subjectType,
84
-
"tags": tags,
85
-
"takendown": takendown,
51
+
params := map[string]interface{}{}
52
+
if appealed {
53
+
params["appealed"] = appealed
54
+
}
55
+
if len(collections) != 0 {
56
+
params["collections"] = collections
57
+
}
58
+
if comment != "" {
59
+
params["comment"] = comment
60
+
}
61
+
if cursor != "" {
62
+
params["cursor"] = cursor
63
+
}
64
+
if len(excludeTags) != 0 {
65
+
params["excludeTags"] = excludeTags
66
+
}
67
+
if hostingDeletedAfter != "" {
68
+
params["hostingDeletedAfter"] = hostingDeletedAfter
69
+
}
70
+
if hostingDeletedBefore != "" {
71
+
params["hostingDeletedBefore"] = hostingDeletedBefore
72
+
}
73
+
if len(hostingStatuses) != 0 {
74
+
params["hostingStatuses"] = hostingStatuses
75
+
}
76
+
if hostingUpdatedAfter != "" {
77
+
params["hostingUpdatedAfter"] = hostingUpdatedAfter
78
+
}
79
+
if hostingUpdatedBefore != "" {
80
+
params["hostingUpdatedBefore"] = hostingUpdatedBefore
81
+
}
82
+
if len(ignoreSubjects) != 0 {
83
+
params["ignoreSubjects"] = ignoreSubjects
84
+
}
85
+
if includeAllUserRecords {
86
+
params["includeAllUserRecords"] = includeAllUserRecords
87
+
}
88
+
if includeMuted {
89
+
params["includeMuted"] = includeMuted
90
+
}
91
+
if lastReviewedBy != "" {
92
+
params["lastReviewedBy"] = lastReviewedBy
93
+
}
94
+
if limit != 0 {
95
+
params["limit"] = limit
96
+
}
97
+
if minAccountSuspendCount != 0 {
98
+
params["minAccountSuspendCount"] = minAccountSuspendCount
99
+
}
100
+
if minPriorityScore != 0 {
101
+
params["minPriorityScore"] = minPriorityScore
102
+
}
103
+
if minReportedRecordsCount != 0 {
104
+
params["minReportedRecordsCount"] = minReportedRecordsCount
105
+
}
106
+
if minTakendownRecordsCount != 0 {
107
+
params["minTakendownRecordsCount"] = minTakendownRecordsCount
108
+
}
109
+
if onlyMuted {
110
+
params["onlyMuted"] = onlyMuted
111
+
}
112
+
if queueCount != 0 {
113
+
params["queueCount"] = queueCount
114
+
}
115
+
if queueIndex != 0 {
116
+
params["queueIndex"] = queueIndex
117
+
}
118
+
if queueSeed != "" {
119
+
params["queueSeed"] = queueSeed
120
+
}
121
+
if reportedAfter != "" {
122
+
params["reportedAfter"] = reportedAfter
123
+
}
124
+
if reportedBefore != "" {
125
+
params["reportedBefore"] = reportedBefore
126
+
}
127
+
if reviewState != "" {
128
+
params["reviewState"] = reviewState
129
+
}
130
+
if reviewedAfter != "" {
131
+
params["reviewedAfter"] = reviewedAfter
132
+
}
133
+
if reviewedBefore != "" {
134
+
params["reviewedBefore"] = reviewedBefore
135
+
}
136
+
if sortDirection != "" {
137
+
params["sortDirection"] = sortDirection
138
+
}
139
+
if sortField != "" {
140
+
params["sortField"] = sortField
141
+
}
142
+
if subject != "" {
143
+
params["subject"] = subject
144
+
}
145
+
if subjectType != "" {
146
+
params["subjectType"] = subjectType
147
+
}
148
+
if len(tags) != 0 {
149
+
params["tags"] = tags
150
+
}
151
+
if takendown {
152
+
params["takendown"] = takendown
86
153
}
87
154
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil {
88
155
return nil, err
+12
-5
api/ozone/moderationsearchRepos.go
+12
-5
api/ozone/moderationsearchRepos.go
···
22
22
func ModerationSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) {
23
23
var out ModerationSearchRepos_Output
24
24
25
-
params := map[string]interface{}{
26
-
"cursor": cursor,
27
-
"limit": limit,
28
-
"q": q,
29
-
"term": term,
25
+
params := map[string]interface{}{}
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
31
+
}
32
+
if q != "" {
33
+
params["q"] = q
34
+
}
35
+
if term != "" {
36
+
params["term"] = term
30
37
}
31
38
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil {
32
39
return nil, err
+7
-4
api/ozone/setgetValues.go
+7
-4
api/ozone/setgetValues.go
···
21
21
func SetGetValues(ctx context.Context, c *xrpc.Client, cursor string, limit int64, name string) (*SetGetValues_Output, error) {
22
22
var out SetGetValues_Output
23
23
24
-
params := map[string]interface{}{
25
-
"cursor": cursor,
26
-
"limit": limit,
27
-
"name": name,
24
+
params := map[string]interface{}{}
25
+
if cursor != "" {
26
+
params["cursor"] = cursor
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
28
30
}
31
+
params["name"] = name
29
32
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.set.getValues", params, nil, &out); err != nil {
30
33
return nil, err
31
34
}
+15
-6
api/ozone/setquerySets.go
+15
-6
api/ozone/setquerySets.go
···
22
22
func SetQuerySets(ctx context.Context, c *xrpc.Client, cursor string, limit int64, namePrefix string, sortBy string, sortDirection string) (*SetQuerySets_Output, error) {
23
23
var out SetQuerySets_Output
24
24
25
-
params := map[string]interface{}{
26
-
"cursor": cursor,
27
-
"limit": limit,
28
-
"namePrefix": namePrefix,
29
-
"sortBy": sortBy,
30
-
"sortDirection": sortDirection,
25
+
params := map[string]interface{}{}
26
+
if cursor != "" {
27
+
params["cursor"] = cursor
28
+
}
29
+
if limit != 0 {
30
+
params["limit"] = limit
31
+
}
32
+
if namePrefix != "" {
33
+
params["namePrefix"] = namePrefix
34
+
}
35
+
if sortBy != "" {
36
+
params["sortBy"] = sortBy
37
+
}
38
+
if sortDirection != "" {
39
+
params["sortDirection"] = sortDirection
31
40
}
32
41
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.set.querySets", params, nil, &out); err != nil {
33
42
return nil, err
+15
-6
api/ozone/settinglistOptions.go
+15
-6
api/ozone/settinglistOptions.go
···
23
23
func SettingListOptions(ctx context.Context, c *xrpc.Client, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) {
24
24
var out SettingListOptions_Output
25
25
26
-
params := map[string]interface{}{
27
-
"cursor": cursor,
28
-
"keys": keys,
29
-
"limit": limit,
30
-
"prefix": prefix,
31
-
"scope": scope,
26
+
params := map[string]interface{}{}
27
+
if cursor != "" {
28
+
params["cursor"] = cursor
29
+
}
30
+
if len(keys) != 0 {
31
+
params["keys"] = keys
32
+
}
33
+
if limit != 0 {
34
+
params["limit"] = limit
35
+
}
36
+
if prefix != "" {
37
+
params["prefix"] = prefix
38
+
}
39
+
if scope != "" {
40
+
params["scope"] = scope
32
41
}
33
42
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil {
34
43
return nil, err
+2
-3
api/ozone/signaturefindCorrelation.go
+2
-3
api/ozone/signaturefindCorrelation.go
···
19
19
func SignatureFindCorrelation(ctx context.Context, c *xrpc.Client, dids []string) (*SignatureFindCorrelation_Output, error) {
20
20
var out SignatureFindCorrelation_Output
21
21
22
-
params := map[string]interface{}{
23
-
"dids": dids,
24
-
}
22
+
params := map[string]interface{}{}
23
+
params["dids"] = dids
25
24
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.findCorrelation", params, nil, &out); err != nil {
26
25
return nil, err
27
26
}
+7
-4
api/ozone/signaturefindRelatedAccounts.go
+7
-4
api/ozone/signaturefindRelatedAccounts.go
···
27
27
func SignatureFindRelatedAccounts(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64) (*SignatureFindRelatedAccounts_Output, error) {
28
28
var out SignatureFindRelatedAccounts_Output
29
29
30
-
params := map[string]interface{}{
31
-
"cursor": cursor,
32
-
"did": did,
33
-
"limit": limit,
30
+
params := map[string]interface{}{}
31
+
if cursor != "" {
32
+
params["cursor"] = cursor
33
+
}
34
+
params["did"] = did
35
+
if limit != 0 {
36
+
params["limit"] = limit
34
37
}
35
38
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.findRelatedAccounts", params, nil, &out); err != nil {
36
39
return nil, err
+7
-4
api/ozone/signaturesearchAccounts.go
+7
-4
api/ozone/signaturesearchAccounts.go
···
21
21
func SignatureSearchAccounts(ctx context.Context, c *xrpc.Client, cursor string, limit int64, values []string) (*SignatureSearchAccounts_Output, error) {
22
22
var out SignatureSearchAccounts_Output
23
23
24
-
params := map[string]interface{}{
25
-
"cursor": cursor,
26
-
"limit": limit,
27
-
"values": values,
24
+
params := map[string]interface{}{}
25
+
if cursor != "" {
26
+
params["cursor"] = cursor
27
+
}
28
+
if limit != 0 {
29
+
params["limit"] = limit
28
30
}
31
+
params["values"] = values
29
32
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.searchAccounts", params, nil, &out); err != nil {
30
33
return nil, err
31
34
}
+15
-6
api/ozone/teamlistMembers.go
+15
-6
api/ozone/teamlistMembers.go
···
20
20
func TeamListMembers(ctx context.Context, c *xrpc.Client, cursor string, disabled bool, limit int64, q string, roles []string) (*TeamListMembers_Output, error) {
21
21
var out TeamListMembers_Output
22
22
23
-
params := map[string]interface{}{
24
-
"cursor": cursor,
25
-
"disabled": disabled,
26
-
"limit": limit,
27
-
"q": q,
28
-
"roles": roles,
23
+
params := map[string]interface{}{}
24
+
if cursor != "" {
25
+
params["cursor"] = cursor
26
+
}
27
+
if disabled {
28
+
params["disabled"] = disabled
29
+
}
30
+
if limit != 0 {
31
+
params["limit"] = limit
32
+
}
33
+
if q != "" {
34
+
params["q"] = q
35
+
}
36
+
if len(roles) != 0 {
37
+
params["roles"] = roles
29
38
}
30
39
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.team.listMembers", params, nil, &out); err != nil {
31
40
return nil, err
+24
-9
api/ozone/verificationlistVerifications.go
+24
-9
api/ozone/verificationlistVerifications.go
···
29
29
func VerificationListVerifications(ctx context.Context, c *xrpc.Client, createdAfter string, createdBefore string, cursor string, isRevoked bool, issuers []string, limit int64, sortDirection string, subjects []string) (*VerificationListVerifications_Output, error) {
30
30
var out VerificationListVerifications_Output
31
31
32
-
params := map[string]interface{}{
33
-
"createdAfter": createdAfter,
34
-
"createdBefore": createdBefore,
35
-
"cursor": cursor,
36
-
"isRevoked": isRevoked,
37
-
"issuers": issuers,
38
-
"limit": limit,
39
-
"sortDirection": sortDirection,
40
-
"subjects": subjects,
32
+
params := map[string]interface{}{}
33
+
if createdAfter != "" {
34
+
params["createdAfter"] = createdAfter
35
+
}
36
+
if createdBefore != "" {
37
+
params["createdBefore"] = createdBefore
38
+
}
39
+
if cursor != "" {
40
+
params["cursor"] = cursor
41
+
}
42
+
if isRevoked {
43
+
params["isRevoked"] = isRevoked
44
+
}
45
+
if len(issuers) != 0 {
46
+
params["issuers"] = issuers
47
+
}
48
+
if limit != 0 {
49
+
params["limit"] = limit
50
+
}
51
+
if sortDirection != "" {
52
+
params["sortDirection"] = sortDirection
53
+
}
54
+
if len(subjects) != 0 {
55
+
params["subjects"] = subjects
41
56
}
42
57
if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil {
43
58
return nil, err
+19
-6
lex/type_schema.go
+19
-6
lex/type_schema.go
···
3
3
import (
4
4
"fmt"
5
5
"io"
6
+
"slices"
6
7
"strings"
7
8
)
8
9
···
145
146
queryparams := "nil"
146
147
if s.Parameters != nil {
147
148
queryparams = "params"
148
-
pf(`
149
-
params := map[string]interface{}{
150
-
`)
149
+
pf("\n\tparams := map[string]interface{}{}\n")
151
150
if err := orderedMapIter(s.Parameters.Properties, func(name string, t *TypeSchema) error {
152
-
pf(`"%s": %s,
153
-
`, name, name)
151
+
if slices.Contains(s.Parameters.Required, name) || slices.Contains(s.Parameters.Nullable, name) {
152
+
pf("params[\"%s\"] = %s\n", name, name)
153
+
} else {
154
+
// if parameter isn't required, only include conditionally
155
+
switch t.Type {
156
+
case "integer":
157
+
pf("if %s != 0 { params[\"%s\"] = %s }\n", name, name, name)
158
+
case "string":
159
+
pf("if %s != \"\" { params[\"%s\"] = %s }\n", name, name, name)
160
+
case "array":
161
+
pf("if len(%s) != 0 { params[\"%s\"] = %s }\n", name, name, name)
162
+
case "boolean":
163
+
pf("if %s { params[\"%s\"] = %s }\n", name, name, name)
164
+
default:
165
+
return fmt.Errorf("unhandled query param type: %s", t.Type)
166
+
}
167
+
}
154
168
return nil
155
169
}); err != nil {
156
170
return err
157
171
}
158
-
pf("}\n")
159
172
}
160
173
161
174
var reqtype string