Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

/api/texts next/previous jump by top level section, even if the ref is more granular

Open ronshapiro opened this issue 4 years ago • 1 comments

  • https://www.sefaria.org/api/texts/Genesis.1.3?context=0 has next: "Genesis 2" and no previous (i.d expect Genesis 1.4, and a previous of Genesis 1.2)
  • https://www.sefaria.org/api/texts/Shabbat.24b.3?context=0 has previous: "Shabbat 24a", next: "Shabbat 25a" (I'd expect Shabbat.24b.2 and Shabbat 24b.4, respectively)

ronshapiro avatar Jan 18 '21 21:01 ronshapiro

@EliezerIsrael what do you think of this suggestion? It seems the use case for next and previous is so that the client knows what valid refs can be requested to get next / prev content. So if you request ?context=0 you can expect the client will want to request the next segment ref.

nsantacruz avatar Jan 19 '21 08:01 nsantacruz