Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CursorPagination ¶
type CursorPagination[T any] struct { Data []T `json:"data"` NextCursor string `json:"next_cursor"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field NextCursor respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` // contains filtered or unexported fields }
func (*CursorPagination[T]) GetNextPage ¶
func (r *CursorPagination[T]) GetNextPage() (res *CursorPagination[T], err error)
GetNextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error
func (CursorPagination[T]) RawJSON ¶
func (r CursorPagination[T]) RawJSON() string
Returns the unmodified JSON received from the API
func (*CursorPagination[T]) SetPageConfig ¶
func (r *CursorPagination[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*CursorPagination[T]) UnmarshalJSON ¶
func (r *CursorPagination[T]) UnmarshalJSON(data []byte) error
type CursorPaginationAutoPager ¶
type CursorPaginationAutoPager[T any] struct { // contains filtered or unexported fields }
func NewCursorPaginationAutoPager ¶
func NewCursorPaginationAutoPager[T any](page *CursorPagination[T], err error) *CursorPaginationAutoPager[T]
func (*CursorPaginationAutoPager[T]) All ¶ added in v0.13.0
func (r *CursorPaginationAutoPager[T]) All() iter.Seq[T]
func (*CursorPaginationAutoPager[T]) Current ¶
func (r *CursorPaginationAutoPager[T]) Current() T
func (*CursorPaginationAutoPager[T]) Err ¶
func (r *CursorPaginationAutoPager[T]) Err() error
func (*CursorPaginationAutoPager[T]) Index ¶
func (r *CursorPaginationAutoPager[T]) Index() int
func (*CursorPaginationAutoPager[T]) Next ¶
func (r *CursorPaginationAutoPager[T]) Next() bool