MCPcopy Index your code
hub / github.com/Preloading/TwitterAPIBridge / likes_timeline

Function likes_timeline

twitterv1/post_viewing.go:76–90  ·  view source on GitHub ↗
(c *fiber.Ctx)

Source from the content-addressed store, hash-verified

74}
75
76func likes_timeline(c *fiber.Ctx) error {
77 // We shall pretend that the only thing it can be is a user id. TODO: maybe rectify this later
78 actor := c.Params("id")
79 actorInt, err := strconv.ParseInt(actor, 10, 64)
80 if err != nil {
81 return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden)
82 }
83 actorPtr, err := bridge.TwitterIDToBlueSky(&actorInt)
84 if err != nil {
85 return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden)
86 }
87 actor = *actorPtr
88
89 return convert_timeline(c, actor, false, blueskyapi.GetActorLikes)
90}
91
92// https://web.archive.org/web/20120508224719/https://dev.twitter.com/docs/api/1/get/statuses/home_timeline
93func convert_timeline(c *fiber.Ctx, param string, requireAuth bool, fetcher func(string, string, string, string, int) (*blueskyapi.Timeline, error)) error {

Callers

nothing calls this directly

Calls 3

TwitterIDToBlueSkyFunction · 0.92
ReturnErrorFunction · 0.85
convert_timelineFunction · 0.85

Tested by

no test coverage detected