@@ -0,0 +1,1298 @@
+# -*- coding: utf-8 -*-%0A%22%22%22%0AMost of the api endpoints here use django_rest_framework to expose the content app APIs,%0Aexcept some set methods that do not return anything.%0A%22%22%22%0Afrom rest_framework import viewsets%0A%0Afrom . import models, serializers%0A%0A%0Aclass AbstractContentViewSet(viewsets.ModelViewSet):%0A    %22%22%22%0A    abstract class for endpoints that return ContentMetadata objectsm in JSON.%0A    %22%22%22%0A    model = models.ContentMetadata%0A    serializer_class = serializers.ContentMetadataSerializer%0A%0A    def get_queryset(self):%0A        self.ch_id = self.request.GET%5B'channel_id'%5D%0A        self.cn = self.request.GET%5B'content'%5D%0A%0A%0Aclass AbstractFormatViewSet(viewsets.ModelViewSet):%0A    %22%22%22%0A    abstract class for endpoints that return Format objects in JSON.%0A    %22%22%22%0A    model = models.Format%0A    serializer_class = serializers.FormatSerializer%0A%0A    def get_queryset(self):%0A        self.ch_id = self.request.GET%5B'channel_id'%5D%0A        self.cn = self.request.GET%5B'content'%5D%0A%0A%0Aclass AbstractFileViewSet(viewsets.ModelViewSet):%0A    %22%22%22%0A    abstract class for endpoints that return File objects in JSON.%0A    %22%22%22%0A    model = models.File%0A    serializer_class = serializers.FileSerializer%0A%0A    def get_queryset(self):%0A        self.ch_id = self.request.GET%5B'channel_id'%5D%0A        self.cn = self.request.GET%5B'content'%5D%0A

create abstract ModelViewSet classes to avoid repetition