22 lines
459 B
Go
22 lines
459 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
"gemini_site/internal/pocketbase"
|
|
)
|
|
|
|
func main() {
|
|
pbClient := pocketbase.NewPocketBaseClient()
|
|
res, err := pbClient.GetList("micro_blog_posts", 1, 10, "-posted")
|
|
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", res)
|
|
}
|
|
}
|