keenlabs/KeenClient-PHP — pull request #35 by bakura10 (2013-12-30 14:39:51+00:00)
Title: Allow master key

This PR does several things:

* It allows to do each call with the master key only (as specified in the doc)
* It removes useless methods (I've checked and all the setters/getters were not used)
* I've removed the validation because it was problematic with the fact that read key or write key could be here or not (anyway, this thing was only called by setters/getters which were not here anyway).

* I've also removed the addEvent / addEvents again. As you didn't tag with this it's not a BC yet so we can do it. As I told you last time, it's really wrong to add those convenience method in the Guzzle client. Contrary to the function that create the scoped key, those ones are actually proxy against Guzzle method. The reason you SHOULD NOT have them is that you tie the signature to the current version of KeenIO API. The main point of Guzzle is to be able to version the client using different service descriptor. Because you hardcode the parameters in the convenience method, you basically can break the whole thing if a new API version is released with different parameters (and you'll have no other way that use convoluted methods like getting manually the command and executing it, because your convenience method bypass the Guzzle magic method). So really, **don't do it**! If you want convenience methods, write a thin wrapper around them.

Happy new year!