[Migration] remove unused CouchDB views
[mygpo.git] / doc / dev / couchdb-views.rst
blobf1ef1741d24913e894125d6c5874d7492694f16b
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 Podcast Lists
29 ^^^^^^^^^^^^^
31 Doc-Types: PodcastList
33 **Views**
35 * `podcastlists/by_rating <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_rating>`_
36 * `podcastlists/by_user_slug <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/by_user_slug>`_
37 * `podcastlists/random <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcastlists/views/random>`_
40 Podcasts
41 ^^^^^^^^
43 Doc-Types: Podcast, PodcastGroup, PodcastSubscriberData
45 **Views**
47 * `podcasts/by_tag <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcasts/views/by_tag>`_
50 Slugs
51 ^^^^^
53 Doc-Types: Podcast, PodcastGroup, Episode
55 **Views**
57 * `slugs/missing <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/slugs/views/missing>`_
60 Suggestions
61 ^^^^^^^^^^^
63 Doc-Types: Suggestions
65 **Views**
67 * `suggestions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/suggestions/views/by_user>`_
70 Tags
71 ^^^^
73 Doc-Types: Podcast, PodcastGroup
75 **Views**
77 * `tags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/tags/views/by_podcast>`_
80 Toplists
81 ^^^^^^^^
83 Doc-Types: Episode, Podcast, PodcastGroup
85 **Views**
87 * `toplist/episodes <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/episodes>`_
88 * `toplist/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/toplist/views/podcasts>`_
91 Trending
92 ^^^^^^^^
94 Doc-Types: Podcast, PodcastGroup
96 **Views**
98 * `trending/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/trending/views/podcasts>`_
101 Users
102 ^^^^^
104 Doc-Types: User
106 **Views**
108 * `users/by_google_email <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/by_google_email>`_
109 * `users/deleted <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/users/views/deleted>`_
112 Userdata
113 --------
115 This group of views is available in the *userdata* database, called
116 ``mygpo_userdata`` by default.
118 Chapters
119 ^^^^^^^^
121 Doc-Types: EpisodeUserState
123 **Views**
125 * `chapters/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/chapters/views/by_episode>`_
128 Episode Actions
129 ^^^^^^^^^^^^^^^
131 Doc-Types: EpisodeUserState
133 **Views**
135 * `episode_actions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_device>`_
136 * `episode_actions/by_podcast_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast_device>`_
137 * `episode_actions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_podcast>`_
138 * `episode_actions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_actions/views/by_user>`_
141 Episode States
142 ^^^^^^^^^^^^^^
144 Doc-Types: EpisodeUserState
146 **Views**
148 * `episode_states/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_podcast_episode>`_
149 * `episode_states/by_ref_urls <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_ref_urls>`_
150 * `episode_states/by_user_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_episode>`_
151 * `episode_states/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/episode_states/views/by_user_podcast>`_
154 Favorites
155 ^^^^^^^^^
157 Doc-Types: EpisodeUserState
159 **Views**
161 * `episodes/favorites_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/favorites/views/episodes_by_user>`_
164 Heatmap
165 ^^^^^^^
167 Doc-Types: EpisodeUserState
169 **Views**
171 * `heatmap/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/heatmap/views/by_episode>`_
174 History
175 ^^^^^^^
177 Doc-Types: EpisodeUserState, PodcastUserState
179 **Views**
181 * `history/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_device>`_
182 * `history/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/history/views/by_user>`_
185 Listeners
186 ^^^^^^^^^
188 Doc-Types: EpisodeUserState
190 **Views**
192 * `listeners/by_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_episode>`_
193 * `listeners/by_podcast_episode <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast_episode>`_
194 * `listeners/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_podcast>`_
195 * `listeners/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user>`_
196 * `listeners/by_user_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/by_user_podcast>`_
197 * `listeners/times_played_by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/listeners/views/times_played_by_user>`_
200 Podcast States
201 ^^^^^^^^^^^^^^
203 Doc-Types: PodcastUserState
205 **Views**
207 * `podcast_states/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_device>`_
208 * `podcast_states/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_podcast>`_
209 * `podcast_states/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/podcast_states/views/by_user>`_
212 Subscribers
213 ^^^^^^^^^^^
215 Doc-Types: PodcastUserState
217 **Views**
219 * `subscribers/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscribers/views/by_podcast>`_
222 Subscriptions
223 ^^^^^^^^^^^^^
225 Doc-Types: PodcastUserState
227 **Views**
229 * `subscriptions/by_device <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_device>`_
230 * `subscriptions/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_podcast>`_
231 * `subscriptions/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/subscriptions/views/by_user>`_
234 User-Tags
235 ^^^^^^^^^
237 Doc-Types: PodcastUserState
239 **Views**
241 * `usertags/by_podcast <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_podcast>`_
242 * `usertags/by_user <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/by_user>`_
243 * `usertags/podcasts <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/usertags/views/podcasts>`_
249 Categories
250 ----------
252 This group of views is available on the categories database, called
253 ``mygpo_categories`` by default.
256 Categories
257 ^^^^^^^^^^
259 Doc-Types: Category
261 **Views**
263 * `categories/by_tags <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_tags>`_
264 * `categories/by_update <https://github.com/gpodder/mygpo/tree/master/couchdb/general/_design/categories/views/by_update>`_
267 Pubsub
268 ------
270 The following views and design documents relate to the "pubsub" database.
272 Subscriptions
273 ^^^^^^^^^^^^^
275 Doc-Types: Subscription
277 **Views**
279 * `subscriptions/by_topic <https://github.com/gpodder/mygpo/tree/master/couchdb/pubsub/_design/subscriptions/views/by_topic>`_