Open NicoleJaneway opened 3 years ago
@NicoleJaneway In a way, yes. poetrydb.org/linecount/x
where x
is an integer of your choosing returns poems with exactly that line count. For example, for x = 10, the endpoint will only return poems that have a line count of ten. I made a helper method for my use case to generate a random number up to my desired max line-count to hit the API to kind of simulate max line-count.
Thanks, @jamogriff
Right now, the workaround I'm using is to requery the API if the random poem returned has a line length > the desired maximum.
Please reconsider adding a maximum linecount.
I would absolutely love this functionality!
It would also reduce traffic, since users would not need to requery the API when the poem length is larger than what they need.
Is there a way to set a maximum linecount when returning random poems? Thanks!