19 lines
349 B
Go
19 lines
349 B
Go
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])
|
|
}
|
|
|
|
}
|