You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,7 +13,7 @@ Zendesk API client library for Go
12
13
13
14
## Installation
14
15
15
-
```shell
16
+
```shell
16
17
$ go get github.com/nukosuke/go-zendesk
17
18
```
18
19
@@ -48,14 +49,48 @@ func main() {
48
49
```
49
50
50
51
## Want to mock API?
52
+
51
53
go-zendesk has a [mock package](https://pkg.go.dev/github.com/nukosuke/go-zendesk/zendesk/mock) generated by [golang/mock](https://github.com/golang/mock).
52
54
You can simulate the response from Zendesk API with it.
53
55
54
56
## To regenerate the mock client
55
57
56
58
`go generate ./...`
57
59
60
+
## To regenerate CBP(Cursor Based Pagination), OBP(Offset Based Pagination) helper function and Iterators
61
+
62
+
If a new API endpoint supports CBP, add a new element to the funcData in script/codegen/main.go file like this:
63
+
64
+
```go
65
+
{
66
+
FuncName: "Automations",
67
+
ObjectName: "Automation",
68
+
ApiEndpoint: "/automation.json",
69
+
JsonName: "automations",
70
+
FileName: "automation",
71
+
},
72
+
```
73
+
should use the script to generate the helper functions and the iterator
0 commit comments