Since I re-worked the way I was dealing with API masks it seemed inevitable that I should mess about with how I was dealing with the actual API methods – more so since I now understand a little (lot) better how they are grouped.

There is not a great deal to this as it is not as complicated as my first attempt made it, so on to the details...

 

Read more: Eve – API methods

Mask packageHaving now been able to get a bit more of a feel for how the API is used and how the masks work I decided to refactor the mask calculator.

In my initial analysis of the problem I failed to spot that there were in fact two types of mask, corporation and character. Whilst they both work in the exact same way they provide access to different things so three classes were required – a base class and extending corporation and character ones.

Read more: Eve - API mask calculator: The new batch

This definitely takes the biscuit for being an exceptionally time consuming and pointless task!

I have not really had to play with reflection before and it appears that for some reason my subconscious pulled me into endlessly tapping away until this was sort of complete..... and did I mention how pointless it is?

Read more: Eve API - On reflection....

Reader package contentsSince the owner of the API is not silly they would rather that you did not harass it with invalid requests and the like. Since this is one of the more obvious things about the API I have attempted to prevent an invalid key format from ever getting through, however I have gone a little over the top.

To be certain every request that can be sent and requires a key is being subjected to a check whether it’s a sane thing to do or not. The worst case scenario for sending too many bad requests is getting your IP blacklisted so in a way this will help prevent that possibility. Logically the validity check for the key could be made when the Key object is created, made final and then there is no need to think about it again. I have not done that; perhaps I might were I given another crack at this since my current approach is as efficient as an uphill river.

 

Read more: Eve API - Power to the paranoid