Updated IT translation
[mygpo.git] / doc / dev / couchdb-views.rst
blob3d69b6bbd6cbaa2c2f646a30c7cf213b363a2aa1
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 Episode Statistics
29 ^^^^^^^^^^^^^^^^^^
31 Doc-Types: Episode
33 **Views**
35 * `episode_stats/filetypes <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_stats/views/filetypes>`_
38 Episodes
39 ^^^^^^^^
41 Doc-Types: Episode
43 **Views**
45 * `episodes/by_id <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_id>`_
46 * `episodes/by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_oldid>`_
47 * `episodes/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_podcast>`_
48 * `episodes/by_podcast_url <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_podcast_url>`_
49 * `episodes/by_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/by_slug>`_
50 * `episodes/need_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episodes/views/need_update>`_
53 Podcast Lists
54 ^^^^^^^^^^^^^
56 Doc-Types: PodcastList
58 **Views**
60 * `podcastlists/by_rating <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_rating>`_
61 * `podcastlists/by_user_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_user_slug>`_
62 * `podcastlists/random <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/random>`_
65 Podcasts
66 ^^^^^^^^
68 Doc-Types: Podcast, PodcastGroup, PodcastSubscriberData
70 **Views**
72 * `podcasts/by_id <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_id>`_
73 * `podcasts/by_language <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_language>`_
74 * `podcasts/by_last_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_last_update>`_
75 * `podcasts/by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_oldid>`_
76 * `podcasts/by_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_slug>`_
77 * `podcasts/by_tag <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_tag>`_
78 * `podcasts/by_url <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_url>`_
79 * `podcasts/flattr <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/flattr>`_
80 * `podcasts/groups_by_oldid <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/groups_by_oldid>`_
81 * `podcasts/podcasts_groups <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/podcasts_groups>`_
82 * `podcasts/random <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/random>`_
83 * `podcasts/subscriber_data <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/subscriber_data>`_
86 Slugs
87 ^^^^^
89 Doc-Types: Podcast, PodcastGroup, Episode
91 **Views**
93 * `slugs/missing <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/slugs/views/missing>`_
96 Suggestions
97 ^^^^^^^^^^^
99 Doc-Types: Suggestions
101 **Views**
103 * `suggestions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/suggestions/views/by_user>`_
106 Tags
107 ^^^^
109 Doc-Types: Podcast, PodcastGroup
111 **Views**
113 * `tags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/tags/views/by_podcast>`_
116 Toplists
117 ^^^^^^^^
119 Doc-Types: Episode, Podcast, PodcastGroup
121 **Views**
123 * `toplist/episodes <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/episodes>`_
124 * `toplist/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/podcasts>`_
127 Trending
128 ^^^^^^^^
130 Doc-Types: Podcast, PodcastGroup
132 **Views**
134 * `trending/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/trending/views/podcasts>`_
137 Users
138 ^^^^^
140 Doc-Types: User
142 **Views**
144 * `users/by_google_email <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/by_google_email>`_
145 * `users/deleted <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/deleted>`_
148 Userdata
149 --------
151 This group of views is available in the *userdata* database, called
152 ``mygpo_userdata`` by default.
154 Chapters
155 ^^^^^^^^
157 Doc-Types: EpisodeUserState
159 **Views**
161 * `chapters/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/chapters/views/by_episode>`_
164 Episode Actions
165 ^^^^^^^^^^^^^^^
167 Doc-Types: EpisodeUserState
169 **Views**
171 * `episode_actions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_device>`_
172 * `episode_actions/by_podcast_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast_device>`_
173 * `episode_actions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast>`_
174 * `episode_actions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_user>`_
177 Episode States
178 ^^^^^^^^^^^^^^
180 Doc-Types: EpisodeUserState
182 **Views**
184 * `episode_states/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_podcast_episode>`_
185 * `episode_states/by_ref_urls <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_ref_urls>`_
186 * `episode_states/by_user_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_episode>`_
187 * `episode_states/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_podcast>`_
190 Favorites
191 ^^^^^^^^^
193 Doc-Types: EpisodeUserState
195 **Views**
197 * `episodes/favorites_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/favorites/views/episodes_by_user>`_
200 Heatmap
201 ^^^^^^^
203 Doc-Types: EpisodeUserState
205 **Views**
207 * `heatmap/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/heatmap/views/by_episode>`_
210 History
211 ^^^^^^^
213 Doc-Types: EpisodeUserState, PodcastUserState
215 **Views**
217 * `history/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_device>`_
218 * `history/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_user>`_
221 Listeners
222 ^^^^^^^^^
224 Doc-Types: EpisodeUserState
226 **Views**
228 * `listeners/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_episode>`_
229 * `listeners/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast_episode>`_
230 * `listeners/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast>`_
231 * `listeners/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user>`_
232 * `listeners/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user_podcast>`_
233 * `listeners/times_played_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/times_played_by_user>`_
236 Podcast States
237 ^^^^^^^^^^^^^^
239 Doc-Types: PodcastUserState
241 **Views**
243 * `podcast_states/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_device>`_
244 * `podcast_states/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_podcast>`_
245 * `podcast_states/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_user>`_
248 Subscribers
249 ^^^^^^^^^^^
251 Doc-Types: PodcastUserState
253 **Views**
255 * `subscribers/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscribers/views/by_podcast>`_
258 Subscriptions
259 ^^^^^^^^^^^^^
261 Doc-Types: PodcastUserState
263 **Views**
265 * `subscriptions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_device>`_
266 * `subscriptions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_podcast>`_
267 * `subscriptions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_user>`_
270 User-Tags
271 ^^^^^^^^^
273 Doc-Types: PodcastUserState
275 **Views**
277 * `usertags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_podcast>`_
278 * `usertags/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_user>`_
279 * `usertags/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/podcasts>`_
285 Categories
286 ----------
288 This group of views is available on the categories database, called
289 ``mygpo_categories`` by default.
292 Categories
293 ^^^^^^^^^^
295 Doc-Types: Category
297 **Views**
299 * `categories/by_tags <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_tags>`_
300 * `categories/by_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_update>`_
303 Pubsub
304 ------
306 The following views and design documents relate to the "pubsub" database.
308 Subscriptions
309 ^^^^^^^^^^^^^
311 Doc-Types: Subscription
313 **Views**
315 * `subscriptions/by_topic <https://github.com/gpodder/mygpo/tree/master/couchdb/pubsub/_design/subscriptions/views/by_topic>`_