6
+
appbsky "github.com/bluesky-social/indigo/api/bsky"
"github.com/edavis/bsky-feeds/pkg/mostliked"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
Feed string `query:"feed"`
Limit int64 `query:"limit"`
Offset string `query:"offset"`
17
-
type SkeletonResponse struct {
18
-
Cursor string `json:"cursor,omitempty"`
19
-
Feed []Post `json:"feed"`
type SkeletonHeader struct {
return c.String(http.StatusBadRequest, "bad request")
32
+
var posts []*appbsky.FeedDefs_SkeletonFeedPost
uris := mostliked.Feed(mostliked.FeedViewParams{
for _, uri := range uris {
47
-
posts = append(posts, Post{uri})
39
+
posts = append(posts, &appbsky.FeedDefs_SkeletonFeedPost{Post: uri})
49
-
response := SkeletonResponse{
42
+
return c.JSON(http.StatusOK, appbsky.FeedGetFeedSkeleton_Output{
52
-
return c.JSON(http.StatusOK, response)