1 {% extends "base.html" %}
5 {% block title %}{% trans "WolneLektury.pl API" %}{% endblock %}
7 {% block bodyid %}api{% endblock %}
13 <div class="normal-text white-box">
16 {% blocktrans with u=u|build_absolute_uri:request %}
17 WolneLektury.pl API resides under <code>{{ u }}</code>.
18 You can use it to access information about books, their fragments and
25 Default data serialization format is
26 <a href="http://en.wikipedia.org/wiki/JSON">JSON</a>,
27 but you can also use XML by appending <code>?format=xml</code>
28 query parameter to each URL.
34 The URLs in WolneLektury.pl API are:
39 <li><a href='{% url "api_book_list" "" %}'>
40 {% url "api_book_list" "" %}</a> – {% trans "All books" %}
41 <li><a href='{% url "api_audiobook_list" "" %}'>
42 {% url "api_audiobook_list" "" %}</a> – {% trans "Audiobooks" %}
43 <li><a href='{% url "api_daisy_list" "" %}'>
44 {% url "api_daisy_list" "" %}</a> – {% trans "DAISY" %}
46 <li><a href='{% url "api_tag_list" "authors" %}'>
47 {% url "api_tag_list" "authors" %}</a> – {% trans "List of all authors" %}</li>
48 <li><a href='{% url "api_tag_list" "epochs" %}'>
49 {% url "api_tag_list" "epochs" %}</a> – {% trans "List of all epochs" %}</li>
50 <li><a href='{% url "api_tag_list" "genres" %}'>
51 {% url "api_tag_list" "genres" %}</a> – {% trans "List of all genres" %}</li>
52 <li><a href='{% url "api_tag_list" "kinds" %}'>
53 {% url "api_tag_list" "kinds" %}</a> – {% trans "List of all kinds" %}</li>
55 <li><a href='{% url "api_tag_list" "themes" %}'>
56 {% url "api_tag_list" "themes" %}</a> – {% trans "List of all themes" %}</li>
60 {% url "api_book" "studnia-i-wahadlo" as e1 %}
61 {% url "api_tag" "authors" "edgar-allan-poe" as e2 %}
63 Each element of those lists contains a link (in a "href") attibute
64 which points to individual resource's details, i.e.:
65 <a href="{{e1}}">{{e1}}</a> or
66 <a href="{{e2}}">{{e2}}</a>.
71 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %}
72 You can combine authors, epochs, genres and kinds to find only books matching
73 those criteria. For instance:
74 <a href="{{e}}">{{e}}</a>.
79 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %}
80 If you only want top-level books and not all the children, you can use /parent_books/, as in:
81 <a href="{{e}}">{{e}}</a>.
86 {% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %}
87 {% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %}
88 The same way, using also books and themes, you can search for a list of fragments:
89 <a href="{{e}}">{{e}}</a>.
90 Again, each entry has a "href" attribute which links to the fragment's details, i.e.:
91 <a href="{{f}}">{{f}}</a>.