File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,27 @@ while(users.hasNext()) {
139139 System . out. println(users. next(). getUserId());
140140}
141141
142+ // List users (sorting)
143+ Map<String , String > params = Maps . newHashMap();
144+ params. put(" sort" , " updated_at" );
145+ params. put(" order" , " asc" );
146+ UserCollection users = User . list(params);
147+
148+ // List users (created within the past X days)
149+ Map<String , String > params = Maps . newHashMap();
150+ params. put(" created_since" , " 2" );
151+ UserCollection users = User . list(params);
152+
153+ // List users by tag
154+ Map<String , String > params = Maps . newHashMap();
155+ params. put(" tag_id" , " 12345" );
156+ UserCollection users = User . list(params);
157+
158+ // List users by segment
159+ Map<String , String > params = Maps . newHashMap();
160+ params. put(" segment_id" , " 1234567890abcdef12345678" );
161+ UserCollection users = User . list(params);
162+
142163// Retrieve users via Scroll API
143164ScrollableUserCollection usersScroll = User . scroll();
144165List<User > users = usersScroll. getPage();
You can’t perform that action at this time.
0 commit comments