#NEWLINE# def make_map( ) : #NEWLINE# #INDENT# 'Create, configure and return the routes Mapper' #NEWLINE# router = Mapper ( directory = config [ 'pylons.paths' ] [ 'controllers' ] ) #NEWLINE# router . minimization = False #NEWLINE# router . connect ( 'local-app' , '/' , controller = 'localv1' , action = 'app' ) #NEWLINE# router . connect ( 'disassemble-app' , '/disassemble/{slug}/{asset:.+}' , controller = 'disassembler' , action = 'app' ) #NEWLINE# router . connect ( 'viewer-app' , '/view/{slug}/{asset:.+}' , controller = 'viewer' , action = 'app' ) #NEWLINE# with router . submapper ( controller = 'localv1/games' , path_prefix = '/local/v1/games' ) as m : #NEWLINE# #INDENT# m . connect ( 'games-list' , '/list' , action = 'list' ) #NEWLINE# m . connect ( 'games-new' , '/new' , action = 'new' ) #NEWLINE# m . connect ( 'games-details' , '/details/{slug}' , action = 'details' ) #NEWLINE# m . connect ( 'games-sessions' , '/sessions' , action = 'sessions' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/edit' , path_prefix = '/local/v1/edit/{slug}' ) as m : #NEWLINE# #INDENT# m . connect ( 'edit-overview' , '' , action = 'overview' ) #NEWLINE# m . connect ( 'edit-load' , '/load' , action = 'load' ) #NEWLINE# m . connect ( 'edit-save' , '/save' , action = 'save' ) #NEWLINE# m . connect ( 'edit-delete' , '/delete' , action = 'delete' ) #NEWLINE# m . connect ( 'edit-create-slug' , '/create-slug' , action = 'create_slug' ) #NEWLINE# m . connect ( 'edit-directory-options' , '/directory-options' , action = 'directory_options' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/play' , path_prefix = '/local/v1/play/{slug}' ) as m : #NEWLINE# #INDENT# m . connect ( 'play-versions' , '' , action = 'versions' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/list' , path_prefix = '/local/v1/list/{slug}' ) as m : #NEWLINE# #INDENT# m . connect ( 'list-overview' , '' , action = 'overview' ) #NEWLINE# m . connect ( 'list-assets' , '/assets/{path:.*}' , action = 'assets' ) #NEWLINE# m . connect ( 'list-files' , '/files/{path:.*}' , action = 'files' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/metrics' , path_prefix = '/local/v1/metrics/{slug}' ) as m : #NEWLINE# #INDENT# m . connect ( 'metrics-overview' , '' , action = 'overview' ) #NEWLINE# m . connect ( 'metrics-stop-recording' , '/stop-recording' , action = 'stop_recording' ) #NEWLINE# m . connect ( 'metrics-as-csv' , '/session/{timestamp}.csv' , action = 'as_csv' ) #NEWLINE# m . connect ( 'metrics-as-json' , '/session/{timestamp}.json' , action = 'as_json' ) #NEWLINE# m . connect ( 'metrics-delete' , '/session/{timestamp}/delete' , action = 'delete' ) #NEWLINE# m . connect ( 'metrics-details' , '/session/{timestamp}' , action = 'details' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/userdata' , path_prefix = '/local/v1/userdata/{slug}' ) as m : #NEWLINE# #INDENT# m . connect ( 'userdata-overview' , '' , action = 'overview' ) #NEWLINE# m . connect ( 'userdata-keys' , '/{username}' , action = 'userkeys' ) #NEWLINE# m . connect ( 'userdata-as-text' , '/{username}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9\\-]+)*}' , action = 'as_text' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/deploy' , path_prefix = '/local/v1/deploy' ) as m : #NEWLINE# #INDENT# m . connect ( 'deploy-login' , '/login' , action = 'login' ) #NEWLINE# m . connect ( 'deploy-try-login' , '/try-login' , action = 'try_login' ) #NEWLINE# m . connect ( 'deploy-start' , '/start' , action = 'start' ) #NEWLINE# m . connect ( 'deploy-progress' , '/progress' , action = 'progress' ) #NEWLINE# m . connect ( 'deploy-postupload-progress' , '/postupload_progress' , action = 'postupload_progress' ) #NEWLINE# m . connect ( 'deploy-cancel' , '/cancel' , action = 'cancel' ) #NEWLINE# m . connect ( 'deploy-check' , '/check/{slug:[A-Za-z0-9\\-]+}' , action = 'check' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'localv1/user' , path_prefix = '/local/v1/user' ) as m : #NEWLINE# #INDENT# m . connect ( 'login-user' , '/login' , action = 'login' ) #NEWLINE# m . connect ( 'get-user' , '/get' , action = 'get_user' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/userdata' , path_prefix = '/api/v1/user-data' ) as m : #NEWLINE# #INDENT# m . connect ( '/{action:read|set|remove|exists}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9\\-]+)*}' ) #NEWLINE# m . connect ( '/remove-all' , action = 'remove_all' ) #NEWLINE# m . connect ( '/read' , action = 'read_keys' ) #NEWLINE# m . connect ( '/get/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9\\-]+)*}' , action = 'read' ) #NEWLINE# m . connect ( '/get-keys' , action = 'read_keys' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/gameprofile' , path_prefix = '/api/v1/game-profile' ) as m : #NEWLINE# #INDENT# m . connect ( '/{action:read|set|remove}' ) #NEWLINE# m . connect ( '/remove-all/{slug:[A-Za-z0-9\\-]+}' , action = 'remove_all' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/leaderboards' , path_prefix = '/api/v1/leaderboards' ) as m : #NEWLINE# #INDENT# m . connect ( '/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_meta' ) #NEWLINE# m . connect ( '/scores/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_overview' ) #NEWLINE# m . connect ( '/scores/read/{slug:[A-Za-z0-9\\-]+}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9]+)*}' , action = 'read_expanded' ) #NEWLINE# m . connect ( '/aggregates/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_aggregates' ) #NEWLINE# m . connect ( '/scores/set/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9]+)*}' , action = 'set' ) #NEWLINE# m . connect ( '/scores/remove-all/{slug:[A-Za-z0-9\\-]+}' , action = 'remove_all' ) #NEWLINE# m . connect ( '/reset-meta-data' , action = 'reset_meta' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/games' , path_prefix = '/api/v1/games' ) as m : #NEWLINE# #INDENT# m . connect ( 'games-create-session' , '/create-session/{slug}' , action = 'create_session' ) #NEWLINE# m . connect ( 'games-create-session' , '/create-session/{slug}/{mode:[a-z\\-]+}' , action = 'create_session' ) #NEWLINE# m . connect ( 'games-destroy-session' , '/destroy-session' , action = 'destroy_session' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/badges' , path_prefix = '/api/v1/badges' ) as m : #NEWLINE# #INDENT# m . connect ( '/read/{slug:[A-Za-z0-9\\-]+}' , action = 'badges_list' ) #NEWLINE# m . connect ( '/progress/add/{slug:[A-Za-z0-9\\-]+}' , action = 'badges_user_add' ) #NEWLINE# m . connect ( '/progress/read/{slug:[A-Za-z0-9\\-]+}' , action = 'badges_user_list' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/datashare' , path_prefix = '/api/v1/data-share' ) as m : #NEWLINE# #INDENT# m . connect ( '/create/{slug:[A-Za-z0-9\\-]+}' , action = 'create' ) #NEWLINE# m . connect ( '/find/{slug:[A-Za-z0-9\\-]+}' , action = 'find' ) #NEWLINE# m . connect ( '/join/{slug:[A-Za-z0-9\\-]+}/{datashare_id:[A-Za-z0-9]+}' , action = 'join' ) #NEWLINE# m . connect ( '/leave/{slug:[A-Za-z0-9\\-]+}/{datashare_id:[A-Za-z0-9]+}' , action = 'leave' ) #NEWLINE# m . connect ( '/set-properties/{slug:[A-Za-z0-9\\-]+}/{datashare_id:[A-Za-z0-9]+}' , action = 'set_properties' ) #NEWLINE# m . connect ( '/read/{datashare_id:[A-Za-z0-9]+}' , action = 'read' ) #NEWLINE# m . connect ( '/read/{datashare_id:[A-Za-z0-9]+}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9]+)*}' , action = 'read_key' ) #NEWLINE# m . connect ( '/set/{datashare_id:[A-Za-z0-9]+}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9]+)*}' , action = 'set_key' ) #NEWLINE# m . connect ( '/compare-and-set/{datashare_id:[A-Za-z0-9]+}/{key:[A-Za-z0-9]+([\\-\\.][A-Za-z0-9]+)*}' , action = 'compare_and_set_key' ) #NEWLINE# m . connect ( '/remove-all/{slug:[A-Za-z0-9\\-]+}' , action = 'remove_all' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/profiles' , path_prefix = '/api/v1/profiles' ) as m : #NEWLINE# #INDENT# m . connect ( '/user' , action = 'user' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/gameauthtoken' , path_prefix = '/api/v1' ) as m : #NEWLINE# #INDENT# m . connect ( '/game-auth-token/{slug:[A-Za-z0-9\\-]+}' , action = 'game_auth_token' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/gamenotifications' , path_prefix = '/api/v1/game-notifications' ) as m : #NEWLINE# #INDENT# m . connect ( '/usersettings/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_usersettings' ) #NEWLINE# m . connect ( '/usersettings/update/{slug:[A-Za-z0-9\\-]+}' , action = 'update_usersettings' ) #NEWLINE# m . connect ( '/keys/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_notification_keys' ) #NEWLINE# m . connect ( '/send-instant/{slug:[A-Za-z0-9\\-]+}' , action = 'send_instant_notification' ) #NEWLINE# m . connect ( '/send-delayed/{slug:[A-Za-z0-9\\-]+}' , action = 'send_delayed_notification' ) #NEWLINE# m . connect ( '/poll/{slug:[A-Za-z0-9\\-]+}' , action = 'poll_notifications' ) #NEWLINE# m . connect ( '/cancel-by-id/{slug:[A-Za-z0-9\\-]+}' , action = 'cancel_notification_by_id' ) #NEWLINE# m . connect ( '/cancel-by-key/{slug:[A-Za-z0-9\\-]+}' , action = 'cancel_notification_by_key' ) #NEWLINE# m . connect ( '/cancel-all/{slug:[A-Za-z0-9\\-]+}' , action = 'cancel_all_notifications' ) #NEWLINE# m . connect ( '/init-manager/{slug:[A-Za-z0-9\\-]+}' , action = 'init_manager' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/multiplayer' , path_prefix = '/api/v1/multiplayer' ) as m : #NEWLINE# #INDENT# with m . submapper ( path_prefix = '/session' ) as ms : #NEWLINE# #INDENT# ms . connect ( '/create/{slug:[A-Za-z0-9\\-]+}' , action = 'create' ) #NEWLINE# ms . connect ( '/join' , action = 'join' ) #NEWLINE# ms . connect ( '/join-any/{slug:[A-Za-z0-9\\-]+}' , action = 'join_any' ) #NEWLINE# ms . connect ( '/leave' , action = 'leave' ) #NEWLINE# ms . connect ( '/make-public' , action = 'make_public' ) #NEWLINE# ms . connect ( '/list' , action = 'list_all' ) #NEWLINE# ms . connect ( '/list/{slug:[A-Za-z0-9\\-]+}' , action = 'list' ) #NEWLINE# ms . connect ( '/read' , action = 'read' ) #NEWLINE# #UNINDENT# with m . submapper ( path_prefix = '/server' ) as ms : #NEWLINE# #INDENT# ms . connect ( '/register' , action = 'register' ) #NEWLINE# ms . connect ( '/heartbeat' , action = 'heartbeat' ) #NEWLINE# ms . connect ( '/unregister' , action = 'unregister' ) #NEWLINE# ms . connect ( '/leave' , action = 'client_leave' ) #NEWLINE# ms . connect ( '/delete' , action = 'delete_session' ) #NEWLINE# #UNINDENT# #UNINDENT# with router . submapper ( controller = 'apiv1/custommetrics' , path_prefix = '/api/v1/custommetrics' ) as m : #NEWLINE# #INDENT# m . connect ( '/add-event/{slug:[A-Za-z0-9\\-]+}' , action = 'add_event' ) #NEWLINE# m . connect ( '/add-event-batch/{slug:[A-Za-z0-9\\-]+}' , action = 'add_event_batch' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/store' , path_prefix = '/api/v1/store' ) as m : #NEWLINE# #INDENT# m . connect ( '/currency-list' , action = 'get_currency_meta' ) #NEWLINE# m . connect ( '/items/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_meta' ) #NEWLINE# m . connect ( '/user/items/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read_user_items' ) #NEWLINE# m . connect ( '/user/items/consume' , action = 'consume_user_items' ) #NEWLINE# m . connect ( '/transactions/checkout' , action = 'checkout_transaction' ) #NEWLINE# m . connect ( '/transactions/pay/{transaction_id:[A-Za-z0-9\\-]+}' , action = 'pay_transaction' ) #NEWLINE# m . connect ( '/transactions/read-status/{transaction_id:[A-Za-z0-9\\-]+}' , action = 'read_transaction_status' ) #NEWLINE# m . connect ( '/user/items/remove-all/{slug:[A-Za-z0-9\\-]+}' , action = 'remove_all' ) #NEWLINE# #UNINDENT# with router . submapper ( controller = 'apiv1/servicestatus' , path_prefix = '/api/v1/service-status' ) as m : #NEWLINE# #INDENT# m . connect ( '/read' , action = 'read_list' ) #NEWLINE# m . connect ( '/set/{service_name:[A-Za-z0-9\\-]+}' , action = 'set' ) #NEWLINE# m . connect ( '/poll-interval/set' , action = 'set_poll_interval' ) #NEWLINE# m . connect ( '/game/read/{slug:[A-Za-z0-9\\-]+}' , action = 'read' ) #NEWLINE# #UNINDENT# return ms