This is the backend for School Without Wall's submission to the Congressional App Challenge in the DC-00 region, written by Aryaman Arora and Nicolas Romero. It's written in Python using Flask and is hosted on Heroku at http://lingo-backend.herokuapp.com/.
Takes a comma-separated list of words and returns a JSON with the words and definitions from Wiktionary. If the word does not have an entry on Wiktionary, the definition
field for that word is an empty string and the returned response has the code 400 (Bad Request).
Usage: .../api/getDefinition/word1,word2,word3
Output:
{
"word1": { "definition": "def1" },
"word2": { "definition": "def2" },
"word3": { "definition": "def3" }
}
Takes an optional URL parameter count
and generates that many number of questions.
Usage: .../api/getQuestion[?count=n]
Output:
[
{
"answer": 1,
"definition": "Definition of word1.",
"options": ["word0", "word1", "word2", "word3"]
},
{
"answer": 2,
"definition": "Definition of word2.",
"options": ["word0", "word1", "word2", "word3"]
}
]
Take an optional URL parameter info
and returns that specific piece of information about that word. Currently, etymology
, synonyms
, examples
, and part_of_speech
are supported. If the parameter info
is not passed a random piece of information is returned.