REST API 웹서비스 연동
여러분들의 프로젝트에 REST API 기반 웹서비스를 구축하고 연동하는 방법을 배울 수 있는 교육과정입니다.
- 교육신청 : http://www.devgear.co.kr/edu/reg
- 다른 교육 안내 : http://www.devgear.co.kr/edu/
진행 순서
시간 |
내용 |
관련링크 |
오전 |
[이론] REST API 이해 |
|
[이론] JSON 이란? |
||
[실습] REST API 서버 제작(RAD 서버 이용) |
||
오후 |
[실습] REST API 서버 연동 |
|
[실습] 데이터셋 기반 REST API 연동 |
||
[실습] Open API 연동 |
- |
JSON 샘플
{ "books" : { "total" :2, "book" : [ { "BOOK_SEQ" :15, "BOOK_TITLE" : "델파이 Begin...End" , "BOOK_AUTHOR" : "김원경" }, { "BOOK_SEQ" :16, "BOOK_TITLE" : "한 번에 개발하는 안드로이드 iOS앱 with 델파이. 1편" , "BOOK_AUTHOR" : "김원경 , 김현수, 오상현" } ] } } |
http://www.json.org/json-ko.html
Open API 관련링크
- 카카오 주소 검색 : http://blog.hjf.pe.kr/472
- 카카오톡 프로필 : https://developers.kakao.com/docs/restapi#카카오톡-프로필-요청
- 내 애플리케이션 등록
- 앱 키 확인
- 로그인 요청(웹브라우저)
- 성공 시 인증코드 전달(리다이렉트)
- Access Token 발급 요청
- Access Token 수신
- 서비스 API 호출(인증정보 포함)
- 다음 로컬 API : http://developers.daum.net/services/apis/local
- 다음 검색 API(책 검색) : http://developers.daum.net/services/apis/search/book
클라이언트 프로젝트
object btnLoadData: TButton
Position.X = 24.000000000000000000
Position.Y = 16.000000000000000000
TabOrder = 0
Text = #45936#51060#53552' '#47196#46300
OnClick = btnLoadDataClick
end
object Grid1: TGrid
CanFocus = True
ClipChildren = True
Position.X = 24.000000000000000000
Position.Y = 48.000000000000000000
Size.Width = 369.000000000000000000
Size.Height = 353.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
RowCount = 0
OnSelChanged = Grid1SelChanged
Viewport.Width = 365.000000000000000000
Viewport.Height = 328.000000000000000000
end
object Label1: TLabel
Position.X = 408.000000000000000000
Position.Y = 46.000000000000000000
Text = #51228#47785
TabOrder = 11
end
object edtTitle: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 12
Position.X = 408.000000000000000000
Position.Y = 65.000000000000000000
Size.Width = 257.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
end
object Label2: TLabel
Position.X = 408.000000000000000000
Position.Y = 94.000000000000000000
Text = #51200#51088
TabOrder = 6
end
object edtAuthor: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 7
Position.X = 408.000000000000000000
Position.Y = 113.000000000000000000
Size.Width = 121.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
end
object Label3: TLabel
Position.X = 408.000000000000000000
Position.Y = 142.000000000000000000
Text = 'ISBN'
TabOrder = 4
end
object edtISBN: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 5
Position.X = 408.000000000000000000
Position.Y = 161.000000000000000000
Size.Width = 121.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
end
object Label4: TLabel
Position.X = 408.000000000000000000
Position.Y = 190.000000000000000000
Text = #44032#44201
TabOrder = 2
end
object edtPrice: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 3
Position.X = 408.000000000000000000
Position.Y = 209.000000000000000000
Size.Width = 121.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
end
object Label5: TLabel
Position.X = 408.000000000000000000
Position.Y = 238.000000000000000000
Text = #44288#47144#47553#53356
TabOrder = 9
end
object edtLink: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 10
Position.X = 408.000000000000000000
Position.Y = 257.000000000000000000
Size.Width = 257.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
end
object Label6: TLabel
Position.X = 408.000000000000000000
Position.Y = 286.000000000000000000
Text = #49444#47749
TabOrder = 8
end
object mmoDescription: TMemo
Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
DataDetectorTypes = []
Position.X = 408.000000000000000000
Position.Y = 304.000000000000000000
Size.Width = 257.000000000000000000
Size.Height = 97.000000000000000000
Size.PlatformDefault = False
TabOrder = 13
Viewport.Width = 253.000000000000000000
Viewport.Height = 93.000000000000000000
end
object btnNewData: TButton
Position.X = 408.000000000000000000
Position.Y = 16.000000000000000000
TabOrder = 16
Text = #49888#44508
OnClick = btnNewDataClick
end
object btnSaveData: TButton
Position.X = 584.000000000000000000
Position.Y = 408.000000000000000000
TabOrder = 14
Text = #51200#51109
OnClick = btnSaveDataClick
end
object ImageControl1: TImageControl
Position.X = 536.000000000000000000
Position.Y = 96.000000000000000000
Size.Width = 129.000000000000000000
Size.Height = 145.000000000000000000
Size.PlatformDefault = False
TabOrder = 17
end
object btnDeleteData: TButton
Position.X = 584.000000000000000000
Position.Y = 16.000000000000000000
TabOrder = 15
Text = #49325#51228
OnClick = btnDeleteDataClick
end