# Path: simpleapi/message/common.py
# class SAException(Exception):
#     def __init__(self, msg=None):
#     def _get_message(self):
#     def _set_message(self, message):
#     def __repr__(self):


from simpleapi.message.common import json, SAException
from response import UnformattedResponse
            return UnformattedResponse(
                content=u'%s.%s_REMOTING_API = %s;' %\
                    (provider, self.request.route.name.upper(),
                     json.dumps(result)),
                mimetype='text/javascript'
            )
        else:
            functions = []
            for fn in function_map.iterkeys():
                print function_map[fn]['args']
                optionals = list(set(function_map[fn]['args']['all']) - \
                    set(function_map[fn]['args']['obligatory']))
                functions.append({
                    'name': fn,
                    'args': {
                        'len': len(function_map[fn]['args']['all']),
                        'obligatory': {
                            'len': len(function_map[fn]['args']['obligatory']),
                            'names': function_map[fn]['args']['obligatory'],
                        },
                        'optional': {
                            'len': len(optionals),
                            'names': optionals,
                        },
                        'kwargs_allowed': function_map[fn]['args']['kwargs_allowed'],
                    },
                })

            result = {
                'actions': {

# Path: simpleapi/message/common.py
# class SAException(Exception):
#     def __init__(self, msg=None):
#     def _get_message(self):
#     def _set_message(self, message):
#     def __repr__(self):


# Path: simpleapi/server/namespace.py
from simpleapi.message.common import json, SAException
from response import UnformattedResponse

            return UnformattedResponse(
                content=u'%s.%s_REMOTING_API = %s;' %\
                    (provider, self.request.route.name.upper(),
                     json.dumps(result)),
                mimetype='text/javascript'
            )
        else:
            functions = []
            for fn in function_map.iterkeys():
                print function_map[fn]['args']
                optionals = list(set(function_map[fn]['args']['all']) - \
                    set(function_map[fn]['args']['obligatory']))
                functions.append({
                    'name': fn,
                    'args': {
                        'len': len(function_map[fn]['args']['all']),
                        'obligatory': {
                            'len': len(function_map[fn]['args']['obligatory']),
                            'names': function_map[fn]['args']['obligatory'],
                        },
                        'optional': {
                            'len': len(optionals),
                            'names': optionals,
                        },
                        'kwargs_allowed': function_map[fn]['args']['kwargs_allowed'],
                    },
                })

            result = {
                'actions': {

                    self.request.route.name: functions