init repo from gemini capsule project

This commit is contained in:
Travis Shears 2025-09-30 09:41:38 +02:00
commit cc78733a45
10 changed files with 901 additions and 0 deletions

23
test_pocketbase.go Normal file
View file

@ -0,0 +1,23 @@
package main
import (
"fmt"
"log/slog"
"gemini_site/internal/microblog"
"gemini_site/internal/pocketbase"
)
func main() {
pbClient := pocketbase.NewPocketBaseClient()
mb := microblog.NewMicroBlog(pbClient)
res, err := mb.GetRecentPosts(10)
// res, err := pbClient.GetList("micro_blog_posts", 1, 10, "-posted")
fmt.Println("Getting page 1 of microblog posts, 10 posts")
// posts, err := client.GetPosts(1)
if err != nil {
slog.Error("Error getting posts", "error", err)
} else {
slog.Info("Got microblog posts", "posts", res)
}
}