Skip to content

Commit 4979906

Browse files
committed
Moving All into it's own module.
1 parent ecd5c61 commit 4979906

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

intercom/api_operations/all.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from intercom import utils
2+
from intercom.collection_proxy import CollectionProxy
3+
4+
5+
class All(object):
6+
7+
@classmethod
8+
def all(cls):
9+
collection = utils.resource_class_to_collection_name(cls)
10+
print "list %s" % (collection)
11+
finder_url = "/%s" % (collection)
12+
return CollectionProxy(cls, collection, finder_url)

intercom/user.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import datetime
1111
import time
1212
import types
13+
from intercom.api_operations.all import All
1314
from intercom.api_operations.find import Find
1415
from intercom.api_operations.find_all import FindAll
1516
from intercom.api_operations.save import Save
@@ -235,15 +236,6 @@ def increment(self, key, value=1):
235236
self.custom_attributes[key] = existing_value + value
236237

237238

238-
class All(object):
239-
240-
@classmethod
241-
def all(cls):
242-
collection = utils.resource_class_to_collection_name(cls)
243-
print "list %s" % (collection)
244-
finder_url = "/%s" % (collection)
245-
return CollectionProxy(cls, collection, finder_url)
246-
247239

248240
class Count(object):
249241

0 commit comments

Comments
 (0)