docs: Document model's attributes

Fixes #1385
This commit is contained in:
Stein Magnus Jodal 2016-01-10 07:41:50 +01:00
parent 38307a5717
commit 3d6270ad37
2 changed files with 12 additions and 4 deletions

View File

@ -55,20 +55,28 @@ Data model API
:synopsis: Data model API
.. autoclass:: mopidy.models.Ref
:members:
.. autoclass:: mopidy.models.Track
:members:
.. autoclass:: mopidy.models.Album
:members:
.. autoclass:: mopidy.models.Artist
:members:
.. autoclass:: mopidy.models.Playlist
:members:
.. autoclass:: mopidy.models.Image
:members:
.. autoclass:: mopidy.models.TlTrack
:members:
.. autoclass:: mopidy.models.SearchResult
:members:
Data model helpers

View File

@ -348,14 +348,14 @@ class SearchResult(ValidatedImmutableObject):
:type albums: list of :class:`Album` elements
"""
# The search result URI. Read-only.
#: The search result URI. Read-only.
uri = fields.URI()
# The tracks matching the search query. Read-only.
#: The tracks matching the search query. Read-only.
tracks = fields.Collection(type=Track, container=tuple)
# The artists matching the search query. Read-only.
#: The artists matching the search query. Read-only.
artists = fields.Collection(type=Artist, container=tuple)
# The albums matching the search query. Read-only.
#: The albums matching the search query. Read-only.
albums = fields.Collection(type=Album, container=tuple)