Clever/clever-python — pull request #30 by eosrei (2014-11-02 00:18:28+00:00)
Title: Fix CLI 'APIRequestor' object has no attribute 'encode' plus return failure on HTTP status!=200

*Note: This pull request depends on #29. Please discuss/merge it first... or whatever.*

The cli query params code was using `encode()`, but it was renamed to `urlencode()`. I wrote tests and discovered the script was returning 0 even when HTTP status wasn't 200. So, I fixed that.

Here is the error (generated using the working cli code in #29):
```
$ bin/clever student all -k DEMO_KEY count=true
Traceback (most recent call last):
File "bin/clever", line 213, in
sys.exit(main())
File "bin/clever", line 210, in main
return method(params)
File "bin/clever", line 85, in all
self.logged_curl('get', url, params)
File "bin/clever", line 29, in logged_curl
self.log_request(method, url, params, dict_params)
File "bin/clever", line 38, in log_request
url = '%s?%s' % (url, clever.APIRequestor().encode(dict_params))
AttributeError: 'APIRequestor' object has no attribute 'encode'
```