limx0 / betfair_parser

BSD 2-Clause "Simplified" License
6 stars 1 forks source link

GetAccountDetails endpoint broken #27

Closed limx0 closed 1 year ago

limx0 commented 1 year ago

Calling GetAccountDetails is currently throwing a AccountAPINGException: METHOD_NOT_FOUND: Method not found.

Repro:


import requests

from betfair_parser.client import request, login
from betfair_parser.endpoints import ENDPOINTS as endpoints
from betfair_parser.spec.accounts.operations import GetAccountDetails

session = requests.Session()
login(session, "xxx", "xxx", "xxx")

# Throws
resp = request(
    session,
    GetAccountDetails(),
    endpoints=endpoints,
)
ml31415 commented 1 year ago

Yeah, that should be GetAccountDetails.with_params(), but that currently also fails. __init__ can't be defined on Structs, but we need to fill out method and id somehow. Should we rename with_params(), as it's a kind of mandatory constructor?

limx0 commented 1 year ago

Should we rename with_params(), as it's a kind of mandatory constructor?

Yeah, no strong opinions here; happy to leave it as is for now.

ml31415 commented 1 year ago

I'll put up a reminder for that.