8000 Merge pull request #20 from twilio/remove-count · stomatocode/twilio-python@7737345 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7737345

Browse files
committed
Merge pull request twilio#20 from twilio/remove-count
Remove deprecated count function
2 parents f0cfb8d + 00ddd04 commit 7737345

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

twilio/rest/resources/base.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -391,29 +391,6 @@ def update_instance(self, sid, body):
391391
resp, entry = self.request("POST", uri, data=transform_params(body))
392392
return self.load_instance(entry)
393393

394-
def count(self):
395-
""" .. deprecated:: 3.6.5
396-
397-
Get the total number of instances for this resource
398-
399-
Note: this query can be slow if you have many instances.
400-
401-
:return: the total number of instances
402-
:rtype: int
403-
:raises: a :exc:`~twilio.TwilioRestException` if the request fails
404-
405-
406-
Example usage:
407-
408-
.. code-block:: python
409-
410-
print client.calls.count() # prints 323
411-
"""
412-
# XXX: this should make a request with PageSize=1 to return as quickly
413-
# as possible
414-
resp, page = self.request("GET", self.uri)
415-
return page["total"]
416-
417394
def iter(self, **kwargs):
418395
""" Return all instance resources using an iterator
419396

0 commit comments

Comments
 (0)
0