Since I mainly access the API using Java, thats what I'll be blogging about. I am most definitely not an expert java programmer, but I am getting very good at reading the Javadoc.
If I post something which is incorrect or something which could be made more efficient somehow, post a comment. I really don't have a problem with criticism of any kind. Even cruel criticism has something to be learned from and since you get a finite number of days allocated to you, any day you don't learn something is one of those days wasted.
Java For blogs which touch on general Java development.
 |
|
Now, this may not be useful to all of you, except as an exercise in problem solving, but I've been having a problem sorting out the timings of my GetMarketPrices calls.
The way I'm working things is I use a ThreadPool implementation I was given by an extremely generous soul and I pass GetMarketPrices calls into it. Since I'm generally looping over a set number of markets and my computer runs a lot faster than the internet, its very easy for the threadpool to become overrun by requests,...
|
Member
|
|
Comments 0
|
 |
|
Ok, what I'm doing here is a Logout class, so we can at the very least have a polite bot which logs in and logs out when we have finished.
So, using the project we have been working on, we will need to set up a few new classes. I'll say this again - the way I'm showing you may well not be the best way to do stuff, but it is a way which works.
What I'm going to do here first is set up two new classes which will provide us with APIRequestHeader objects when we need them....
|
Member
|
|
Comments 13
|
 |
|
I've just managed to do something I'm fairly proud of. Its probably fairly small beans to a lot of folk, but it took me ages to figure out and I'm fairly chuffed with myself.
I'm writing a bot (aren't we all!) and I've taken a bit of a leap into the unknown with some of the techniques I'm using. For example, I've created some custom components to show my data. Not all that groundbreaking really, but since the aim of my bot is for me to start it up and walk away from it, but still...
|
Member
|
|
Comments 0
|
 |
|
Right then, sliding a little way off the Betfair API track, but with something which is still germane to writing an app which will access the API, I'm going to talk about .properties files in Java.
I know I said I generally wouldn't be talking too much about basic java stuff and I suppose to a lot of people, this stuff will seem fairly basic. However, while I was trying to find out how to do this, I visited I don't know how many web pages and got useful bits of information from each...
|
Member
|
|
Comments 0
|
 |
|
Last one now - future blarticles should be less wordy, with any luck.
Now we need a dialog to use it with. This won't take anywhere near as long as the login code took, so don't panic, we are nearly finished.
Look in the package tree of your project for the package named whatever you called your project. Inside that package, you should find a file called '<yourProjectName>View.java'.
Double click on that to open it up and we'll set up the login...
|
Member
|
|
Comments 4
|