diff options
author | 2019-05-29 19:49:15 -0700 | |
---|---|---|
committer | 2019-05-29 19:49:15 -0700 | |
commit | b984cae055bdf621e86b0079badc012e46b906dc (patch) | |
tree | 0585661f636f8c4f17e2fa763de93801208337b9 | |
parent | Add basic logger for responses (diff) |
Revise docstrings for SnekAPI & EvalResource
-rw-r--r-- | snekbox/api/resources/eval.py | 9 | ||||
-rw-r--r-- | snekbox/api/snekapi.py | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/snekbox/api/resources/eval.py b/snekbox/api/resources/eval.py index 576a88c..b2f4260 100644 --- a/snekbox/api/resources/eval.py +++ b/snekbox/api/resources/eval.py @@ -10,19 +10,12 @@ log = logging.getLogger(__name__) class EvalResource: """ - JSON API for the evaluation of Python code. + Evaluation of Python code. Supported methods: - POST /eval Evaluate Python code and return the result - - Error response format: - - >>> { - ... "title": "Unsupported media type", - ... "description": "application/xml is an unsupported media type." - ... } """ REQ_SCHEMA = { diff --git a/snekbox/api/snekapi.py b/snekbox/api/snekapi.py index 87c32ad..849e7d6 100644 --- a/snekbox/api/snekapi.py +++ b/snekbox/api/snekapi.py @@ -6,12 +6,19 @@ from .resources import EvalResource class SnekAPI(falcon.API): """ - The main entry point to the Falcon application for the snekbox API. + The main entry point to the snekbox JSON API. Routes: - /eval Evaluation of Python code + + Error response format: + + >>> { + ... "title": "Unsupported media type", + ... "description": "application/xml is an unsupported media type." + ... } """ def __init__(self, *args, **kwargs): |