openjusticebe / ecli

ECLI API of internet accessible case law
https://ecli.openjustice.be
GNU General Public License v3.0
2 stars 0 forks source link

Add pagination #11

Open tintamarre opened 3 years ago

tintamarre commented 3 years ago
curl -X GET "https://ecli.openjustice.be/BE/RVSCDE/2010/" -H "accept: application/json" > data.json && wc -c data.json 
  384510 data.json

Proposition of schema for pagination:

{
   "total": 4700,
   "per_page": 40,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "/BE/RVSCDE/2010/?page=1",
   "last_page_url": "/BE/RVSCDE/2010/?page=118",
   "next_page_url": "/BE/RVSCDE/2010/?page=2",
   "prev_page_url": null,
   "path": "https://ecli.openjustice.be",
   "from": 1,
   "to": 40,
   "data":[
        {
            // Result Object
        },
        {
            // Result Object
        }
   ]
}