Closed ahojchris closed 9 years ago
Please merge this asap. :)
Thanks for your contribution. I agree this should be fixed asap as we've discussed in many other issues like #119, #120 and #121.
I've added some adjustment that you could take a look at before we merge this in.
Thanks. Looks much better now. When you're done with all your changes, could you please squash your commits.
I squashed my two commits. Let me know if you need me to do anything else.
LGTM. Good work. Now @cosenary just needs to okay this PR before going further.
Thanks!
Recent updates to the API require that count > 0 when calling search/user. Current code documentation suggests that $limit is optional, but the default $limit value is always passed to the API regardless. Since the API now won't accept 0 as a valid value, it returns an error. To maintain backwards compatibility, this change passes the count value to the API if and only if it has been explicitly set when calling searchUser().
This same pattern (unspecified $limit then turning into an explicit value for count when calling the API) exists for a number of other methods as well. To maintain consistency, the other affected methods which take $limit as an "optional" parameter have been modified to follow the same convention.