fpl/models/user.py
async def _captain_helper(self, captain, captain_type):
        """Helper for setting the (vice) captain of the user's team."""
        if not logged_in(self._session):
            raise Exception("User must be logged in.")

        user_team = await self.get_team()
        team_ids = [player["element"] for player in user_team]
        _set_captain(user_team, captain, captain_type, team_ids)
        lineup = await self._create_new_lineup([], [], user_team)

        await self._post_substitutions(lineup)
Helper for setting the (vice) captain of the user's team.
Helper for setting the (vice) captain of the user's team.
Helper for setting the ( vice ) captain of the user ' s team .
async def _captain_helper(self, captain, captain_type):
        if not logged_in(self._session):
            raise Exception("User must be logged in.")
        user_team = await self.get_team()
        team_ids = [player["element"] for player in user_team]
        _set_captain(user_team, captain, captain_type, team_ids)
        lineup = await self._create_new_lineup([], [], user_team)
        await self._post_substitutions(lineup)
async def _captain_helper ( self , captain , captain_type ) : if not logged_in ( self . _session ) : raise Exception ( "User must be logged in." ) user_team = await self . get_team ( ) team_ids = [ player [ "element" ] for player in user_team ] _set_captain ( user_team , captain , captain_type , team_ids ) lineup = await self . _create_new_lineup ( [ ] , [ ] , user_team ) await self . _post_substitutions ( lineup )
Helper for setting the (vice) captain of the user's team.
Helper for setting the ( vice ) captain of the user ' s team .
"""Helper for setting the (vice) captain of the user's team."""
self
captain
captain_type