init pocketbase logic for microblog posts
This commit is contained in:
parent
216ace7afa
commit
654df98711
7 changed files with 273 additions and 17 deletions
20
test_pocketbase.go
Normal file
20
test_pocketbase.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"gemini_site/internal/microblog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
client := microblog.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])
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue