Decorator to designate an API method applicable only to client-side
    instances.

    This allows us to use the same APIRequest and APIResponse subclasses on the
    client and server sides without too much confusion.

def client_side(func):
    """
    Decorator to designate an API method applicable only to client-side
    instances.

    This allows us to use the same APIRequest and APIResponse subclasses on the
    client and server sides without too much confusion.
    """
    def inner(*args, **kwargs):
        if args and hasattr(args[0], 'is_server') and voltron.debugger:
            raise ClientSideOnlyException("This method can only be called on a client-side instance")
        return func(*args, **kwargs)
    return inner