-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pagenation.go
26 lines (23 loc) · 1.06 KB
/
pagenation.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package coincheck
// Pagination represents the pagination of coincheck API.
// It is possible to get by dividing the data.
type Pagination struct {
// Limit is the number of data to get.
Limit int `json:"limit"`
// PaginationOrder is the order of the data. You can specify "desc" or "asc".
PaginationOrder PaginationOrder `json:"order"`
// StartingAfter is the ID of the data to start getting.
// Greater than the specified ID. For example, if you specify 3, you will get data from ID 4.
StartingAfter int `json:"starting_after,omitempty"`
// EndingBefore is the ID of the data to end getting.
// Less than the specified ID. For example, if you specify 3, you will get data up to ID 2.
EndingBefore int `json:"ending_before,omitempty"`
}
// PaginationOrder represents the order of the pagination.
type PaginationOrder string
const (
// PaginationOrderDesc is the order of the pagination in descending order.
PaginationOrderDesc PaginationOrder = "desc"
// PaginationOrderAsc is the order of the pagination in ascending order.
PaginationOrderAsc PaginationOrder = "asc"
)