'Given a user_name or user_id, get the user\'s info from the API.'

def get_user_info(self, key, value, sess=None):

    if (key == u'user_id'):
        path = u'api_user_info_path'
    else:
        assert (key == u'user_name')
        path = u'api_user_name_info_path'
    path = getattr(self, path, None)
    if (not path):
        raise Response(400)
    path = self._format_path(path, {key: value})
    info = self.api_parser(self.api_get(path, sess=sess))
    return self.extract_user_info(info)
