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 getDeveloperAppKeys and createDeveloperAppKeys functions #39

Closed Soccerama closed 3 years ago

Soccerama commented 3 years ago

This addresses the remaining two items in issue #36. getDeveloperAppKeys returns a list rather than a dataframe as this maintains the underlying data structure. It has not been possible for me to test the createDeveloperAppKeys function as I already have an app key and as a non-commercial user am only allowed one. If anyone can test this it would be great, otherwise I'll speak to someone at Betfair about how we might test it.

Soccerama commented 3 years ago

Phill, the createDeveloperAppKeys function doesn't work and has some complications. The function requires a session id token to work. There are two ways to get a session id token. The first is to log in using an existing app key - in which case this function is irrelevant as you can't get another one. The second way is to log in using essentially the same process but doing it manually which kind of defeats the purpose of having this as a function. I believe a better approach is to document somewhere within the abettor project how to use Betfair's Accounts API Demo Tool to create a developer app key.

phillc73 commented 3 years ago

OK, sounds like there's not much benefit in integrating these two API calls. Sorry you spent time on this without a lot of benefit. There's already some info in the README about how to generate keys, this could always be enhanced. If it's no problem with you, I'll close this pull request.

Soccerama commented 3 years ago

The getDeveloperAppKeys function still works and provides some value - ie it dynamically retrieves my App Key(s) so that I can then use them in my code. I think it is still worth including it, but not createDeveloperAppKeys.

phillc73 commented 3 years ago

Then let's do that. I'm going to close this pull request, because I don't think there's an easy way to split the two new calls you've included in one commit. If you could then submit a new pull request with just getDeveloperAppKeys that'd be great. If that's a hassle from your end, I can accept the pull request, then delete the extra function on my end.