본문 바로가기
프로그래밍/DB/JAVA/안드로이드/GAE

[안드로이드] YouTube DATA API 이용

by 아유카와 2013. 11. 10.

참고 사이트 : 

http://chanyhan.tistory.com/12

http://chanyhan.tistory.com/13

http://chanyhan.tistory.com/14


--------------------------------------------------------------------------------------

https://gdata.youtube.com/feeds/api/playlists/5C21EBCCB32F15E3?v=2&alt=json&max-results=50&orderby=published 

위와 같이 API를 이용해서 해당 카테고리의 영상 프리뷰, 영상 링크 등을 가져올 수 있다.


PlayList 고유문자인 "5C21EBCCB32F15E3" 는 아래와 같이 얻을 수 있다. 

먼저 https://gdata.youtube.com/feeds/api/users/chanyhan/playlists?v=2&alt=json를 해주면 chanyhan라는 사용자에 관련된 아래와 같은 JSON을 얻어 올 수 있는데 해당 데이터의 배열 Entry의 title를 보고  ID에서 해당 playlist 고유문자를 얻어 올 수 있다.




ID의 playlist:PL 이후의 영문자들이 위의 5C21EBCCB32F15E3에 해당하는 곳에 들어가면 된다.