X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f82fa14e5f5b02994272fc0b588e557d5be6f2a4..3c0e373447323b5e33b273859e790a2054771afa:/src/api/templates/api/main.html diff --git a/src/api/templates/api/main.html b/src/api/templates/api/main.html index 04244dc91..67ff426fe 100755 --- a/src/api/templates/api/main.html +++ b/src/api/templates/api/main.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base/base.html" %} {% load i18n %} {% load build_absolute_uri from fnp_common %} @@ -7,91 +7,90 @@ {% 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 %}
+
-{% 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 %}
-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 %} +
--{% 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 %} +
--{% 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/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 %} +
--{% 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 %} -
-+ {% 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 %} +
+