일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- django
- 파이썬
- 자본주의
- oracle
- MSSQL PYTHON
- 딥러닝
- scrapy
- Python
- 윈도우10
- 오라클
- rs422
- Serial
- MSSQL
- 장고
- Visual Studio Code
- vscode
- PYTHON MSSQL
- 티스토리 초대장
- tensorflow
- matplot
- c#
- pymssql
- M2M
- sql developer
- MX Component
- 크롤링
- rs485
- 텐서플로우
- MEAN Stack
- windows10
Archives
- Today
- Total
안까먹을라고 쓰는 블로그
[조코딩] [JavaScript 기초와 활용 #2] API의 개념과 활용! 카카오 책 검색 기능 구현하기 본문
반응형
Kakao Developers_
더 나은 세상을 꿈꾸고 그것을 현실로 만드는 이를 위하여 카카오에서 앱 개발 플랫폼 서비스를 시작합니다.
developers.kakao.com
※ 카카오 API를 사용하려면은 키를 받아서 데이터 요청시 참조해서 보내야 합니다.
kakao 책 검색 API
https://dapi.kakao.com/v3/search/book
jQuery CDN
The integrity and crossorigin attributes are used for Subresource Integrity (SRI) checking. This allows browsers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libr
code.jquery.com
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API 연습</title>
</head>
<body>
<h1>내 사이트임 ㅎㅇ</h1>
<p></p>
<script src="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script>
$.ajax({
method: "GET",
url: "https://dapi.kakao.com/v3/search/book?target=title",
data: { query:"미움받을 용기" },
headers: {Authorization: "KakaoAK 1e08f2107796754de0b223b8b15e17e8"}
})
.done(function (msg) {
// alert("Data Saved: " + msg);
// console.log(msg.documents[0].title);
// console.log(msg.documents[0].thumbnail);
$( "p" ).append( "<strong>" + msg.documents[0].title + "</strong>" );
$( "p" ).append( "<img src = '" + msg.documents[0].thumbnail + "'/>" );
});
</script>
</body>
</html>
Visual Studio Code - 코드 자동정리
Ctrl + A => Ctrl + K + F
https://www.youtube.com/watch?v=QPEUU89AOg8
반응형
Comments