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>
57 <li><a href='{% url "api_collections" %}'>
58 {% url "api_collections" %}</a> – {% trans "Collections" %}
62 {% url "api_book" "studnia-i-wahadlo" as e1 %}
63 {% url "api_tag" "authors" "edgar-allan-poe" as e2 %}
65 Each element of those lists contains a link (in a "href") attibute
66 which points to individual resource's details, i.e.:
67 <a href="{{e1}}">{{e1}}</a> or
68 <a href="{{e2}}">{{e2}}</a>.
73 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/books/" as e %}
74 You can combine authors, epochs, genres and kinds to find only books matching
75 those criteria. For instance:
76 <a href="{{e}}">{{e}}</a>.
81 {% blocktrans with "/api/authors/adam-mickiewicz/kinds/liryka/parent_books/" as e %}
82 If you only want top-level books and not all the children, you can use /parent_books/, as in:
83 <a href="{{e}}">{{e}}</a>.
88 {% url "api_fragment" "sen-nocy-letniej" "1290526312912-3814598192" as f %}
89 {% blocktrans with "/api/authors/william-shakespeare/themes/zabawa/fragments/" as e %}
90 The same way, using also books and themes, you can search for a list of fragments:
91 <a href="{{e}}">{{e}}</a>.
92 Again, each entry has a "href" attribute which links to the fragment's details, i.e.:
93 <a href="{{f}}">{{f}}</a>.