Raises TypeError when you call an API method with invalid keyword arguments

Before this, it's confusing whether the API arguments are keyword arguments or
positional arguments. This should help that a bit.

Also fixes one occurrence of this problem.