Stefan Scherfke avatar Stefan Scherfke committed 8c17c1f

added api doc

Comments (0)

Files changed (8)

 #source_encoding = 'utf-8'
 
 # The master toctree document.
-master_doc = 'contents'
+master_doc = 'index'
 
 # General information about the project.
 project = u'django-lastfm'
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-  ('contents', 'django-lastfm.tex', u'django-lastfm Documentation',
+  ('index', 'django-lastfm.tex', u'django-lastfm Documentation',
    u'Stefan Scherfke', 'manual'),
 ]
 

doc/contents.txt

-.. django-lastfm documentation master file, created by
-   sphinx-quickstart on Fri Nov 27 10:35:57 2009.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
-
-Welcome to django-lastfm's documentation!
-=========================================
-
-Contents:
-
-.. toctree::
-    :maxdepth: 2
-   
-    quickstart
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
+.. django-lastfm documentation master file, created by
+   sphinx-quickstart on Fri Nov 27 10:35:57 2009.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to django-lastfm's documentation!
+=========================================
+
+Contents:
+
+.. toctree::
+    :maxdepth: 2
+   
+    quickstart
+    ref/index
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

doc/quickstart.txt

-
 .. _quickstart:
 
 Quickstart Guide
     <!-- ... -->
     
 The template tag ``get_last_widget`` creates a new context variable whose name
-can be chosen as you want (e.g. ``lastfm_widget``). It has two attributes: ``title`` contains the string, that you specified in your ``settings.py``; ``content`` contains a ``<div>`` container and some AJAX code that retrieves the Last.fm data from the corresponding view and creates something like this:
+can be chosen as you want (e.g. ``lastfm_widget``). It has two attributes:
+``title`` contains the string, that you specified in your ``settings.py``;
+``content`` contains a ``<div>`` container and some AJAX code that retrieves the
+Last.fm data from the corresponding view and creates something like this:
 
 .. sourcecode:: html
 

doc/ref/index.txt

+.. _ref-index:
+
+API-Reference
+=============
+
+.. toctree::
+    :maxdepth: 1
+    
+    templatetags
+    views

doc/ref/templatetags.txt

+.. ref-templatetags:
+
+:mod:`lastfm.templatetags.lastfm_widget`
+========================================
+
+Usage of the template tag
+-------------------------
+
+.. automodule:: lastfm.templatetags.lastfm_widget
+
+
+Implementation
+--------------
+
+As for every template tag, there is a compilation function (:func:`get_lastfm_widget`) and a render (:class:`LastfmWidgetNode`) that do all the work.
+
+.. autoclass:: LastfmWidgetNode
+
+.. autofunction:: get_lastfm_widget

doc/ref/views.txt

+.. _ref-views:
+
+:mod:`lastfm.views`
+===================
+
+.. automodule:: lastfm.views
+
+.. autofunction:: lastfm_data
+
+.. autoclass:: RecentTracks
+
+.. autoclass:: WeeklyTopArtists
+
+.. autoclass:: TopArtists
     the chart from it.
     
     Each list entry is a with three elements:
-    * ``title``: Contains the song title or artist name and can be displayed as
-      alternative text or link title
-    * ``url``: A url pointing to the track or artist on Last.fm
-    * ``img_url``: A url pointing to the track’s cover or artist image
+     * ``title``: Contains the song title or artist name and can be displayed as
+       alternative text or link title
+     * ``url``: A url pointing to the track or artist on Last.fm
+     * ``img_url``: A url pointing to the track’s cover or artist image
     
     For each chart type there is a class that handles its data. They are
     necessary to unify Last.fm’s different key names to those three explained
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.