Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add features to the API #198

Open
bluzi opened this issue Oct 27, 2017 · 4 comments
Open

Add features to the API #198

bluzi opened this issue Oct 27, 2017 · 4 comments

Comments

@bluzi
Copy link
Owner

bluzi commented Oct 27, 2017

Currently, all the API can do is to search an exact name/alias in the database and return its meaning and translations.
We need more features, such as:

  • Search (/search/:term) - Should return a list of matches by a partial term (Search in both aliases/names)
  • Get translation (/:name/:language) - Should return the translation of :name in :language

Anything else you can think of :)

You can easily run the API just by cloning the repo and run npm install && npm start, then you should be able to browse to http://localhost:3000 and see the API is running.
Your clone will connect to the actual production database, however the user supplied there is only able to select, and is limited by its number of queries per hour.

If you need help or have any ideas, feel free to comment here.

@CodeWritingCow
Copy link
Collaborator

Hello bluzi, I'd like to give this a shot! Would you like /:name/:language to be an ISO 639-3 code or the full name of the language? (ex. "spanish" vs "spa")

@bluzi
Copy link
Owner Author

bluzi commented Oct 28, 2017

Hey @CodeWritingCow, great question :) I'm thinking: Why not both? if the input is 3 letters long, assume it's an ISO code. Otherwise, assume it's a full name of a language

@arminkhoshbin
Copy link
Collaborator

Added search endpoint in #228 :)

bashz added a commit to bashz/name-db that referenced this issue Oct 30, 2017
…rn the translation of `:name` in `:language`
bashz added a commit to bashz/name-db that referenced this issue Oct 30, 2017
…rn the translation of `:name` in `:language`
@roastchicken
Copy link
Collaborator

I created a proof of concept for the get translation endpoint, then realized someone had already started this in #217. Probably better them than me, I have no idea how Promises work so it was really hacked together. Just putting this here so people know that it's been started and don't spend time working on a duplicate feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants