# Path: shiji/urldispatch.py
# API_VERSION_HEADER = "X-DigiTar-API-Version"
# def get_version(request):
#     def __init__(self, request, url_matches, call_router=None):
#     def render(self, request):
#         def cb_deferred_finish(result):
#         def eb_failed(failure):
#     def __init__(self, request, api_router):
#     def render_OPTIONS(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def __init__(self, calls_module, version_router=None, auto_list_versions=False):
#     def _createRouteMap(self, calls_module):
#     def getChild(self, name, request):
#     def __init__(self, version_map, api_router=None):
#     def getChild(self, name, request):
#     def get_version_map(self):
#     def __init__(self, route_map, config={}, cross_origin_domains=None, inhibit_http_caching=True):
#     def getChild(self, name, request):
#     def get_route_map(self):
#     def __init__(self, route_map):
#     def getChild(self, name, request):
# class URLMatchJSONResource(Resource):
# class CORSInterrogation(Resource):
# class UnknownAPI(Resource):
# class UnknownCall(Resource):
# class UnknownVersion(Resource):
# class ListVersionsCall (URLMatchJSONResource):
# class CallRouter(Resource):
# class VersionRouter(Resource):
# class APIRouter(Resource):
# class URLRouter(Resource):
# 
# Path: shiji/webapi.py
# ARG_OPTIONAL = True
# ARG_REQUIRED = False
# def json_arguments(arg_list, content_type="application/json"):
#     def jsonValidateArgWrap(render_func):
#         def jsonWrappedFilet(self, request):
# def paged_results(default_page=0,default_page_len=50,max_page_len=100):
#     def pageValidateWrap(render_func):
#         def wrappedFunction(self, request):
# def url_arguments(arg_list, content_type=""):
#     def urlValidateArgWrap(render_func):
#         def urlWrappedFilet(self, request):
# def auth_http_basic(auth_func, realm="Shiji"):
#     def authValidateCallerWrap(render_func):
#         def authWrappedFilet(self, request):
# def write_json(request, obj):
#     def __init__(self, request_object, error_code=None, exception_class=None, exception_text=None):
#     def obj_err(self):
#     def json_err(self):
#     def __str__(self):
#     def __init__(self, request_object, api_name):
#     def __init__(self, request_object, api_version):
#     def __init__(self, request_object, call_name):
#     def __init__(self, request_object, arg_name, extra_desc):
#     def __init__(self, request_object):
#     def __init__(self, request_object, error_msg):
#     def __init__(self, request_object, name, signature):
#     def __init__(self, request_object, name):
# class APIError(BaseException):
# class UnknownAPIError(APIError):
# class UnknownAPIVersionError(APIError):
# class UnknownAPICallError(APIError):
# class JSONEncodeError(APIError):
# class JSONDecodeError(APIError):
# class RequestNotHashError(APIError):
# class AccessDeniedError(APIError):
# class ValueError(APIError):
# class ContentTypeError(APIError):
# class CharsetNotUTF8Error(APIError):
# class UnexpectedServerError(APIError):
# class InvalidAuthenticationError(APIError):
# class InvalidSecureCookieError(APIError):
# class ExpiredSecureCookieError(APIError):


from shiji import urldispatch, webapi
    import json
    import simplejson as json
####################################################################
# FILENAME: ./dummy_api/v1_0/calls.py
# PROJECT: Shiji API
# DESCRIPTION: Dummy API Call Logic (list of routes)
#
#
# $Id$
####################################################################
# (C)2015 DigiTar Inc.
# Licensed under the MIT License.
####################################################################


try:
except ImportError:

class PingCall (urldispatch.URLMatchJSONResource):
    """
    Echoes back at caller.
    """
    routes = [r"ping(?P<group1>.*)", r"me"]
    
    def render_GET(self, request):
        
        if request.api_mode == "prod":
            mode_string = "I'm production baby!"
        elif request.api_mode == "test":
            mode_string = "I'm in testing mode. :("
        else:
            mode_string = "I have no clue what mode I'm in."

