def requires_api_auth(fn):
    """Decorator for HAPI methods that requires the instance to be authenticated with a HAPI token"""
    def wrapper(self, *args, **kwargs):
        self.auth_context = HAPI.auth_context_hapi
        return fn(self, *args, **kwargs)
    return wrapper
def requires_api_auth ( fn ) : def wrapper ( self , * args , ** kwargs ) : self . auth_context = HAPI . auth_context_hapi return fn ( self , * args , ** kwargs ) return wrapper
Decorator for HAPI methods that requires the instance to be authenticated with a HAPI token