(c *fiber.Ctx)
| 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 |
| 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 |
| 93 | func convert_timeline(c *fiber.Ctx, param string, requireAuth bool, fetcher func(string, string, string, string, int) (*blueskyapi.Timeline, error)) error { |
nothing calls this directly
no test coverage detected