kakao-android-sdk-rx / com.kakao.sdk.story / StoryApiClient

StoryApiClient

class StoryApiClient

카카오 Open API 의 카카오스토리 API 호출을 담당하는 클라이언트.

Constructors

<init>

카카오 Open API 의 카카오스토리 API 호출을 담당하는 클라이언트.

StoryApiClient(storyApi: StoryApi = ApiFactory.kapiWithOAuth.create(StoryApi::class.java))

Functions

delete

카카오스토리의 특정 내스토리 정보를 지울 수 있습니다.

fun delete(id: String, callback: (error: Throwable?) -> Unit): Unit

isStoryUser

사용자가 카카오스토리 사용자인지 아닌지를 판별합니다.

fun isStoryUser(callback: (isStoryUser: Boolean?, error: Throwable?) -> Unit): Unit

linkInfo

포스팅하고자 하는 URL 을 스크랩하여 링크 정보를 생성합니다.

fun linkInfo(url: String, callback: (linkInfo: LinkInfo?, error: Throwable?) -> Unit): Unit

postLink

카카오스토리에 링크(스크랩 정보)를 포스팅합니다. 먼저 포스팅하고자 하는 URL로 스크랩 API를 호출한 후 반환된 링크 정보를 파라미터로 전달하여 포스팅 해야 합니다.

fun postLink(linkInfo: LinkInfo, content: String, permission: Permission = Story.Permission.PUBLIC, enableShare: Boolean = true, androidExecParams: Map<String, String>? = null, iosExecParams: Map<String, String>? = null, androidMarketParams: Map<String, String>? = null, iosMarketParams: Map<String, String>? = null, callback: (storyPostResult: StoryPostResult?, error: Throwable?) -> Unit): Unit

postNote

카카오스토리에 글(노트)을 포스팅합니다.

fun postNote(content: String, permission: Permission = Story.Permission.PUBLIC, enableShare: Boolean = true, androidExecParams: Map<String, String>? = null, iosExecParams: Map<String, String>? = null, androidMarketParams: Map<String, String>? = null, iosMarketParams: Map<String, String>? = null, callback: (storyPostResult: StoryPostResult?, error: Throwable?) -> Unit): Unit

postPhoto

카카오스토리에 사진(들)을 포스팅합니다.

fun postPhoto(images: List<String>, content: String, permission: Permission = Story.Permission.PUBLIC, enableShare: Boolean = true, androidExecParams: Map<String, String>? = null, iosExecParams: Map<String, String>? = null, androidMarketParams: Map<String, String>? = null, iosMarketParams: Map<String, String>? = null, callback: (storyPostResult: StoryPostResult?, error: Throwable?) -> Unit): Unit

profile

로그인된 사용자의 카카오스토리 프로필 정보를 얻을 수 있습니다.

fun profile(secureResource: Boolean? = true, callback: (profile: StoryProfile?, error: Throwable?) -> Unit): Unit

stories

카카오스토리의 복수개의 내스토리 정보들을 얻을 수 있습니다. 단, comments, likes 등의 상세정보는 없으며 이는 내스토리 정보 요청 story(id:)을 통해 얻을 수 있습니다.

fun stories(lastId: String? = null, callback: (stories: List<Story>?, error: Throwable?) -> Unit): Unit

story

카카오스토리의 특정 내스토리 정보를 얻을 수 있습니다. comments, likes등의 상세정보도 포함됩니다.

fun story(id: String, callback: (story: Story?, error: Throwable?) -> Unit): Unit

upload

로컬 이미지 파일 여러장을 카카오스토리에 업로드합니다.

fun upload(images: List<File>, callback: (uploadedPaths: List<String>?, error: Throwable?) -> Unit): Unit

Companion Object Properties

instance

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

val instance: StoryApiClient

Companion Object Extension Properties

rx

Reactive-X 를 위한 StoryApiClient singleton 객체

val StoryApiClient.Companion.rx: RxStoryApiClient