(c *fiber.Ctx)
| 54 | } |
| 55 | |
| 56 | func media_timeline(c *fiber.Ctx) error { |
| 57 | actor := c.Query("screen_name") |
| 58 | if actor == "" { |
| 59 | actor = c.Query("user_id") |
| 60 | if actor == "" { |
| 61 | return ReturnError(c, "No user provided", 195, fiber.StatusForbidden) |
| 62 | } |
| 63 | actorInt, err := strconv.ParseInt(actor, 10, 64) |
| 64 | if err != nil { |
| 65 | return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden) |
| 66 | } |
| 67 | actorPtr, err := bridge.TwitterIDToBlueSky(&actorInt) |
| 68 | if err != nil { |
| 69 | return ReturnError(c, "Invalid user_id provided", 195, fiber.StatusForbidden) |
| 70 | } |
| 71 | actor = *actorPtr |
| 72 | } |
| 73 | return convert_timeline(c, actor, false, blueskyapi.GetMediaTimeline) |
| 74 | } |
| 75 | |
| 76 | func 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 |
nothing calls this directly
no test coverage detected