open-data/ckanapi — pull request #6 by seanh (2013-06-21 16:32:02+00:00)
Title: Tweak API key handling

1. Call it apikey not api_key (match internal CKAN)

2. Allow passing apikey as an optional parameter when calling action
functions. If none is passed, it falls back on the API key that was
passed to __init__ (if any).

This just means if I want to call different actions with different API
keys (common in tests) I don't need to init several API client objects.

3. Call str() on apikey before using it, this prevents crashes when e.g.
someone passes a unicode as the api key.