X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/82c3054bcdeb000aa9782da80d644070797b5cbe..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 04244dc91..000000000 --- a/apps/api/templates/api/main.html +++ /dev/null @@ -1,97 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load build_absolute_uri from fnp_common %} - -{% block title %}{% trans "WolneLektury.pl API" %}{% endblock %} - -{% block bodyid %}api{% endblock %} - -{% block body %} - -

API

- -
-

-{% 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 %} -

-
-{% endblock %}