Klat
  • Klat SDK
  • Android
    • Getting Started
    • Callback
    • User
      • 사용자 생성 / 로그인
      • 사용자 정보 업데이트
      • 사용자 차단 목록 관리
      • 사용자 로그아웃
      • 사용자 삭제
    • Channel
      • 채널 생성 / 삭제
      • 채널 조회
      • 채널 정보 업데이트
      • 채널 목록 조회
      • 채널 사용자 관리
      • 채널 참여 / 나가기
      • 채널 내 메시징
      • 채널 숨기기 / 보이기
      • 채널 Freeze / Unfreeze
      • 채널 주인 변경
      • 채널 푸시알림 설정
      • 채널별 개인 데이터 설정
    • Push Notification
    • Sample Application
    • What's New
  • iOS
    • Getting Started
    • Callback
    • User
      • 사용자 생성 / 로그인
      • 사용자 정보 업데이트
      • 사용자 차단 목록 관리
      • 사용자 로그아웃
      • 사용자 삭제
    • Channel
      • 채널 생성 / 삭제
      • 채널 조회
      • 채널 정보 업데이트
      • 채널 목록 조회
      • 채널 사용자 관리
      • 채널 참여 / 나가기
      • 채널 내 메시징
      • 채널 숨기기 / 보이기
      • 채널 Freeze / Unfreeze
      • 채널 주인 변경
      • 채널 푸시알림 설정
      • 채널별 개인 데이터 설정
    • Push Notification
    • Sample Application
    • What's New
  • Unity
    • Getting Started
    • Callback
    • User
      • 사용자 생성 / 로그인
      • 사용자 정보 업데이트
      • 사용자 차단 목록 관리
      • 사용자 로그아웃
      • 사용자 삭제
    • Channel
      • 채널 생성 / 삭제
      • 채널 조회
      • 채널 정보 업데이트
      • 채널 목록 조회
      • 채널 사용자 관리
      • 채널 참여 / 나가기
      • 채널 내 메시징
      • 채널 숨기기 / 보이기
      • 채널 Freeze / Unfreeze
      • 채널 주인 변경
      • 채널 푸시알림 설정
      • 채널별 개인 데이터 설정
    • Push Notification
    • Sample Application
  • JavaScript
    • Getting Started
    • Realtime Event
    • Pagination
    • User
      • 사용자 생성 / 로그인
      • 사용자 정보 업데이트
      • 사용자 차단 목록 관리
      • 사용자 로그아웃
      • 사용자 삭제
    • Channel
      • 채널 생성 / 삭제
      • 채널 조회
      • 채널 정보 업데이트
      • 채널 목록 조회
      • 채널 사용자 관리
      • 채널 참여 / 나가기
      • 채널 내 메시징
      • 채널 숨기기 / 보이기
      • 채널 Freeze / Unfreeze
      • 채널 주인 변경
      • 채널 푸시알림 설정
      • 채널별 개인 데이터 설정
    • Push Notification (FCM)
    • Sample Application
    • What's New
  • Flutter
    • Getting Started
    • Callback
    • User
      • 사용자 생성 / 로그인
      • 사용자 정보 업데이트
      • 사용자 차단 목록 관리
      • 사용자 로그아웃
      • 사용자 삭제
    • Channel
      • 채널 생성 / 삭제
      • 채널 조회
      • 채널 정보 업데이트
      • 채널 목록 조회
      • 채널 사용자 관리
      • 채널 참여 / 나가기
      • 채널 내 메시징
      • 채널 숨기기 / 보이기
      • 채널 Freeze / Unfreeze
      • 채널 주인 변경
      • 채널 푸시알림 설정
      • 채널별 개인 데이터 설정
    • Push Notification
  • REST API
    • Getting Started
    • API
      • User
        • 사용자 생성
        • 사용자 로그인 (로그인 토큰)
        • 사용자 조회
        • 사용자 정보 업데이트
        • 사용자 활성화 / 비활성화
        • 사용자 푸시 알림 설정
        • 사용자 삭제
        • 사용자 목록 조회
        • 사용자 채널 조회
        • 사용자 차단 목록 관리
      • Channel
        • 채널 생성
        • 채널 조회
        • 채널 정보 업데이트
        • 채널 삭제
        • 채널 목록 조회
        • 채널 사용자 관리
        • 채널 내 메시징
        • 채널 숨기기 / 보이기
        • 채널 Freeze / Unfreeze
        • 채널 주인 변경
        • 채널 알림 설정
      • App
        • 앱 조회
        • 앱 생성
        • 앱 삭제
      • Bot
        • 봇 생성
        • 봇 목록 조회
        • 봇 조회
        • 봇 정보 업데이트
        • 봇 삭제
        • 봇 채널 목록 조회
        • 봇 채널 내 메시징
        • 봇 채널 참여 / 나가기
    • Push Notification
    • Rate Limit
  • MISC
    • Webhooks
    • SDK Rate Limit
    • Error Code
    • FAQ
      • Function
      • Spec
