title |
---|
Design document |
The app should support the following functionalities (in order of imporatance):
- Allow the user to check their subscriptions for the latest videos
- Support channels and playlists
- Search for channels or playlists
- Do not require youtube authentication for the user
- (optional) Support authentication using multiple methods (oauth, username/pw)
Responsibilities
- links the subscription ID to a series of videos
- tracks the last time the subscription was checked for new items
- stores whether the subscription is a channel or playlist
Responsibilities
- track whether the user has watched the video
- store the thumbnail
- store the full url to video
This object decouples the domain models from the Youtube API. It supports the following methods:
- Search Youtube for either the channel or playlist with the given name
- Fetch new items (videos) since a specified time
This concept performs the crawling of multiple subscriptions. This takes the Youtube Client class as a dependency and uses it to perform requests to the Youtube API. When given a user, it fetches the subscriptions from the user. For each subscription, it queries the Youtube API for new videos since the Subscription
's last_fetched
date.
- can the API check multiple subscriptions (channels or playslists) in a single request? no it cannot
- [*] does the search method of the Youtube API return what the matched result is? yes it does, and it can query for multiple types of result e.g. channels and playlists
- django enumeration support (
Subscription.type
field)
The initial sketch drawn in a notebook is: