update couchdb-views doc
[mygpo.git] / doc / dev / couchdb-views.rst
blob4996a8b0e8e9a0484a157b031c89559faab46a1f
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 General
9 -------
11 The following views and design documents relate to the "main" database.
13 Categories
14 ^^^^^^^^^^
16 Doc-Types: Category
18 **Views**
20 * `categories/by_tags <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_tags>`_
21 * `categories/by_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_update>`_
24 Chapters
25 ^^^^^^^^
27 Doc-Types: EpisodeUserState
29 **Views**
31 * `chapters/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/chapters/views/by_episode>`_
34 Clients
35 ^^^^^^^
37 Doc-Types: User
39 **Views**
41 * `clients/by_ua_string <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/clients/views/by_ua_string>`_
44 Episode Actions
45 ^^^^^^^^^^^^^^^
47 Doc-Types: EpisodeUserState
49 **Views**
51 * `episode_actions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_device>`_
52 * `episode_actions/by_podcast_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast_device>`_
53 * `episode_actions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast>`_
54 * `episode_actions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_user>`_
57 Episode States
58 ^^^^^^^^^^^^^^
60 Doc-Types: EpisodeUserState
62 **Views**
64 * `episode_states/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_podcast_episode>`_
65 * `episode_states/by_ref_urls <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_ref_urls>`_
66 * `episode_states/by_user_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_episode>`_
67 * `episode_states/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_podcast>`_
70 Episode Statistics
71 ^^^^^^^^^^^^^^^^^^
73 Doc-Types: Episode
75 **Views**
77 * `episode_stats/filetypes <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_stats/views/filetypes>`_
80 Episodes
81 ^^^^^^^^
83 Doc-Types: Episode
85 **Views**
87 * `episodes/by_id <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_id>`_
88 * `episodes/by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_oldid>`_
89 * `episodes/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_podcast>`_
90 * `episodes/by_podcast_url <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_podcast_url>`_
91 * `episodes/by_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_slug>`_
92 * `episodes/need_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/need_update>`_
95 Favorites
96 ^^^^^^^^^
98 Doc-Types: EpisodeUserState
100 **Views**
102 * `episodes/favorites_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/favorites/views/episodes_by_user>`_
105 Heatmap
106 ^^^^^^^
108 Doc-Types: EpisodeUserState
110 **Views**
112 * `heatmap/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/heatmap/views/by_episode>`_
115 History
116 ^^^^^^^
118 Doc-Types: EpisodeUserState, PodcastUserState
120 **Views**
122 * `history/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_device>`_
123 * `history/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_user>`_
126 Listeners
127 ^^^^^^^^^
129 Doc-Types: EpisodeUserState
131 **Views**
133 * `listeners/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_episode>`_
134 * `listeners/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast_episode>`_
135 * `listeners/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast>`_
136 * `listeners/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user>`_
137 * `listeners/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user_podcast>`_
138 * `listeners/times_played_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/times_played_by_user>`_
141 Podcast Lists
142 ^^^^^^^^^^^^^
144 Doc-Types: PodcastList
146 **Views**
148 * `podcastlists/by_rating <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_rating>`_
149 * `podcastlists/by_user_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_user_slug>`_
150 * `podcastlists/random <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/random>`_
153 Podcast States
154 ^^^^^^^^^^^^^^
156 Doc-Types: PodcastUserState
158 **Views**
160 * `podcast_states/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_device>`_
161 * `podcast_states/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_podcast>`_
162 * `podcast_states/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_user>`_
165 Podcasts
166 ^^^^^^^^
168 Doc-Types: Podcast, PodcastGroup, PodcastSubscriberData
170 **Views**
172 * `podcasts/by_id <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_id>`_
173 * `podcasts/by_language <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_language>`_
174 * `podcasts/by_last_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_last_update>`_
175 * `podcasts/by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_oldid>`_
176 * `podcasts/by_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_slug>`_
177 * `podcasts/by_tag <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_tag>`_
178 * `podcasts/by_url <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_url>`_
179 * `podcasts/flattr <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/flattr>`_
180 * `podcasts/groups_by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/groups_by_oldid>`_
181 * `podcasts/podcasts_groups <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/podcasts_groups>`_
182 * `podcasts/random <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/random>`_
183 * `podcasts/subscriber_data <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/subscriber_data>`_
186 Sanitizing Rules
187 ^^^^^^^^^^^^^^^^
189 Doc-Types: SanitizingRule
191 **Views**
193 * `sanitizing_rules/by_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/sanitizing_rules/views/by_slug>`_
194 * `sanitizing_rules/by_target <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/sanitizing_rules/views/by_target>`_
197 Slugs
198 ^^^^^
200 Doc-Types: Podcast, PodcastGroup, Episode
202 **Views**
204 * `slugs/missing <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/slugs/views/missing>`_
207 Subscribers
208 ^^^^^^^^^^^
210 Doc-Types: PodcastUserState
212 **Views**
214 * `subscribers/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscribers/views/by_podcast>`_
217 Subscriptions
218 ^^^^^^^^^^^^^
220 Doc-Types: PodcastUserState
222 **Views**
224 * `subscriptions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_device>`_
225 * `subscriptions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_podcast>`_
226 * `subscriptions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_user>`_
229 Suggestions
230 ^^^^^^^^^^^
232 Doc-Types: Suggestions
234 **Views**
236 * `suggestions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/suggestions/views/by_user>`_
239 Tags
240 ^^^^
242 Doc-Types: Podcast, PodcastGroup
244 **Views**
246 * `tags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/tags/views/by_podcast>`_
247 * `tags/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/tags/views/by_user>`_
250 Toplists
251 ^^^^^^^^
253 Doc-Types: Episode, Podcast, PodcastGroup
255 **Views**
257 * `toplist/episodes <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/episodes>`_
258 * `toplist/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/podcasts>`_
261 Trending
262 ^^^^^^^^
264 Doc-Types: Podcast, PodcastGroup
266 **Views**
268 * `trending/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/trending/views/podcasts>`_
271 Users
272 ^^^^^
274 Doc-Types: User
276 **Views**
278 * `users/by_google_email <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/by_google_email>`_
279 * `users/deleted <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/deleted>`_
282 User-Tags
283 ^^^^^^^^^
285 Doc-Types: PodcastUserState
287 * `usertags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_podcast>`_
288 * `usertags/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/podcasts>`_
292 Pubsub
293 ------
295 The following views and design documents relate to the "pubsub" database.
297 Subscriptions
298 ^^^^^^^^^^^^^
300 Doc-Types: Subscription
302 * `subscriptions/by_topic <https://github.com/gpodder/mygpo/tree/master/couchdb/pubsub/_design/subscriptions/views/by_topic>`_