@@ -22,7 +22,11 @@ type TweetsRoot struct {
2222}
2323
2424func home_timeline (c * fiber.Ctx ) error {
25- return convert_timeline (c , "" , blueskyapi .GetTimeline )
25+ return convert_timeline (c , "" , true , blueskyapi .GetTimeline )
26+ }
27+
28+ func hot_post_timeline (c * fiber.Ctx ) error {
29+ return convert_timeline (c , "" , true , blueskyapi .GetHotPosts )
2630}
2731
2832func user_timeline (c * fiber.Ctx ) error {
@@ -42,7 +46,7 @@ func user_timeline(c *fiber.Ctx) error {
4246 }
4347 actor = * actorPtr
4448 }
45- return convert_timeline (c , actor , blueskyapi .GetUserTimeline )
49+ return convert_timeline (c , actor , false , blueskyapi .GetUserTimeline )
4650}
4751
4852func media_timeline (c * fiber.Ctx ) error {
@@ -62,7 +66,7 @@ func media_timeline(c *fiber.Ctx) error {
6266 }
6367 actor = * actorPtr
6468 }
65- return convert_timeline (c , actor , blueskyapi .GetMediaTimeline )
69+ return convert_timeline (c , actor , false , blueskyapi .GetMediaTimeline )
6670}
6771
6872func likes_timeline (c * fiber.Ctx ) error {
@@ -78,11 +82,11 @@ func likes_timeline(c *fiber.Ctx) error {
7882 }
7983 actor = * actorPtr
8084
81- return convert_timeline (c , actor , blueskyapi .GetActorLikes )
85+ return convert_timeline (c , actor , false , blueskyapi .GetActorLikes )
8286}
8387
8488// https://web.archive.org/web/20120508224719/https://dev.twitter.com/docs/api/1/get/statuses/home_timeline
85- func convert_timeline (c * fiber.Ctx , param string , fetcher func (string , string , string , string , int ) (error , * blueskyapi.Timeline )) error {
89+ func convert_timeline (c * fiber.Ctx , param string , requireAuth bool , fetcher func (string , string , string , string , int ) (error , * blueskyapi.Timeline )) error {
8690 // Get all of our keys, beeps, and bops
8791 _ , pds , _ , oauthToken , err := GetAuthFromReq (c )
8892
0 commit comments