refactor api to get both players and leagues