this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

manually update lexgen types to not send go zero vals as URL params

+55 -21
+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.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { 38 40 return nil, err
+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.Do(ctx, xrpc.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { 45 52 return nil, err 46 53 }
+3 -1
api/atproto/repogetRecord.go
··· 28 28 var out RepoGetRecord_Output 29 29 30 30 params := map[string]interface{}{ 31 - "cid": cid, 32 31 "collection": collection, 33 32 "repo": repo, 34 33 "rkey": rkey, 34 + } 35 + if cid != "" { 36 + params["cid"] = cid 35 37 } 36 38 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { 37 39 return nil, err
+4 -2
api/atproto/syncgetRepo.go
··· 19 19 buf := new(bytes.Buffer) 20 20 21 21 params := map[string]interface{}{ 22 - "did": did, 23 - "since": since, 22 + "did": did, 23 + } 24 + if since != "" { 25 + params["since"] = since 24 26 } 25 27 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil { 26 28 return nil, err
+7 -3
api/bsky/feedgetFeed.go
··· 21 21 var out FeedGetFeed_Output 22 22 23 23 params := map[string]interface{}{ 24 - "cursor": cursor, 25 - "feed": feed, 26 - "limit": limit, 24 + "feed": feed, 25 + } 26 + if cursor != "" { 27 + params["cursor"] = cursor 28 + } 29 + if limit != 0 { 30 + params["limit"] = limit 27 31 } 28 32 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil { 29 33 return nil, err
+7 -3
api/bsky/feedgetFeedSkeleton.go
··· 23 23 var out FeedGetFeedSkeleton_Output 24 24 25 25 params := map[string]interface{}{ 26 - "cursor": cursor, 27 - "feed": feed, 28 - "limit": limit, 26 + "feed": feed, 27 + } 28 + if cursor != "" { 29 + params["cursor"] = cursor 30 + } 31 + if limit != 0 { 32 + params["limit"] = limit 29 33 } 30 34 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedSkeleton", params, nil, &out); err != nil { 31 35 return nil, err
+6 -2
api/bsky/feedgetTimeline.go
··· 24 24 25 25 params := map[string]interface{}{ 26 26 "algorithm": algorithm, 27 - "cursor": cursor, 28 - "limit": limit, 27 + } 28 + if cursor != "" { 29 + params["cursor"] = cursor 30 + } 31 + if limit != 0 { 32 + params["limit"] = limit 29 33 } 30 34 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil { 31 35 return nil, err
+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 != false { 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