class Meta(GenericMeta): queryset = SocialAccount.objects.all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'SocialAccount' authentication = Authentication() authorization = Authorization()
class Meta: queryset = OpeniPhoto.objects.select_related("context").all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'photo' authentication = Authentication() authorization = Authorization()
class Meta: queryset = OpeniVideo.objects.all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'video' authentication = Authentication() authorization = Authorization()
class Meta(GenericMeta): queryset = OpeniGroup.objects.all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'Group' authentication = Authentication() authorization = Authorization()
class GenericMeta: always_return_data = True list_allowed_methods = ['get', 'post', 'put', 'delete'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = Authentication() authorization = Authorization() # excludes = ['id'] include_resource_uri = False
class Meta: queryset = OpeniCheckin.objects.all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'checkin' authentication = Authentication() authorization = Authorization() # filtering = { # 'slug': ALL, # 'user': ALL_WITH_RELATIONS, # 'created': ['exact', 'range', 'gt', 'gte', 'lt', 'lte'], # } extra_actions = [ { "name": "comments", "http_method": "GET", "resource_type": "list", "description": "comments from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } }, { "name": "likes", "http_method": "GET", "resource_type": "list", "description": "likes from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } }, { "name": "dislikes", "http_method": "GET", "resource_type": "list", "description": "dislikes from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } } ]
class Meta: queryset = SocialApp.objects.all() list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] resource_name = 'cbsconnector' authentication = Authentication() authorization = Authorization() # filtering = { # 'slug': ALL, # 'user': ALL_WITH_RELATIONS, # 'created': ['exact', 'range', 'gt', 'gte', 'lt', 'lte'], # }
class GenericMeta: list_allowed_methods = ['get', 'post'] detail_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = Authentication() authorization = Authorization() # filtering = { # 'slug': ALL, # 'user': ALL_WITH_RELATIONS, # 'created': ['exact', 'range', 'gt', 'gte', 'lt', 'lte'], # } extra_actions = [{ "name": "generic", "http_method": "GET", "resource_type": "list", "description": "Apply Method", "fields": { "user": { "type": "string", "required": True, "description": "The user required for this action" }, "apps": { "type": "string", "required": True, "description": "The CBS along with the App we want to do a request to" }, "method": { "type": "string", "required": True, "description": "Method needed" }, "data": { "type": "string", "required": True, "description": "The required data" }, } }, { "name": "comments", "http_method": "GET", "resource_type": "list", "description": "comments from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } }, { "name": "likes", "http_method": "GET", "resource_type": "list", "description": "likes from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } }, { "name": "dislikes", "http_method": "GET", "resource_type": "list", "description": "dislikes from CBS", "fields": { "cbs": { "type": "string", "required": True, "description": "list of selected CBS" } } }]
class Meta(GenericMeta): queryset = SocialToken.objects.all() resource_name = 'SocialToken' authentication = Authentication() authorization = Authorization() serialiser = Serializer(formats=['json'])