mirror of
https://github.com/badkaktus/gorocket.git
synced 2025-07-07 00:45:43 +02:00
add pagination example to readme
This commit is contained in:
@ -82,5 +82,14 @@ if err != nil {
|
|||||||
}
|
}
|
||||||
fmt.Printf("Message was posted %t", msg.Success)
|
fmt.Printf("Message was posted %t", msg.Success)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
If endpoint support pagination, you can use that like this:
|
||||||
|
```go
|
||||||
|
// sort field in map. 1 - asc, -1 - desc
|
||||||
|
srt := map[string]int{"_updatedAt": 1, "name": -1}
|
||||||
|
|
||||||
|
client.Count(10).Offset(10).Sort(srt).ChannelList()
|
||||||
|
```
|
||||||
## PS
|
## PS
|
||||||
Feel free to create issue for add new endpoint to this client
|
Feel free to create issue for add new endpoint to this client
|
Reference in New Issue
Block a user