init pocketbase logic for microblog posts

This commit is contained in:
Travis Shears 2025-09-27 10:07:45 +02:00
parent 216ace7afa
commit 654df98711
7 changed files with 273 additions and 17 deletions

View file

@ -0,0 +1,19 @@
package microblog
import (
"fmt"
"log"
)
func main() {
client := NewPocketBaseClient()
fmt.Println("Getting page 1 of microblog posts")
posts, err := client.GetPosts(1)
if err != nil {
log.Printf("Error getting posts: %v", err)
} else {
fmt.Printf("Got first page of microblog posts\n")
fmt.Printf("First post: %v\n", posts[0])
}
}