Reactive

extension Reactive where Base: LinkApi

LinkApi의 ReactiveX 확장입니다.

아래는 스크랩 템플릿으로 호출하는 간단한 예제입니다.‘, :path => ’./RxKakaoSDKCommon.podspec’

LinkApi.shared.rx.scrapLink(requestUrl: "https://developers.kakao.com")
    .subscribe(onSuccess: { (linkResult) in
        UIApplication.shared.open(linkResult.url, options: [:], completionHandler: nil)
    }, onError: {error in
        print(error)
    })
   .disposed(by: <#Your DisposeBag#>)
  • 템플릿 조회 API 응답을 카카오링크 URL로 변환합니다.

    Seealso

    LinkResult

    Declaration

    Swift

    public func createLinkResultComposeTransformer() -> ComposeTransformer<(ValidationResult, [String : Any]?), LinkResult>
  • 기본 템플릿을 카카오톡으로 공유합니다.

    Seealso

    Template
    LinkResult

    Declaration

    Swift

    public func defaultLink(templatable: Templatable, serverCallbackArgs: [String : String]? = nil) -> Single<LinkResult>
  • 기본 템플릿을 카카오톡으로 공유합니다.

    Seealso

    LinkResult

    Declaration

    Swift

    public func defaultLink(templateObject: [String : Any], serverCallbackArgs: [String : String]? = nil) -> Single<LinkResult>
  • 지정된 URL을 스크랩하여 만들어진 템플릿을 카카오톡으로 공유합니다.

    Seealso

    LinkResult

    Declaration

    Swift

    public func scrapLink(requestUrl: String, templateId: Int64? = nil, templateArgs: [String : String]? = nil, serverCallbackArgs: [String : String]? = nil) -> Single<LinkResult>
  • 개발자사이트에서 생성한 메시지 템플릿을 카카오톡으로 공유합니다. 템플릿을 생성하는 방법은 https://developers.kakao.com/docs/template 을 참고하시기 바랍니다.

    Seealso

    LinkResult

    Declaration

    Swift

    public func customLink(templateId: Int64, templateArgs: [String : String]? = nil, serverCallbackArgs: [String : String]? = nil) -> Single<LinkResult>
  • 카카오링크 컨텐츠 이미지로 활용하기 위해 로컬 이미지를 카카오 이미지 서버로 업로드 합니다.

    Declaration

    Swift

    public func imageUpload(image: UIImage, secureResource: Bool = true) -> Single<ImageUploadResult>
  • 카카오링크 컨텐츠 이미지로 활용하기 위해 원격 이미지를 카카오 이미지 서버로 스크랩 합니다.

    Declaration

    Swift

    public func imageScrap(imageUrl: URL, secureResource: Bool = true) -> Single<ImageUploadResult>