Exemple #1
0
from AndroidRequests.allviews.BusStopsByService import BusStopsByService
from AndroidRequests.allviews.RegisterReport import RegisterReport
from AndroidRequests.allviews.ServiceRoute import ServiceRoute
from AndroidRequests.allviews.SetDirection import SetDirection
from AndroidRequests.allviews.RequestUUID import RequestUUID

urlpatterns = [
    url(r'^nearbyBuses/(?P<pUserId>[0-9a-z-]+)/(?P<pBusStop>\w+)$',
        views.nearbyBuses),
    url(r'^registerReport$', RegisterReport.as_view()),
    url(
        r'^userPosition/(?P<pUserId>[0-9a-z-]+)/(?P<pLat>[\-+]?[0-9]*\.?[0-9]*)/(?P<pLon>[\-+]?[0-9]*\.?[0-9]*)$',
        views.userPosition),
    url(
        r'^requestToken/(?P<pUserId>[0-9a-z-]+)/(?P<pBusService>[0-9,\w]*)/(?P<pRegistrationPlate>[0-9,\w,-]{6,8})$',
        RequestToken.as_view()),
    url(
        r'^requestToken/v2/(?P<pUserId>[0-9a-z-]+)/(?P<pBusService>[0-9,\w]*)/(?P<pUUID>[0-9a-z-]+)$',
        RequestTokenV2.as_view()),
    url(r'^endRoute/(?P<pToken>[0-9,a-f]{128})$', EndRoute.as_view()),
    url(r'^sendTrajectory$', SendPoses.as_view()),
    # reportEventBus with location
    url(
        r'^reportEventBus/(?P<pUserId>[0-9a-z-]+)/(?P<pBusService>[\w,0-9]*)/(?P<pBusPlate>[\w,0-9,-]*)/(?P<pEventID>.*)/(?P<pLatitud>[\-+]?[0-9]*\.?[0-9]*)/(?P<pLongitud>[\-+]?[0-9]*\.?[0-9]*)/(?P<pConfirmDecline>.*)$',
        RegisterEventBus.as_view()),
    url(
        r'^reportEventBus/v2/(?P<pUserId>[0-9a-z-]+)/(?P<pUuid>[0-9a-z-]+)/(?P<pBusService>[\w,0-9]*)/(?P<pEventID>.*)/(?P<pLatitud>[\-+]?[0-9]*\.?[0-9]*)/(?P<pLongitud>[\-+]?[0-9]*\.?[0-9]*)/(?P<pConfirmDecline>.*)$',
        RegisterEventBusV2.as_view()),
    # reportEventBus without location
    url(
        r'^reportEventBus/(?P<pUserId>[0-9a-z-]+)/(?P<pBusService>[\w,0-9]*)/(?P<pBusPlate>[\w,0-9,-]*)/(?P<pEventID>.*)/(?P<pConfirmDecline>.*)$',