[History] add EpisodeHistoryEntry.create_entry()
[mygpo.git] / doc / dev / couchdb-views.rst
blob1091feb4faacd5c31144da01503cf25c7e560f2d
2 CouchDB Views
3 =============
5 This page describes the views that will be used in the CouchDB based backend of
6 the gpodder.net webservice.
8 The views are separated into groups, based on the databases they are indexed
9 on.
11 General
12 -------
14 This group of views is available on the general database, called ``mygpo`` by
15 default.
18 Clients
19 ^^^^^^^
21 Doc-Types: User
23 **Views**
25 * `clients/by_ua_string <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/clients/views/by_ua_string>`_
28 Users
29 ^^^^^
31 Doc-Types: User
33 **Views**
35 * `users/by_google_email <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/by_google_email>`_
36 * `users/deleted <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/deleted>`_
39 Userdata
40 --------
42 This group of views is available in the *userdata* database, called
43 ``mygpo_userdata`` by default.
46 Episode Actions
47 ^^^^^^^^^^^^^^^
49 Doc-Types: EpisodeUserState
51 **Views**
53 * `episode_actions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_device>`_
54 * `episode_actions/by_podcast_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast_device>`_
55 * `episode_actions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast>`_
56 * `episode_actions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_user>`_
59 Episode States
60 ^^^^^^^^^^^^^^
62 Doc-Types: EpisodeUserState
64 **Views**
66 * `episode_states/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_podcast_episode>`_
67 * `episode_states/by_ref_urls <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_ref_urls>`_
68 * `episode_states/by_user_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_episode>`_
69 * `episode_states/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_podcast>`_
72 Favorites
73 ^^^^^^^^^
75 Doc-Types: EpisodeUserState
77 **Views**
79 * `episodes/favorites_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/favorites/views/episodes_by_user>`_
82 History
83 ^^^^^^^
85 Doc-Types: EpisodeUserState, PodcastUserState
87 **Views**
89 * `history/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_device>`_
90 * `history/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_user>`_
93 Listeners
94 ^^^^^^^^^
96 Doc-Types: EpisodeUserState
98 **Views**
100 * `listeners/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_episode>`_
101 * `listeners/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast_episode>`_
102 * `listeners/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast>`_
103 * `listeners/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user>`_
104 * `listeners/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user_podcast>`_
105 * `listeners/times_played_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/times_played_by_user>`_
108 Podcast States
109 ^^^^^^^^^^^^^^
111 Doc-Types: PodcastUserState
113 **Views**
115 * `podcast_states/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_device>`_
116 * `podcast_states/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_podcast>`_
117 * `podcast_states/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_user>`_
120 Subscribers
121 ^^^^^^^^^^^
123 Doc-Types: PodcastUserState
125 **Views**
127 * `subscribers/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscribers/views/by_podcast>`_
130 Subscriptions
131 ^^^^^^^^^^^^^
133 Doc-Types: PodcastUserState
135 **Views**
137 * `subscriptions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_device>`_
138 * `subscriptions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_podcast>`_
139 * `subscriptions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_user>`_
142 User-Tags
143 ^^^^^^^^^
145 Doc-Types: PodcastUserState
147 **Views**
149 * `usertags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_podcast>`_
150 * `usertags/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_user>`_
151 * `usertags/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/podcasts>`_