twilio/twilio-python — Issue #37: ListResource.count method should take parameters
Author: erikcw
Created: 2011-11-10 00:18:14+00:00
State: open

The ListResouce.count() method should either take parameters, or should be chainable to the list() method.

For example:

client.calls.list(to='+15553331234', ended_before= datetime.date.today()).count()

#or

client.calls.count(to='+15553331234', ended_before= datetime.date.today())

Alternatively (or maybe additionally), the list method should return a custom List object, which would be a Python list with a couple of extra properties that would allow you to access the parameters in the XML response (kind of like a Django Queryset object)