init repo from gemini capsule project
This commit is contained in:
commit
cc78733a45
10 changed files with 901 additions and 0 deletions
19
internal/microblog/pocketbase_example.go
Normal file
19
internal/microblog/pocketbase_example.go
Normal 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])
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue