1 {% extends "2022/base_simple.html" %}
3 {% load build_absolute_uri from fnp_common %}
7 {% trans "WolneLektury.pl API" as title %}
11 {% block title %}{% trans "WolneLektury.pl API" %}{% endblock %}
13 {% block bodyid %}api{% endblock %}
18 <div class="normal-text white-box">
21 {% blocktrans with u=u|build_absolute_uri:request %}
22 WolneLektury.pl API resides under <code>{{ u }}</code>.
23 You can use it to access information about books, their fragments and
30 Default data serialization format is
31 <a href="http://en.wikipedia.org/wiki/JSON">JSON</a>,
32 but you can also use XML by appending <code>?format=xml</code>
33 query parameter to each URL.
39 The URLs in WolneLektury.pl API are:
44 <li><a href='{% url "catalogue_api_book_list" "" %}'>
45 {% url "catalogue_api_book_list" "" %}</a> – {% trans "All books" %}</li>
46 <li><a href='{% url "catalogue_api_audiobook_list" "" %}'>
47 {% url "catalogue_api_audiobook_list" "" %}</a> – {% trans "Audiobooks" %}</li>
48 <li><a href='{% url "catalogue_api_daisy_list" "" %}'>
49 {% url "catalogue_api_daisy_list" "" %}</a> – {% trans "DAISY" %}</li>
51 <li><a href='{% url "catalogue_api_tag_list" "author" %}'>
52 {% url "catalogue_api_tag_list" "author" %}</a> – {% trans "List of all authors" %}</li>
53 <li><a href='{% url "catalogue_api_tag_list" "epoch" %}'>
54 {% url "catalogue_api_tag_list" "epoch" %}</a> – {% trans "List of all epochs" %}</li>
55 <li><a href='{% url "catalogue_api_tag_list" "genre" %}'>
56 {% url "catalogue_api_tag_list" "genre" %}</a> – {% trans "List of all genres" %}</li>
57 <li><a href='{% url "catalogue_api_tag_list" "kind" %}'>
58 {% url "catalogue_api_tag_list" "kind" %}</a> – {% trans "List of all kinds" %}</li>
60 <li><a href='{% url "catalogue_api_tag_list" "theme" %}'>
61 {% url "catalogue_api_tag_list" "theme" %}</a> – {% trans "List of all themes" %}</li>
62 <li><a href='{% url "catalogue_api_collections" %}'>
63 {% url "catalogue_api_collections" %}</a> – {% trans "Collections" %}</li>
67 {% url "catalogue_api_book" "studnia-i-wahadlo" as e1 %}
68 {% url "catalogue_api_tag" "author" "edgar-allan-poe" as e2 %}
70 Each element of those lists contains a link (in a "href") attibute
71 which points to individual resource's details, i.e.:
72 <a href="{{e1}}">{{e1}}</a> or
73 <a href="{{e2}}">{{e2}}</a>.
78 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %}
79 You can combine authors, epochs, genres and kinds to find only books matching
80 those criteria. For instance:
81 <a href="{{e}}">{{e}}</a>.
86 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %}
87 If you only want top-level books and not all the children, you can use /parent_books/, as in:
88 <a href="{{e}}">{{e}}</a>.
93 {% url "catalogue_api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %}
94 {% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %}
95 The same way, using also books and themes, you can search for a list of fragments:
96 <a href="{{e}}">{{e}}</a>.
97 Again, each entry has a "href" attribute which links to the fragment's details, i.e.:
98 <a href="{{f}}">{{f}}</a>.