# Path: ac_mediator/exceptions.py
# class ImproperlyConfiguredACService(ACException):
#     pass
# 
# class ACException(Exception):
#     msg = None
#     status = None
# 
#     def __init__(self, msg=None, status=None):
# 
#         # Set defaults (if not set in subclass)
#         if self.msg is None:
#             self.msg = ""
#         if self.status is None:
#             self.msg = -1
# 
#         # Override with arguments (if any)
#         if msg is not None:
#             self.msg = msg
#         if status is not None:
#             self.status = status
# 
#     def __repr__(self):
#         return self.msg


from ac_mediator.exceptions import ImproperlyConfiguredACService, ACException
from services.acservice.constants import *
import requests
import logging

requests_logger = logging.getLogger('requests_sent')


class BaseACService(object):
    """
    Base class for Audio Commons Service.
    An Audio Commons service should be a composition of BaseACService and
    a number of mixins from the classes below (those supported by the service
    api).
    """

    NAME = 'Service name'
    URL = 'http://example.com'
    API_BASE_URL = 'http://example.com/api/'
    service_id = None
    implemented_components = None

    def configure(self, config):
        # Do main configuration
        if 'service_id' not in config:

# Path: ac_mediator/exceptions.py
# class ImproperlyConfiguredACService(ACException):
#     pass
# 
# class ACException(Exception):
#     msg = None
#     status = None
# 
#     def __init__(self, msg=None, status=None):
# 
#         # Set defaults (if not set in subclass)
#         if self.msg is None:
#             self.msg = ""
#         if self.status is None:
#             self.msg = -1
# 
#         # Override with arguments (if any)
#         if msg is not None:
#             self.msg = msg
#         if status is not None:
#             self.status = status
# 
#     def __repr__(self):
#         return self.msg


# Path: services/acservice/base.py
from ac_mediator.exceptions import ImproperlyConfiguredACService, ACException
from services.acservice.constants import *
import requests
import logging


requests_logger = logging.getLogger('requests_sent')


class BaseACService(object):
    """
    Base class for Audio Commons Service.
    An Audio Commons service should be a composition of BaseACService and
    a number of mixins from the classes below (those supported by the service
    api).
    """

    NAME = 'Service name'
    URL = 'http://example.com'
    API_BASE_URL = 'http://example.com/api/'
    service_id = None
    implemented_components = None

    def configure(self, config):
        # Do main configuration
        if 'service_id' not in config:

            raise ImproperlyConfiguredACService('Missing item \'service_id\'')