In the broadest terms, functions which return Boolean answers frequently bear names which begin with "is". I think it was a Java thing.
So if it were my API, it would probably bear a name like isUserIdOK (also because UserId is what gets passed in).

If the parameter were actually something called "APIKey", then my method would have a similar change in name to something closer to yours.

But in reality, I would rarely expose a method for outside usage that returned only a Boolean. The remote method I'd expose would call your little Boolean gizmo privately, but then return a "standard structure" (something common to all API methods in the hypothetical app) which includes a "message" (one for users to see, another for logging) and "request" (always echo what was passed in) sub-structures, in addition to the specific payload and a universal "success" int of 0 or 1. I don't have time to help outsiders understand why their calls returned a "false", let the method tell 'em.

But enough about me...

Al

P.S. I'd also like to point out that my spell checker thinks that isUserIdOK was supposed to be "didgeridoo", so a shout-out to any Australians in the group.


On 12/18/2014 12:17 PM, Jason Allen wrote:

Is name 'checkExistsAPIKey' a good name? 

I've considered checkAPIKeyExists, isDefinedAPIKey, APIKEYisDefined, etc. 



--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

---
You received this message because you are subscribed to the Google Groups "Open BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to