phillc73 / abettor

An R package for connecting to the online betting exchange Betfair, via their API-NG product, using JSON-RPC.
Other
51 stars 36 forks source link

Add customerRef field and make code more consistent with other functi… #47

Closed Soccerama closed 3 years ago

Soccerama commented 3 years ago

…ons within abettor.

I've added the customerRed field which was missing from the Betfair operation. Have also made the internal code consistent with other functions and it now uses jsonlite rather than coding json directly.

Have done some testing and also update documentation. Would welcome any feedback if there are any issues.

Soccerama commented 3 years ago

I've made the changes you suggested. The logic was bit trickier because none of the parameters are required. The code is not elegant but it passed my testing. There was also some duplication in my code which I removed. The code requires a marketId if betIds are supplied which I didn't think was necessary but it appears to be.