X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c26ab6ee15974c1133a6d08c459b51199185f25f..ae60b2a3949e96357477cc04f90fd0873cee8a92:/apps/api/templates/api/main.html diff --git a/apps/api/templates/api/main.html b/apps/api/templates/api/main.html deleted file mode 100755 index 8b6805945..000000000 --- a/apps/api/templates/api/main.html +++ /dev/null @@ -1,86 +0,0 @@ -{% extends "base.html" %} -{% load url from future %} -{% load i18n %} -{% load common_tags %} - -{% block title %}{% trans "WolneLektury.pl API" %}{% endblock %} - -{% block bodyid %}api{% endblock %} - -{% block body %} - -
-{% url "api" as u %}
-{% blocktrans with u=u|build_absolute_uri:request %}
-WolneLektury.pl API resides under {{ u }}
.
-You can use it to access information about books, their fragments and
-their metadata.
-{% endblocktrans %}
-
-{% blocktrans %}
-Default data serialization format is
-JSON,
-but you can also use XML by appending ?format=xml
-query parameter to each URL.
-{% endblocktrans %}
-
-{% blocktrans %} -The URLs in WolneLektury.pl API are: -{% endblocktrans %} -
- --{% url "api_book" "studnia-i-wahadlo" as e1 %} -{% url "api_tag" "authors" "edgar-allan-poe" as e2 %} -{% blocktrans %} -Each element of those lists contains a link (in a "href") attibute -which points to individual resource's details, i.e.: -{{e1}} or -{{e2}}. -{% endblocktrans %} -
- --{% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %} -You can combine authors, epochs, genres and kinds to find only books matching -those criteria. For instance: -{{e}}. -{% endblocktrans %} -
- --{% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %} -If you only want top-level books and not all the children, you can use /parent_books/, as in: -{{e}}. -{% endblocktrans %} -
- --{% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %} -{% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %} -The same way, using also books and themes, you can search for a list of fragments: -{{e}}. -Again, each entry has a "href" attribute which links to the fragment's details, i.e.: -{{f}}. -{% endblocktrans %} -
-