Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { // Order of the resources in the response. desc (default), asc. // Order is optional. Order string `query:"order" form:"order" json:"order" xml:"order"` // Limit number of results per call. Accepted values: 0 - 100. Default 25 // Limit is optional. Limit int `query:"limit" form:"limit" json:"limit" xml:"limit"` // StartingAfter is a cursor for use in pagination. // StartingAfter is a resource ID that defines your place in the list. // StartingAfter is optional. StartingAfter *string `query:"starting_after" form:"starting_after" json:"starting_after" xml:"starting_after"` // EndingBefore is cursor for use in pagination. // EndingBefore is a resource ID that defines your place in the list. // EndingBefore is optional. EndingBefore *string `query:"ending_before" form:"ending_before" json:"ending_before" xml:"ending_before"` }
Request is a parameter to return list of data with pagination. Request is optional, most fields automatically filled by system. If you already have a response with pagination, you can generate pagination request directly to traverse next or prev page.
func (Request) QueryParams ¶
type Response ¶
type Response struct { Order string `query:"order" form:"order" json:"order" xml:"order"` StartingAfter *string `query:"starting_after" form:"starting_after" json:"starting_after" xml:"starting_after"` EndingBefore *string `query:"ending_before" form:"ending_before" json:"ending_before" xml:"ending_before"` Total int `query:"total" form:"total" json:"total" xml:"total"` Yielded int `query:"yielded" form:"yielded" json:"yielded" xml:"yielded"` Limit int `query:"limit" form:"limit" json:"limit" xml:"limit"` PreviousURI *string `query:"previous_uri" form:"previous_uri" json:"previous_uri" xml:"previous_uri"` NextURI *string `query:"next_uri" form:"next_uri" json:"next_uri" xml:"next_uri"` // CursorRange returns cursors for starting after and ending before. // Format: [starting_after, ending_before]. CursorRange []string `query:"cursor_range" form:"cursor_range" json:"cursor_range" xml:"cursor_range"` }
func (*Response) HasNextPage ¶
HasNextPage returns true if next page exists and can be traversed.
func (*Response) HasPrevPage ¶
HasPrevPage returns true if prev page exists and can be traversed.
func (*Response) NextPageCursor ¶
NextPageCursor returns cursor to be used as starting after value.
func (*Response) NextPageRequest ¶
NextPageRequest returns pagination request for the next page result.
func (*Response) PrevPageCursor ¶
PrevPageCursor returns cursor to be used as ending before value.
func (*Response) PrevPageRequest ¶
PrevPageRequest returns pagination request for the prev page result.