# Path: shiji/urldispatch.py
# API_VERSION_HEADER = "X-DigiTar-API-Version"
# def get_version(request):
#     def __init__(self, request, url_matches, call_router=None):
#     def render(self, request):
#         def cb_deferred_finish(result):
#         def eb_failed(failure):
#     def __init__(self, request, api_router):
#     def render_OPTIONS(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def render_POST(self, request):
#     def render_GET(self, request):
#     def __init__(self, calls_module, version_router=None, auto_list_versions=False):
#     def _createRouteMap(self, calls_module):
#     def getChild(self, name, request):
#     def __init__(self, version_map, api_router=None):
#     def getChild(self, name, request):
#     def get_version_map(self):
#     def __init__(self, route_map, config={}, cross_origin_domains=None, inhibit_http_caching=True):
#     def getChild(self, name, request):
#     def get_route_map(self):
#     def __init__(self, route_map):
#     def getChild(self, name, request):
# class URLMatchJSONResource(Resource):
# class CORSInterrogation(Resource):
# class UnknownAPI(Resource):
# class UnknownCall(Resource):
# class UnknownVersion(Resource):
# class ListVersionsCall (URLMatchJSONResource):
# class CallRouter(Resource):
# class VersionRouter(Resource):
# class APIRouter(Resource):
# class URLRouter(Resource):
# 
# Path: shiji/webapi.py
# ARG_OPTIONAL = True
# ARG_REQUIRED = False
# def json_arguments(arg_list, content_type="application/json"):
#     def jsonValidateArgWrap(render_func):
#         def jsonWrappedFilet(self, request):
# def paged_results(default_page=0,default_page_len=50,max_page_len=100):
#     def pageValidateWrap(render_func):
#         def wrappedFunction(self, request):
# def url_arguments(arg_list, content_type=""):
#     def urlValidateArgWrap(render_func):
#         def urlWrappedFilet(self, request):
# def auth_http_basic(auth_func, realm="Shiji"):
#     def authValidateCallerWrap(render_func):
#         def authWrappedFilet(self, request):
# def write_json(request, obj):
#     def __init__(self, request_object, error_code=None, exception_class=None, exception_text=None):
#     def obj_err(self):
#     def json_err(self):
#     def __str__(self):
#     def __init__(self, request_object, api_name):
#     def __init__(self, request_object, api_version):
#     def __init__(self, request_object, call_name):
#     def __init__(self, request_object, arg_name, extra_desc):
#     def __init__(self, request_object):
#     def __init__(self, request_object, error_msg):
#     def __init__(self, request_object, name, signature):
#     def __init__(self, request_object, name):
# class APIError(BaseException):
# class UnknownAPIError(APIError):
# class UnknownAPIVersionError(APIError):
# class UnknownAPICallError(APIError):
# class JSONEncodeError(APIError):
# class JSONDecodeError(APIError):
# class RequestNotHashError(APIError):
# class AccessDeniedError(APIError):
# class ValueError(APIError):
# class ContentTypeError(APIError):
# class CharsetNotUTF8Error(APIError):
# class UnexpectedServerError(APIError):
# class InvalidAuthenticationError(APIError):
# class InvalidSecureCookieError(APIError):
# class ExpiredSecureCookieError(APIError):


# Path: shiji/dummy_api/v1_0/calls_list.py
from shiji import urldispatch, webapi
    import json
    import simplejson as json

####################################################################
# FILENAME: ./dummy_api/v1_0/calls.py
# PROJECT: Shiji API
# DESCRIPTION: Dummy API Call Logic (list of routes)
#
#
# $Id$
####################################################################
# (C)2015 DigiTar Inc.
# Licensed under the MIT License.
####################################################################


try:
except ImportError:

class PingCall (urldispatch.URLMatchJSONResource):
    """
    Echoes back at caller.
    """
    routes = [r"ping(?P<group1>.*)", r"me"]
    
    def render_GET(self, request):
        
        if request.api_mode == "prod":
            mode_string = "I'm production baby!"
        elif request.api_mode == "test":
            mode_string = "I'm in testing mode. :("
        else:
            mode_string = "I have no clue what mode I'm in."

        webapi.write_json(request, "POLLS PONG! Right back at ya. %s (API: %s, Version: %s, Mode: %s)" % (mode_string,