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

THANK YOU SO MUCH and a request for help... #37

Closed
LinkBenjamin opened this issue Dec 1, 2022 · 3 comments
Closed

THANK YOU SO MUCH and a request for help... #37

LinkBenjamin opened this issue Dec 1, 2022 · 3 comments

Comments

@LinkBenjamin
Copy link

First of all, thank you for an incredible resource. I'm part of a book club that includes a first-time reader of the Silmarillion, and being able to use the dictionary here is greatly enriching our discussions!

That said, I noticed there are what appear to be API routes - is there an open public API exposed from the site? I'm not well-versed in PHP so I can't fully grok how it might work but I'd love to learn & build alongside if possible! I was thinking about using Twilio messaging to have a phone number - you send a word via SMS, it responds with the definition of the word.

@galadhremmin
Copy link
Owner

Oh, I definitely saw your attempts to reverse engineer the API in the logs! 🤣

I don't currently have a public API for the website. It's something I'd genuinely like to build though and I've got a separate stack I'm working on in C# (Dotnet Core) for this purpose, but it's a little ways off.

Is there anything I can build on Parf Edhellen to make the experience as convenient as the SMS service you have in mind? Is there any capability that we're missing? Or is it the performance that can be improved?

@LinkBenjamin
Copy link
Author

It's not necessarily a matter of performance - the site is working wonderfully. My idea was more about convenience, and (as a member of the Twilio Developer Relations team) a fun way to interact with the dictionary. Here's a youtube link to one of my coworkers describing a bit about how the last mile of my idea works: https://youtu.be/4jUMqutYmyE?t=1883

What we'd need from Parf Edhellen to enable it is a few controller-level methods that accept an input with a parameter and respond with something like a JSON string. So... if I hit https://www.elfdict.com/api/translate?query="A star shines on the hour of our meeting", for example, it would respond with an object containing the string "Elen síla lúmenn’ omentielvo", or maybe there could even be a version that returns it in Tengwar characters.

The best part about it is that you shouldn't need to rewrite the whole stack (unless you have other concerns)... just respond on certain routes with a formatted string instead of catching it and rendering a web page from it.

/translateEnglish?word="Elen"
/translateSindarin?word="Star"
/definition?query="Mordor"
/quotes?character="gimli",book="Return of the King"
/quotes/random (no parameters)

Those are just some general ideas here for things that could be fun that I thought of immediately - obviously we can find out from the audience what would be most interesting/valuable and prioritize building those.

@galadhremmin
Copy link
Owner

Please DM me over Twitter (@parmaeldo)! There are some infrastructure considerations we need to discuss.

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

No branches or pull requests

2 participants