# Path: api/views.py
# class EventListApi(CachedListAPIView):
#     """ Lists approved Events, takes the following optional GET parameters:
# 
# * limit
# * order
# * country_code
# * past
#     """
#     serializer_class = EventListSerializers
# 
#     def get_queryset(self):
#         params = {
#             'limit': self.request.GET.get('limit', None),
#             'order': self.request.GET.get('order', None),
#             'country_code': self.request.GET.get('country_code', None),
#             'past': self.request.GET.get('past', False)
#         }
# 
#         return get_approved_events(**params)
# 
# class EventDetailApi(CachedListAPIView):
#     serializer_class = EventDetailSerializer
# 
#     def get_queryset(self):
#         params = {
#             'id': self.request.GET.get('id', None)
#         }
# 
#         return get_event_detail(**params)
# 
# Path: api/views.py
# class ScoreBoardApi(CachedListAPIView):
#     "Lists scoreboard entries"
#     serializer_class = ScoreboardSerializer
# 
#     def get_queryset(self):
#         return count_approved_events_for_country()


from django.conf.urls import patterns, url
from api.views import EventListApi, EventDetailApi
from api.views import ScoreBoardApi
# -*- coding: utf-8 -*-


urlpatterns = patterns('',
                       url(r'^event/list/$',
                           EventListApi.as_view(),
                           name='event.list'),
                       url(r'^event/detail/$',
                           EventDetailApi.as_view(),
                           name='event.detail'),

# Path: api/views.py
# class EventListApi(CachedListAPIView):
#     """ Lists approved Events, takes the following optional GET parameters:
# 
# * limit
# * order
# * country_code
# * past
#     """
#     serializer_class = EventListSerializers
# 
#     def get_queryset(self):
#         params = {
#             'limit': self.request.GET.get('limit', None),
#             'order': self.request.GET.get('order', None),
#             'country_code': self.request.GET.get('country_code', None),
#             'past': self.request.GET.get('past', False)
#         }
# 
#         return get_approved_events(**params)
# 
# class EventDetailApi(CachedListAPIView):
#     serializer_class = EventDetailSerializer
# 
#     def get_queryset(self):
#         params = {
#             'id': self.request.GET.get('id', None)
#         }
# 
#         return get_event_detail(**params)
# 
# Path: api/views.py
# class ScoreBoardApi(CachedListAPIView):
#     "Lists scoreboard entries"
#     serializer_class = ScoreboardSerializer
# 
#     def get_queryset(self):
#         return count_approved_events_for_country()


# Path: api/urls.py
from django.conf.urls import patterns, url
from api.views import EventListApi, EventDetailApi
from api.views import ScoreBoardApi

# -*- coding: utf-8 -*-


urlpatterns = patterns('',
                       url(r'^event/list/$',
                           EventListApi.as_view(),
                           name='event.list'),
                       url(r'^event/detail/$',
                           EventDetailApi.as_view(),
                           name='event.detail'),

                       url(r'^scoreboard/$',