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 {
  var queryParameters = {
    Constants.channelIds: publicIds?.join(','),
    Constants.channelIdType: Constants.channelPublicId,
  };
  queryParameters.removeWhere((k, v) => v == null);

  return ApiFactory.handleApiError(() async {
    Response response = await _dio.get(
      Constants.v2ChannelsPath,
      queryParameters: queryParameters,
    );
    return Channels.fromJson(response.data);
  });
}