Skip to content

Commit

Permalink
Add FullList to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pluja authored Mar 15, 2024
1 parent 3b42b48 commit 82075fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,25 @@ import (

func main() {
client := pocketbase.NewClient("http://localhost:8090")

// You can list with pagination:
response, err := client.List("posts_public", pocketbase.ParamsList{
Page: 1, Size: 10, Sort: "-created", Filters: "field~'test'",
})
if err != nil {
log.Fatal(err)
}
log.Print(response.TotalItems)

// Or you can use the FullList method (v0.0.7)
response, err := client.FullList("posts_public", pocketbase.ParamsList{
Sort: "-created", Filters: "field~'test'",
})
if err != nil {
log.Fatal(err)
}

log.Print(response.TotalItems)
}
```
Creating an item with admin user (auth via email/pass).
Expand Down

0 comments on commit 82075fd

Please sign in to comment.