Wiredcraft / dopy

Digital Ocean Python
MIT License
95 stars 62 forks source link

Stringify and lowercase boolean params for api v1 #20

Closed mhfs closed 9 years ago

mhfs commented 9 years ago

Sending boolean vars as params to the requests lib results in URLs with capitalized values such as private_networking=True. That's not recognized as truth by DO's API v1.

It would be easy to walk around by passing strings as params but not as simple when using via Ansible since it casts params to boolean under the hood.

This is a simple patch that stringify and lowercase the booleans.

Thanks!

zbal commented 9 years ago

All applied. Thanks