Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo #102

Open
Eddie-Fantastic opened this issue Oct 26, 2022 · 0 comments
Open

typo #102

Eddie-Fantastic opened this issue Oct 26, 2022 · 0 comments

Comments

@Eddie-Fantastic
Copy link

Eddie-Fantastic commented Oct 26, 2022

There is a typo in client.py. simsessnum should be simsesnum. using simsessnum always returns the feature race.

I also had to change...
sim_session_type=ct.SimSessionType.race.value
to
sim_session_type
so that I could pass the value directly. I was scraping laps from heat races which wasn't an option by default.

All working for me now just a heads up.

async def race_laps_driver(
            self,
            cust_id,
            subsession_id,
            sim_session_type=ct.SimSessionType.race.value
    ):
        """ Returns data for all laps completed of a single driver.
        sim_sess_id specifies the laps from practice, qual, or race.
        """
        payload = {
            'subsessionid': subsession_id,
            'simsessnum': sim_session_type,
            'groupid': cust_id
        }
        url = ct.URL_LAPS_SINGLE
        response = await self._build_request(url, payload)

        return session_data.RaceLapsDriver(response.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant