Giter VIP home page Giter VIP logo

poetrydb's People

Contributors

dependabot[bot] avatar klzheng avatar thundercomb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poetrydb's Issues

Data source

Out of curiosity, where is the data sourced from?

Getting all authors

Hi,

It seems like /authors only returns the first 128 authors. How do I get the rest?

Random Poem call in JSON/AJAX

@thundercomb Do you know what parameters should I retrieve and pass in AJAX for getting a random poem? I tried understanding the ruby one but unfortunately I don't know ruby.

Linecount comparison is not correct

If I query the following URL

http://poetrydb.org/linecount/5

then the output contains poems with the number of lines where 5 is encountered in linecount at any place.

To clarify,
For the above url, the output will contain poems with linecount as 25, 50, 105, 5, 15, etc.

If you specify it as http://poetrydb.org/linecount/10 it will return poems with linecount as 103, 105, 10, 100, etc.

So, basically there is a string.contains comparison that is taking place instead of a string.equals comparison.

Expand test cases

Expand test cases to be more reflective of the different types of API calls.

It would be useful to expand the test cases to cover the various types of documented end points, particularly the different types of input fields, and a good variety of combination searches.

The existing tests for failure cases appear to be fairly comprehensive already.

Allow case insensitive search

When searching by title, I noticed that the search seems to be case-sensitive. Could you modify the code to make it case insensitive?

Parentheses in poem title

I'm trying to grab "Song (Go And Catch A Falling Star)" by John Donne via requests in python, but I think the url is not being encoded properly. If I paste "http://poetrydb.org/title/Song (Go And Catch A Falling Star)/lines.json" into the address bar, I get a 404. How do I properly format this request?

Swagger/OAS

First of all, thanks for the great project 👍

And a question/suggestion here (potentially can help with a PR, if it's not opposed some internalized ideas/plans). Would be a big deal to add a Swagger (OAS) docs here for the API? Or maybe they are already present in some way?

Search and return random poems

There is already a simple endpoint to return a single random poem:

/random

It would be useful to combine this with other searches, for example to return 5 random Shakespeare sonnets:

/author,title,random/Shakespeare;Sonnet;5

Given the existing poemcount input and search fields, random and poemcount should be mutually exclusive.

Including poetry

I was building an api for my poetry. Is it ok to collaborate so I can include my poetry in poetry dB?

README.md formatting error

Hi, the documentation for the project is really good! But there seems to be some formatting errors towards the end of the README.md. If you go down and a little bit after the "Combinations" section, you can see that the code blocks are the titles, and the titles are in the code blocks

API AJAX Call

Guys I'm calling the API like this:
$(document).ready(function() { $("#submit").click(function(event) { var poet = $("#poet").val(); var title = $("#title").val(); var reppoet = poet.replace(" ", "%20"); var reptitle = title.replace(" ", "%20"); var url = <es6backtick>http://poetrydb.org/title,author/${reptitle};${reppoet}/author,title,linecount,lines.json</es6backtick>; $.ajax({ type: 'GET', url: url, success: function(data) { console.log(data); }, error: function(url){ console.log('Error!'+url); } }); }); });
It always goes to error and returns
"Error![object Object]"

Please help me out

Contributions/posting to DB

Is there any way we can add or contribute to the database? There's a ton of poems I'd love to see in here!

Link to Author Webpage

Gunctionality for including a link to a web page with the author's information. Webpage can be authors personal webpages or the webpage from a larger poetry database

Heroku Application Error

Hi maintainers! This API is really great. There's this issue when getting the random/4 or any number after random. However, random/ works fine but random/4 or any number throws the attached error. It was working fine a couple of weeks ago.

Screenshot from 2020-09-23 22-49-15

Search for multiple terms not working

First the problem: when trying to search for two terms, authors in this case: this does not appear to give the results I believed I should expect... maybe I am misunderstanding something?

http://poetrydb.org/author/austen;bowles/title

Secondly, thank you so much for this wonderful database! It is invaluable for teaching about how to access apis with kids learning to code.

Thirdly, I know this isn't a support forum! But I promise I have tried to read the docs carefully :-) If I have simply misunderstood the api documentation, when I understand it, I promise I will write a suggested addition to the help files for people like me who are too dumb to work it out!

Best wishes

API Is Down

Upon querying the API, or visiting poetrydb.org, the following message is displayed:

Application error

An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.
You can do this from the Heroku CLI with the command heroku logs —tail

No access control allow-origin in header

I am having an issue (image attached). From searching online it looks like there is a line of code you could add on your end so that we would be able overcome this issue. I would greatly appreciate any help on this matter. I am very excited to work with this wonderful looking tool. thank you
screen shot 2016-10-20 at 9 23 37 am

Limit the number of results?

Some of my calls return a large amount of information, which is a lot to download and takes more time than is expected by most users. Is there a way to limit the number of results?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.