kakao-partner-android-sdk-rx / com.kakao.sdk.talk / TalkApiClient

TalkApiClient

class TalkApiClient

카카오톡 API 호출을 담당하는 클라이언트.

Constructors

<init>

카카오톡 API 호출을 담당하는 클라이언트.

TalkApiClient(talkApi: TalkApi = ApiFactory.kapiWithOAuth.create(TalkApi::class.java), applicationInfo: ApplicationInfo = KakaoSdk.applicationContextInfo, contextInfo: ContextInfo = KakaoSdk.applicationContextInfo)

Functions

addChannelUrl

카카오톡 채널을 추가하기 위한 URL 반환. URL 을 브라우저나 웹뷰에서 로드하면 브릿지 웹페이지를 통해 카카오톡 실행.

fun addChannelUrl(channelPublicId: String): Uri

channelChatUrl

카카오톡 채널 1:1 대화방 실행을 위한 URL 반환. URL 을 브라우저나 웹뷰에서 로드하면 브릿지 웹페이지를 통해 카카오톡 실행.

fun channelChatUrl(channelPublicId: String): Uri

channels

사용자가 특정 카카오톡 채널을 추가했는지 확인.

fun channels(publicIds: List<String>? = null, callback: (relations: ChannelRelations?, error: Throwable?) -> Unit): Unit

friends

카카오톡 친구 목록 가져오기.

fun friends(offset: Int? = null, limit: Int? = null, order: Order? = null, friendOrder: FriendOrder? = null, callback: (friends: Friends<Friend>?, error: Throwable?) -> Unit): Unit
fun friends(context: FriendsContext?, callback: (friends: Friends<Friend>?, error: Throwable?) -> Unit): Unit

profile

카카오톡 프로필 가져오기.

fun profile(callback: (profile: TalkProfile?, error: Throwable?) -> Unit): Unit

sendCustomMemo

카카오 디벨로퍼스에서 생성한 서비스만의 커스텀 메시지 템플릿을 사용하여, 카카오톡의 나와의 채팅방으로 메시지 전송.

fun sendCustomMemo(templateId: Long, templateArgs: Map<String, String>? = null, callback: (error: Throwable?) -> Unit): Unit

sendCustomMessage

카카오 디벨로퍼스에서 생성한 서비스만의 커스텀 메시지 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지 전송.

fun sendCustomMessage(receiverUuids: List<String>, templateId: Long, templateArgs: Map<String, String>? = null, callback: (result: MessageSendResult?, error: Throwable?) -> Unit): Unit

sendDefaultMemo

기본 템플릿을 이용하여, 카카오톡의 나와의 채팅방으로 메시지 전송.

fun sendDefaultMemo(template: DefaultTemplate, callback: (error: Throwable?) -> Unit): Unit

sendDefaultMessage

기본 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지 전송.

fun sendDefaultMessage(receiverUuids: List<String>, template: DefaultTemplate, callback: (result: MessageSendResult?, error: Throwable?) -> Unit): Unit

sendScrapMemo

지정된 URL 을 스크랩하여, 카카오톡의 나와의 채팅방으로 메시지 전송.

fun sendScrapMemo(requestUrl: String, templateId: Long? = null, templateArgs: Map<String, String>? = null, callback: (error: Throwable?) -> Unit): Unit

sendScrapMessage

지정된 URL을 스크랩하여, 조회한 친구를 대상으로 카카오톡으로 메시지 전송.

fun sendScrapMessage(receiverUuids: List<String>, requestUrl: String, templateId: Long? = null, templateArgs: Map<String, String>? = null, callback: (result: MessageSendResult?, error: Throwable?) -> Unit): Unit

Companion Object Properties

instance

간편한 API 호출을 위해 기본 제공되는 singleton 객체

val instance: TalkApiClient

Extension Functions

chatList

카카오톡 채팅방 목록 가져오기.

fun TalkApiClient.chatList(filters: List<ChatFilter>? = null, offset: Int? = null, limit: Int? = null, order: Order? = null, callback: (chats: Chats?, error: Throwable?) -> Unit): Unit

chatMembers

카카오톡 채팅방에 속한 멤버들 가져오기.

fun TalkApiClient.chatMembers(chatId: Long, friendsOnly: Boolean? = null, includeProfile: Boolean? = null, offset: Int? = null, limit: Int? = null, order: Order? = null, callback: (chatMembers: ChatMembers?, error: Throwable?) -> Unit): Unit

friendsForPartner

카카오 플랫폼 내 친구 목록 가져오기.

fun TalkApiClient.friendsForPartner(friendType: FriendType? = null, friendFilter: FriendFilter? = null, friendOrder: FriendOrder? = null, offset: Int? = null, limit: Int? = null, order: Order? = null, countryCodes: List<String>? = null, callback: (friends: Friends<PartnerFriend>?, error: Throwable?) -> Unit): Unit
fun TalkApiClient.friendsForPartner(context: PartnerFriendsContext?, callback: (friends: Friends<PartnerFriend>?, error: Throwable?) -> Unit): Unit

sendCustomMessageForPartner

카카오 디벨로퍼스에서 생성한 서비스만의 커스텀 메시지 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지 전송.

fun TalkApiClient.sendCustomMessageForPartner(receiverUuids: List<String>, templateId: Long, templateArgs: Map<String, String>? = null, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

sendCustomMessageToChats

카카오 디벨로퍼스에서 생성한 서비스만의 커스텀 메시지 템플릿을 사용하여, 특정 채팅방에 카카오톡으로 메시지 전송.

fun TalkApiClient.sendCustomMessageToChats(receiverChatIds: List<Long>, templateId: Long, templateArgs: Map<String, String>? = null, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

sendDefaultMessageForPartner

기본 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡 메시지 전송.

fun TalkApiClient.sendDefaultMessageForPartner(receiverUuids: List<String>, template: DefaultTemplate, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

sendDefaultMessageToChats

기본 템플릿을 사용하여, 특정 채팅방에 카카오톡 메시지 전송.

fun TalkApiClient.sendDefaultMessageToChats(receiverChatIds: List<Long>, template: DefaultTemplate, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

sendScrapMessageForPartner

지정된 URL을 스크랩하여, 조회한 친구를 대상으로 카카오톡으로 메시지 전송.

fun TalkApiClient.sendScrapMessageForPartner(receiverUuids: List<String>, requestUrl: String, templateId: Long? = null, templateArgs: Map<String, String>? = null, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

sendScrapMessageToChats

지정된 URL 을 스크랩하여, 특정 채팅방에 카카오톡 메시지 전송.

fun TalkApiClient.sendScrapMessageToChats(receiverChatIds: List<Long>, requestUrl: String, templateId: Long? = null, templateArgs: Map<String, String>? = null, callback: (messageSendResult: PartnerMessageSendResult?, error: Throwable?) -> Unit): Unit

Companion Object Extension Properties

rx

ReactiveX 를 위한 TalkApiClient singleton 객체

val TalkApiClient.Companion.rx: RxTalkApiClient