rozzac90 / matchbook

Python wrapper for Matchbook API
MIT License
15 stars 10 forks source link

Error with reporting #14

Open johnf1004 opened 3 years ago

johnf1004 commented 3 years ago

I'm having some problems getting settled bets / reports from the API. The code below throws an error:

from matchbook import APIClient

# Login
mb = APIClient(username, pwd)
mb.login()

# Reporting
mb.reporting.get_settled_bets(per_page=50)

This throws the error:

Traceback (most recent call last):

  File "<ipython-input-19-d14197edc14c>", line 1, in <module>
    mb.reporting.get_settled_bets(per_page=50)

  File "C:\Users\hstge\Anaconda3\envs\racing_env\lib\site-packages\matchbook\endpoints\reporting.py", line 156, in get_settled_bets
    'GET', self.client.urn_edge, 'reports/v1/bets/settled', params=params, target='bets', session=session

  File "C:\Users\hstge\Anaconda3\envs\racing_env\lib\site-packages\matchbook\endpoints\baseendpoint.py", line 31, in request
    check_status_code(response)

  File "C:\Users\hstge\Anaconda3\envs\racing_env\lib\site-packages\matchbook\utils.py", line 61, in check_status_code
    raise ApiError(response)

ApiError: ['resource.error.not.found']

Any way to fix this?