Age | Commit message (Collapse) | Author |
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata_api/wiki.py: Remove FIXME comment.
* gn3/db/wiki.py: Fix type error.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
In HTTP, we use content negotiation to server different
representations of a resource to the same URI to help the user agent
specify which representation is best suited for the user:
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation>
The "Accept" requet HTTP indicates which content types the user is
supposed to understand:
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept>
* gn3/api/metadata_api/wiki.py (get_wiki_entries): Use the "Accept"
header.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata_api/wiki.py: Import get_comment_history.
(get_history): New end-point.
* gn3/db/rdf/wiki.py: (get_comment_history): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
This makes sure that the API is always consistent.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import constants from gn3.db.rdf
* gn3/api/metadata_api/wiki.py: Ditto. Import
"get_wiki_entries_by_symbol" from gn3.db.rdf.wiki.
* gn3/db/constants.py: Delete file and move all constants ...
* gn3/db/rdf.py: ... and functions ...
* gn3/db/rdf/__init__.py: ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/constants.py [BASE_CONTEXT]: Remove "id" key.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py (get_wiki_entries_by_symbol): Update query to fetch
the latest query by the version.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/db/rdf.py (get_wiki_entries_by_symbol): Add "created" to
dictionary.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/errors.py (handle_sparql_errors): Correct the doc-string.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/errors.py (url_server_error): Return a 500 http status code for
URL server errors.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py (get_wiki_entries): Move this...
* gn3/api/metadata_api/wiki.py (edit_wiki): ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata_api/wiki.py (edit_wiki): Ignore type-check for
payload.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Remove duplicate imports.
* gn3/db/constants.py: Add docstring.
* gn3/db/rdf.py (get_wiki_entries_by_symbol): Remove duplicate
dictionary key.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/errors.py (handle_sparql_errors): Use the exception's class name
to fetch the status code.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py (get_wiki_entries): Return an empty {} when
there's no data.
* gn3/db/rdf.py (query_frame_and_compact): Delete check for empty
results. Instead just return the context as is.
(query_and_compact): Ditto.
(query_and_frame): Ditto.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|