8000 Remove deprecated count function · AlbertoALopez/twilio-python@00ddd04 · GitHub
[go: up one dir, main page]

Skip to content

Commit 00ddd04

Browse files
committed
Remove deprecated count function
1 parent f0cfb8d commit 00ddd04

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