API
- Description:
카카오 API와 관련된 함수들이 포함되어 있습니다.
Methods
(static) cleanup()
- Description:
API를 호출하기 위해 사용한 리소스를 해제합니다.
(static) request(settings) → {Promise}
- Description:
카카오 API를 호출할 수 있습니다.
- See:
-
- 데모 보러가기
- REST API 레퍼런스 각 API에 대한 요청 파라미터와 응답은 REST API와 동일합니다.
Example
Kakao.API.request({
url: '/v2/user/me', // 사용자 정보 가져오기
})
.then(function(response) {
console.log(response)
})
.catch(function(error) {
console.error(error)
})
Kakao.API.request({
url: '/v1/user/update_profile', // 사용자 정보 저장하기
data: {
properties: {
preferred_brand: 'Kakao',
},
},
})
.then(function(response) {
console.log(response)
})
.catch(function(error) {
console.error(error)
})
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
settings |
Object | API 호출과 관련된 설정을 key/value로 전달합니다. Properties
|
Returns:
- Type
- Promise