def __init__(self, api_services, **kwargs):
    protorpc_services = []
    generator = api_config.ApiConfigGenerator()
    self.api_config_registry = api_backend_service.ApiConfigRegistry()
    api_name_version_map = {}
    for service in api_services:
      key = (service.api_info.name, service.api_info.version)
      services = api_name_version_map.setdefault(key, [])
      if service in services:
        raise api_config.ApiConfigurationError(
            'Can\'t add the same class to an API twice: %s' % service.__name__)
      services.append(service)

    for services in api_name_version_map.values():
      config_file = generator.pretty_print_config_to_json(services)



      self.api_config_registry.register_spi(config_file)
      for api_service in services:
        protorpc_class_name = api_service.__name__
        root = self.__SPI_PREFIX + protorpc_class_name
        if not any(service[0] == root or service[1] == api_service
                   for service in protorpc_services):
          protorpc_services.append((root, api_service))


    backend_service = api_backend_service.BackendServiceImpl.new_factory(
        self.api_config_registry, _get_app_revision())
    protorpc_services.insert(0, (self.__BACKEND_SERVICE_ROOT, backend_service))

    if 'protocols' in kwargs:
      raise TypeError('__init__() got an unexpected keyword argument '
                      "'protocols'")
    self.restricted = kwargs.pop('restricted', True)
    self.service_app = wsgi_service.service_mappings(protorpc_services,
                                                     **kwargs)
Redmine issue representation, tied to the API XML form.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/endpoints/apiserving.py/_ApiServer.__init__--crossover with--dataset/ETHPy150Open zepheira/django-redmine/django_redmine/utils.py/RedmineIssue.__init__