def __init__(self, uuid): """ called when a request is made to seach for a player by UUID :param uuid: """ self.uuid = uuid if len(uuid) <= 16: self.JSON = h.get_json_data('player', uuid=uuid) JSON = self.JSON self.uuid = self.JSON['uuid'] elif len(uuid) == 32 or len(uuid) == 36: self.JSON = h.get_json_data('player', uuid=uuid) else: raise e.PlayerNotFoundException
def __init__(self, guid): """ Basic guild setup, requires the guild ID :param guid: """ try: if len(guid) == 24: self.guid = guid self.JSON = h.get_json_data('guild', guid) except e.HypixelAPIException: pass