Skip to content

Backend for Lingo, a vocabulary-learning app. School Without Walls's submission to the Congressional App Challenge 2018 for DC-00.

Notifications You must be signed in to change notification settings

sww-programming-club/lingo-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CACH Challenge Backend

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/.

API methods

getDefinition

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" }
}

getQuestion

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"]
    }
]

getHint

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.

About

Backend for Lingo, a vocabulary-learning app. School Without Walls's submission to the Congressional App Challenge 2018 for DC-00.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages