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