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

Function user_timeline

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

Source from the content-addressed store, hash-verified

34}
35
36func user_timeline(c *fiber.Ctx) error {
37 actor := c.Query("screen_name")
38 if actor == "" {
39 actor = c.Query("user_id")
40 if actor == "" {
41 return ReturnError(c, "No user provided", 195, fiber.StatusForbidden)
42 }
43 actorInt, err := strconv.ParseInt(actor, 10, 64)
44 if err != nil {
45 return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden)
46 }
47 actorPtr, err := bridge.TwitterIDToBlueSky(&actorInt)
48 if err != nil {
49 return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden)
50 }
51 actor = *actorPtr
52 }
53 return convert_timeline(c, actor, false, blueskyapi.GetUserTimeline)
54}
55
56func media_timeline(c *fiber.Ctx) error {
57 actor := c.Query("screen_name")

Callers

nothing calls this directly

Calls 3

TwitterIDToBlueSkyFunction · 0.92
ReturnErrorFunction · 0.85
convert_timelineFunction · 0.85

Tested by

no test coverage detected