Closed jonfernq closed 1 year ago
Hi there, thanks for the comment! Unfortunately I have made no attempt to maintain functionality with poetryDB.org, though with a little work (it seems like you're almost there!) you should be able to get the lines from whatever structure the API responds with into the markov chain.
To follow up on this, your search returned a 404 because the author John Dunne does not exist. John Donne does exist, however no poem exists with a substring matching "The Flea" in its title, and so the request would still return a 404. The following: https://poetrydb.org/author,title/John%20Donne;Holy%20Sonnet works just fine
This project is so exciting ! :)
But.... just to let you know.... after downloading binaries:
Search for an Author? John Dunne and a title? The FLea checking author value... author == Some("John Dunne\r\n") checking title value... title == Some("The FLea\r\n") searching for substring matches by author name and work title given... request string: http://poetrydb.org/author,title/John Dunne;The FLea got Object!
JSON Object: { "status": 404, "reason": "Not found" }
couldn't get any lines from this object! Do you want to pause and curate a poem? ?? Y or N ??
Seems like the way in which URLs to retrieve JSON has changed. This works:
https://poetrydb.org/title,author/Winter;Shakespeare
Don't know Rust right now or I would delve into the code. :)
SIncerely, Jon Fernquest