def authentication_required(fn):
    '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 fn(self, *args, **kwargs)
    return wrapped
Annotation for methods that require auth.
def authentication_required(fn):
    

    def wrapped(self, *args, **kwargs):
        if (not self.apiKey):
            msg = 'You must be authenticated to use this method'
            raise errors.AuthenticationError(msg)
        else:
            return fn(self, *args, **kwargs)
    return wrapped