Skip to content

Improve PaginationResponse #178

Open
@mojtaba-esk

Description

@mojtaba-esk

Currently PaginationResponse has the following fields:

type PaginationResponse struct {
	Total  int `json:"total"`  // Total number of values
	Page   int `json:"page"`   // Current page number
	Limit  int `json:"limit"`  // Number of items per page
	Offset int `json:"offset"` // Offset from start of results
}

All the client needs is the total pages and will be nice to have the current page as well. Therefore, it is suggested to modify it to the following:

type PaginationResponse struct {
	TotalPges  int `json:"total_pages"`  // Total number of pages
	Page   int `json:"page"`   // Current page number
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions