Reactive
extension Reactive where Base: TalkApi
TalkApi
의 ReactiveX 확장입니다.
아래는 talk/profile을 호출하는 간단한 예제입니다.
TalkApi.shared.rx.profile()
.retryWhen(AuthApiCommon.shared.rx.incrementalAuthorizationRequired())
.subscribe(onSuccess:{ (profile) in
print(profile)
}, onError: { (error) in
print(error)
})
.disposed(by: <#Your DisposeBag#>)
-
로그인된 사용자의 카카오톡 프로필 정보를 얻을 수 있습니다.
Seealso
TalkProfile
Declaration
Swift
public func profile() -> Single<TalkProfile>
-
카카오 디벨로퍼스에서 생성한 서비스만의 커스텀 메시지 템플릿을 사용하여, 카카오톡의 “나와의 채팅방"으로 메시지를 전송합니다. 템플릿을 생성하는 방법은 https://developers.kakao.com/docs/latest/ko/message/ios#create-message 을 참고하시기 바랍니다.
Declaration
Swift
public func sendCustomMemo(templateId: Int64, templateArgs: [String : String]? = nil) -> Completable
-
기본 템플릿을 이용하여, 카카오톡의 “나와의 채팅방"으로 메시지를 전송합니다.
Seealso
TemplateDeclaration
Swift
public func sendDefaultMemo(templatable: Templatable) -> Completable
-
지정된 URL을 스크랩하여, 카카오톡의 “나와의 채팅방"으로 메시지를 전송합니다.
Declaration
Swift
public func sendScrapMemo(requestUrl: String, templateId: Int64? = nil, templateArgs: [String : String]? = nil) -> Completable
-
카카오톡 친구 목록을 조회합니다.
Seealso
Friends
Declaration
Swift
public func friends(offset: Int? = nil, limit: Int? = nil, order: Order? = nil, friendOrder: FriendOrder? = nil) -> Single<Friends<Friend>>
-
기본 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다.
Declaration
Swift
public func sendDefaultMessage(templatable: Templatable, receiverUuids: [String]) -> Single<MessageSendResult>
-
카카오 디벨로퍼스에서 생성한 메시지 템플릿을 사용하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다. 템플릿을 생성하는 방법은 https://developers.kakao.com/docs/latest/ko/message/ios#create-message 을 참고하시기 바랍니다.
Seealso
MessageSendResult
Declaration
Swift
public func sendCustomMessage(templateId: Int64, templateArgs: [String : String]? = nil, receiverUuids: [String]) -> Single<MessageSendResult>
-
지정된 URL을 스크랩하여, 조회한 친구를 대상으로 카카오톡으로 메시지를 전송합니다. 스크랩 커스텀 템플릿 가이드(https://developers.kakao.com/docs/latest/ko/message/ios#send-kakaotalk-msg) 를 참고하여 템플릿을 직접 만들고 스크랩 메시지 전송에 이용할 수도 있습니다.
Seealso
MessageSendResult
Declaration
Swift
public func sendScrapMessage(requestUrl: String, templateId: Int64? = nil, templateArgs: [String : String]? = nil, receiverUuids: [String]) -> Single<MessageSendResult>
-
사용자가 특정 카카오톡 채널을 추가했는지 확인합니다.
Seealso
Channel
Declaration
Swift
public func channels(publicIds: [String]? = nil) -> Single<Channels>