(function)
return wrapped
Annotation for methods that require auth.
Annotation for methods that require auth.
Annotation for methods that require auth .
def authentication_required(function):
        """Annotation for methods that require auth."""
        def wrapped(self, *args, **kwargs):
            if not (self.apiKey):
                msg = "You must be authenticated to use this method"
                raise errors.AuthenticationError(msg)
            else:
                return function(self, *args, **kwargs)
        return wrapped
def authentication_required ( function ) : def wrapped ( self , * args , * * kwargs ) : if not ( self . apiKey ) : msg = "You must be authenticated to use this method" raise errors . AuthenticationError ( msg ) else : return function ( self , * args , * * kwargs ) return wrapped