EvoEsports / EvoSC-sharp

Next generation server controller for Trackmania written in C# using .NET 8.
https://evosc.io
GNU General Public License v3.0
21 stars 13 forks source link

[Feature] Pagination for data #95

Open araszka opened 1 year ago

araszka commented 1 year ago

Describe the solution you'd like A paginator class, which takes a sub-set of data from a bigger pool (Collection, Query-Results, ...) and adds meta information like page, per_page, last_page.

Additional context Example: A player searches a map in the map-list and sorts the result by author-name.

The contents of the paginator could like this:

{
  "page": 3,
  "per_page": 20,
  "last_page": 7,
  "data": [ ... ],
  "meta": {
    "filter": "searchterm",
    "sort": [
      {"column": "some_col", "direction": "DESC"}
    ]
  },
}