# Path: ovizart/api/api.py
# class AppProtocolResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocols'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#         }
#         serializer = CustomJSONSerializer()
# 
# class AppProtocolVisualizePacketSizeResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_size'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#             'protocol': ALL,
#         }
#         serializer = AppProtocolPacketSizeCustomJSONSerializer()
# 
# class AppProtocolVisualizePacketCountResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_count'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketCountCustomJSONSerializer()
# 
# class AllProtocolsResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'all_protocols'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         serializer = AllProtocolsJSONSerializer()
# 
# class AllProtocolsByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'all_protocols_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         serializer = AllProtocolsJSONSerializer()
#         filtering = {
#             'parent_hash_value': ALL,
#             }
# 
# class AppProtocolResourceByHash(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocols_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             }
#         serializer = CustomJSONSerializer()
# 
# class AppProtocolVisualizePacketSizeByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_size_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketSizeCustomJSONSerializer()
# 
# class AppProtocolVisualizePacketCountByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_count_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketCountCustomJSONSerializer()


from django.conf.urls.defaults import *
from django.conf import settings
from tastypie.api import Api
from ovizart.api.api import AppProtocolResource, AppProtocolVisualizePacketSizeResource, \
                                AppProtocolVisualizePacketCountResource, AllProtocolsResource, \
                                AllProtocolsByHashResource, AppProtocolResourceByHash, \
                                AppProtocolVisualizePacketSizeByHashResource, \
                                AppProtocolVisualizePacketCountByHashResource
from django.contrib import admin



rest_api = Api(api_name='rest')
rest_api.register(AppProtocolResource())
rest_api.register(AppProtocolVisualizePacketSizeResource())
rest_api.register(AppProtocolVisualizePacketCountResource())
rest_api.register(AllProtocolsResource())
rest_api.register(AllProtocolsByHashResource())

# Path: ovizart/api/api.py
# class AppProtocolResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocols'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#         }
#         serializer = CustomJSONSerializer()
# 
# class AppProtocolVisualizePacketSizeResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_size'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#             'protocol': ALL,
#         }
#         serializer = AppProtocolPacketSizeCustomJSONSerializer()
# 
# class AppProtocolVisualizePacketCountResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_count'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'user_id': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketCountCustomJSONSerializer()
# 
# class AllProtocolsResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'all_protocols'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         serializer = AllProtocolsJSONSerializer()
# 
# class AllProtocolsByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'all_protocols_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         serializer = AllProtocolsJSONSerializer()
#         filtering = {
#             'parent_hash_value': ALL,
#             }
# 
# class AppProtocolResourceByHash(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocols_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             }
#         serializer = CustomJSONSerializer()
# 
# class AppProtocolVisualizePacketSizeByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_size_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketSizeCustomJSONSerializer()
# 
# class AppProtocolVisualizePacketCountByHashResource(ModelResource):
#     class Meta:
#         queryset = FlowDetails.objects.all()
#         resource_name = 'protocol_count_by_hash'
#         list_allowed_methods = ['get']
#         detail_allowed_methods = ['get']
#         limit = 0 # unlimited
#         filtering = {
#             'parent_hash_value': ALL,
#             'protocol': ALL,
#             }
#         serializer = AppProtocolPacketCountCustomJSONSerializer()


# Path: ovizart/urls.py
from django.conf.urls.defaults import *
from django.conf import settings
from tastypie.api import Api
from ovizart.api.api import AppProtocolResource, AppProtocolVisualizePacketSizeResource, \
                                AppProtocolVisualizePacketCountResource, AllProtocolsResource, \
                                AllProtocolsByHashResource, AppProtocolResourceByHash, \
                                AppProtocolVisualizePacketSizeByHashResource, \
                                AppProtocolVisualizePacketCountByHashResource
from django.contrib import admin




rest_api = Api(api_name='rest')
rest_api.register(AppProtocolResource())
rest_api.register(AppProtocolVisualizePacketSizeResource())
rest_api.register(AppProtocolVisualizePacketCountResource())
rest_api.register(AllProtocolsResource())
rest_api.register(AllProtocolsByHashResource())

rest_api.register(AppProtocolResourceByHash())