forked from intercom/python-intercom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscroll.py
More file actions
17 lines (13 loc) · 631 Bytes
/
Copy pathscroll.py
File metadata and controls
17 lines (13 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8 -*-
"""Operation to scroll through users."""
from intercom import utils
from intercom.scroll_collection_proxy import ScrollCollectionProxy
class Scroll(object):
"""A mixin that provides `scroll` functionality."""
def scroll(self, **params):
"""Find all instances of the resource based on the supplied parameters."""
collection_name = utils.resource_class_to_collection_name(
self.collection_class)
finder_url = "/{}/scroll".format(collection_name)
return ScrollCollectionProxy(
self.client, self.collection_class, collection_name, finder_url)