gitfrosh / lotr-api

This repository holds the code base of the API to rule them all, the Lord of the Rings api, which provides you with book, character, movie and quotes data.
https://the-one-api.dev
238 stars 66 forks source link

Add default sort order for chapters #32

Closed LarsenJMarquardt closed 3 years ago

LarsenJMarquardt commented 3 years ago

Currently the book chapters are returned in no particular order and cannot be sorted according to any information that the API contains. The only way to sort them is to already know the correct order and sort against it.

Option 1: The id's are given chronologically to each chapter, so the chapters can be sorted by id.

Option 2: Adding a chapter column, where each chapter receives a number. LotR is divided into several books, so it would have to be non unique, as there will be multiple chapter 1, but could still be sorted, if given a book id as well.