-
Notifications
You must be signed in to change notification settings - Fork 0
Latest API Documentation
rohitphogat19 edited this page May 28, 2019
·
22 revisions
let getUserSearchQuery = QueryBuilder.instance.createUserListFilter()
getUserSearchQuery.searchQuery = query
getUserSearchQuery.limit = defaultLimit
getUserSearchQuery.skip = 0
CHService.main.getUsersList(queryFilter: getUserSearchQuery, completion: {(users,error) in
// Do your Stuff here
})
CHService.main.getUser(userId:"20456",completion:{(user,error) in
// Do your Stuff here
})
CHService.main.blockUser(userId:"20456",completion:{(status,error) in
// Do your Stuff here
})
let blockedUsersQuery = QueryBuilder.instance.createBlockedUsersListFilter()
blockedUsersQuery.limit = 30
blockedUsersQuery.skip = 0
CHService.main.getBlockedUsers(queryFilter:blockedUsersQuery,completion:{(users,error) in
// Do your stuff here
})
let friendsFilter = QueryBuilder.createUserFriendsListFilter()
friendsFilter.online = true
friendsFilter.limit = 30
friendsFilter.skip = 0
friendsFilter.includeBlocked = true
friendsFilter.skipUserIds = "20456,20576,20789"
friendsFilter.searchQuery = "Leo"
friendsFilter.sort = .DESC
CHService.main.getFriendsList(queryFilter:friendsFilter,completion:{(users,error) in
// Do your Stuff Here
})
let friendsCountFilter = QueryBuilder.instance.createUserFriendsCountFilter()
friendsCountFilter.online = false
friendsCountFilter.includeBlocked = true
friendsCountFilter.searchQuery = "James"
CHService.main.getFriendsCount(queryFilter:friendsCountQueryFilter,completion:{(count,error) in
// Do your stuff here
})
CHService.main.unblockUser(userId:"20456",completion:{(status,error) in
// Do your stuff here
})