channels method

Future<Channels> channels([
  1. List<String>? publicIds
])

KO: 카카오톡 채널 관계 조회
publicIds에 카카오톡 채널 프로필 ID 목록 전달

EN: Check Kakao Talk Channel relationship
Pass a list of Kakao Talk Channel profile IDs to publicIds

Implementation

Future<Channels> channels([List<String>? publicIds]) async {
  SdkLog.d(
    '[TalkApi.channels] started | publicIdCount=${publicIds?.length ?? 0}',
  );
  final params = <String, String>{
    Constants.channelIds: ?publicIds?.join(','),
    Constants.channelIdType: Constants.channelPublicId,
  };
  final response = await _client.get(
    Constants.v2ChannelsPath,
    queryParameters: params,
  );
  final result = Channels.fromJson(response.data);
  SdkLog.i(
    '[TalkApi.channels] completed | channelCount=${result.channels?.length ?? 0}',
  );
  return result;
}