Powered by GitBook
On this page
  • 1. 전체 Public 채널 목록 조회
  • 2. 현재 참여중인 채널 목록 조회
  • 3. 숨긴 채널 목록 조회
  • 4. 전체 채널의 안 읽은 메시지 수 조회
  • 5. 전체 채널 메시지 읽음 확인
  • 6. 참여중인 채널 검색
  • 7. Public 채널 검색
  1. iOS
  2. Channel

채널 목록 조회

1. 전체 Public 채널 목록 조회

참여중이 아니더라도 전체 Public 채널 목록을 조회할 수 있습니다.

Pagination 처리가 되어 있어 다음 페이지 조회를 위해서는 이전 조회 시에 리턴받은 TPChannel 객체 중 마지막 객체를 넣으면 그 다음 페이지를 조회할 수 있습니다.

[[TalkPlus sharedInstance] getPublicChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
TalkPlus.sharedInstance()?.getPublicChannels(lastChannel, 
    success: { tpChannels, hasNext in
    // SUCCESS
    // If 'hasNext' is true, call this method with the last object in 'tpChannels'.
}, failure: { (errorCode, error) in
    // FAILURE
})

2. 현재 참여중인 채널 목록 조회

현재 참여중인 채널 목록을 조회할 수 있습니다.

Pagination 처리가 되어 있어 다음 페이지 조회를 위해서는 이전 조회 시에 리턴받은 TPChannel 객체 중 마지막 객체를 넣으면 그 다음 페이지를 조회할 수 있습니다.

[[TalkPlus sharedInstance] getChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
TalkPlus.sharedInstance()?.getChannels(lastChannel, 
    success: { tpChannels, hasNext in
    // SUCCESS
    // If 'hasNext' is true, call this method with the last object in 'tpChannels'.
}, failure: { (errorCode, error) in
    // FAILURE
})

3. 숨긴 채널 목록 조회

사용자가 hideChannel 메소드를 호출하여 숨긴 채널을 조회할 수 있습니다.

Pagination 처리가 되어 있어 다음 페이지 조회를 위해서는 이전 조회 시에 리턴받은 TPChannel 객체 중 마지막 객체를 넣으면 그 다음 페이지를 조회할 수 있습니다.

[[TalkPlus sharedInstance] getHiddenChannels:lastChannel 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
TalkPlus.sharedInstance()?.getHiddenChannels(lastChannel, 
    success: { tpChannels, hasNext in
    // SUCCESS
    // If 'hasNext' is true, call this method with the last object in 'tpChannels'.
}, failure: { (errorCode, error) in
    // FAILURE
})code

4. 전체 채널의 안 읽은 메시지 수 조회

현재 참여중인 모든 채널에 안 읽은 메시지 숫자를 조회할 수 있습니다.

[[TalkPlus sharedInstance] getTotalUnreadCount:^(int totalCount) {
    // SUCCESS
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
TalkPlus.sharedInstance()?.getTotalUnreadCount({ totalCount in
    // SUCCESS
}, failure: { (errorCode, error) in
    // FAILURE
})

5. 전체 채널 메시지 읽음 확인

현재 참여중인 모든 채널에 일괄적으로 메시지 읽음 확인 처리를 합니다.

[[TalkPlus sharedInstance] markAsReadAllChannel:^{
    // SUCCESS
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
TalkPlus.sharedInstance()?.mark(asReadAllChannel: {
    // SUCCESS
}, failure: { (errorCode, error) in
    // FAILURE
})

6. 참여중인 채널 검색

현재 참여중인 채널 목록을 검색할 수 있습니다.

  • 채널명, 채널 카테고리 이름, 유저가 설정한 태그 명, 또는 특정 사용자가 참여하고 있는지 여부로 필터링 해서 열람할 수 있습니다.

  • TPChannelQueryParams 클래스는 Klat iOS SDK v0.5.6 이상에서 지원됩니다.

  • TPChannelQueryParams 클래스의 'hasUnread'는 true (YES) 값으로 설정되었을 때만, 현재 참여 중인 채널 중에서 읽지 않은 채널 목록이 전달됩니다.

TPChannelQueryParams *params = [[TPChannelQueryParams alloc] init];
params.lastChannel = lastChannel;
params.channelName = channelName;
params.category = category;
params.subcategory = subcategory;
params.memberIds = memberIds;
params.frozenType = TPUnspecifiedFrozenChannel;
params.privateTag = privateTag;
params.hasUnread = YES;
    
[[TalkPlus sharedInstance] searchChannels:params 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
let params = TPChannelQueryParams()
params.lastChannel = lastChannel
params.channelName = channelName
params.category = category
params.subcategory = subcategory
params.memberIds = memberIds
params.frozenType = .unspecifiedFrozenChannel
params.privateTag = privateTag
params.hasUnread = true

TalkPlus.sharedInstance()?.searchChannels(params,
    success: { tpChannels, hasNext in
    // SUCCESS
    // If 'hasNext' is true, call this method with the last object in 'tpChannels'.
}, failure: { (errorCode, error) in
    // FAILURE
})

7. Public 채널 검색

Public 채널 목록을 검색할 수 있습니다.

  • 채널명, 채널 카테고리 이름, 유저가 설정한 태그 명, 또는 특정 사용자가 참여하고 있는지 여부로 필터링 해서 열람할 수 있습니다.

  • TPChannelQueryParams 클래스는 Klat iOS SDK v0.5.6 이상에서 지원됩니다.

TPChannelQueryParams *params = [[TPChannelQueryParams alloc] init];
params.lastChannel = lastChannel;
params.channelName = channelName;
params.category = category;
params.subcategory = subcategory;
params.memberIds = memberIds;
params.frozenType = TPUnspecifiedFrozenChannel;
params.privateTag = privateTag;
    
[[TalkPlus sharedInstance] searchPublicChannels:params 
    success:^(NSArray<TPChannel *> *tpChannels, BOOL hasNext) {
    // SUCCESS
    // If 'hasNext' is YES, call this method with the last object in 'tpChannels'.
} failure:^(int errorCode, NSError *error) {
    // FAILURE
}];
let params = TPChannelQueryParams()
params.lastChannel = lastChannel
params.channelName = channelName
params.category = category
params.subcategory = subcategory
params.memberIds = memberIds
params.frozenType = .unspecifiedFrozenChannel
params.privateTag = privateTag

TalkPlus.sharedInstance()?.searchPublicChannels(params,
    success: { tpChannels, hasNext in
    // SUCCESS
    // If 'hasNext' is true, call this method with the last object in 'tpChannels'.
}, failure: { (errorCode, error) in
    // FAILURE
}
Previous채널 정보 업데이트Next채널 사용자 관리

Last updated 3 months ago