TalkApi
extension TalkApi
카카오톡 API 호출을 담당하는 클래스입니다.
-
수신자 아이디 타입 열거형
See moreDeclaration
Swift
public enum ReceiverIdType : String
-
카카오톡 채팅방 목록을 가져옵니다.
Seealso
Chats
Declaration
Swift
public func chatList(filters: [ChatFilter]? = nil, offset: Int? = nil, limit: Int? = nil, order: Order? = nil, completion:@escaping (Chats?, Error?) -> Void)
-
사용자의 카카오톡 채팅방에 속한 멤버를 조회합니다. 채팅방 아이디를 기준으로 조회하며 친구인 멤버만 조회할지 여부를 선택할 수 있습니다.
Seealso
ChatMembers
Declaration
Swift
public func chatMembers(chatId:Int64, friendsOnly:Bool, includeProfile: Bool? = nil, offset: Int? = nil, limit: Int? = nil, order: Order? = nil, completion:@escaping (ChatMembers?, Error?) -> Void)
-
기본 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다.
Declaration
Swift
public func sendDefaultMessageForPartner(templatable:Templatable, receiverIdType:ReceiverIdType, receiverIds:[Any], completion:@escaping (PartnerMessageSendResult?, Error?) -> Void)
-
개발자사이트에서 생성한 메시지 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다. 템플릿을 생성하는 방법은 https://developers.kakao.com/docs/template 을 참고하시기 바랍니다.
Declaration
Swift
public func sendCustomMessageForPartner(templateId: Int64, templateArgs:[String:Any]? = nil, receiverIdType:ReceiverIdType, receiverIds:[Any], completion:@escaping (PartnerMessageSendResult?, Error?) -> Void)
-
sendScrapMessageForPartner(requestUrl:templateId:templateArgs:receiverIdType:receiverIds:completion:)
지정된 URL을 스크랩하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다. 스크랩 커스텀 템플릿 가이드를 참고하여 템플릿을 직접 만들고 스크랩 메시지 전송에 이용할 수도 있습니다.
Declaration
Swift
public func sendScrapMessageForPartner(requestUrl: String, templateId: Int64? = nil, templateArgs:[String:Any]? = nil, receiverIdType:ReceiverIdType, receiverIds:[Any], completion:@escaping (PartnerMessageSendResult?, Error?) -> Void)
-
카카오톡 친구 목록을 조회합니다. Open SDK의 확장으로 앱에 가입되지 않은 친구도 조회할 수 있습니다.
Seealso
PartnerFriend
Declaration
Swift
public func friendsForPartner(friendType: FriendType? = nil, friendFilter: FriendFilter? = nil, friendOrder: FriendOrder? = nil, offset: Int? = nil, limit: Int? = nil, order: Order? = nil, completion:@escaping (Friends<PartnerFriend>?, Error?) -> Void)
-
카카오톡 친구 목록을 FriendContext를 파라미터로 조회합니다. Open SDK의 확장으로 앱에 가입되지 않은 친구도 조회할 수 있습니다.
Seealso
PartnerFriendsContext
Declaration
Swift
public func friendsForPartner(context: PartnerFriendsContext?, completion:@escaping (Friends<PartnerFriend>?, Error?) -> Void)