Hassles getting the API-NG Client example code to work.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzPunter
    Junior Member
    • Apr 2009
    • 161

    #1

    Hassles getting the API-NG Client example code to work.

    Hi all.

    Anyone trying to use the sample Client code here should read this;

    I have been trying for days to understand and get the new API-NG working and after hacking away for hours and hours I can’t say I’ve made much progress.

    Firstly just getting past the login process was a real hassle but after I got my AppKey white listed I started getting better results.

    I was trying to use the Example Client APP https://github.com/betfair/API-NG-Delphi-Client as an example but what I found was that although I appeared to be logged in correctly, the example code would not close the Login web browser and just sat there with a blank page open.

    I eventually traced this to some sort of clash between my XE-6 Twebbrowser and whatever version the app was created in.

    Tried everything I could think of and then I decided to remove the login form and replace it completely with a new form. I removed the form from the project, renamed it and then created a new form adding a TWebbrowser and then copying across each of the variables and functions EXCEPT WebBrowser1BeforeNavigate2 and WebBrowser1NavigateComplete2.

    I recreated those through the Object Inspector as you normally would. I then copied the function code from the old functions into these new functions and recompiled.

    It worked! And I was able to use the example client program.

    Now all I have left is to try and figure out how this very complex sample program works and try to follow the same procedure.

    From looking at the code from the sample, this is not going to be an easy task I think.

    Please understand that I am not critical of the Example code at all, other than the hassles I've had it works well... Certainly I wouldn't be this far without it, I just find the JSON code concepts hard to follow..



    Kind Regards
    OzPunter
    Last edited by OzPunter; 11-09-2014, 06:27 AM.
Working...
X