'An API call method to test the provided API key.
This is automatically called when the Akismet client is
instantiated so that the app code can decide if it\'s usable right
away.'

def verify_key(self):

    if (not self.key):
        return False
    payload = {'key': self.key}
    try:
        response = self.send('verify-key', **payload)
    except RequestException:
        self.handle_exception(payload)
        return None
    try:
        return {'valid': True, 'invalid': False}[response.text]
    except KeyError:
        return False
