oEmbed μž‘μ—…ν•˜κΈ°

πŸ“˜

이 κΈ°λŠ₯을 μ‚¬μš©ν•˜κΈ° μœ„ν•΄ λ³„λ„μ˜ API 인증이 ν•„μš”ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

oEmbed

oEmbedλŠ” μ›Ήμ‚¬μ΄νŠΈμ˜ μ½˜ν…μΈ λ₯Ό λ‹€λ₯Έ νŽ˜μ΄μ§€μ— 포함할 수 μžˆλ„λ‘ μ„€κ³„λœ κ°œλ°©ν˜• ν‘œμ€€μž…λ‹ˆλ‹€.
μ΄λŠ” νŠΉμ • μ’…λ₯˜μ˜ λ―Έλ””μ–΄ μ½˜ν…μΈ λ₯Ό μ™ΈλΆ€ μ›Ήμ‚¬μ΄νŠΈμ— μ‰½κ²Œ λ°°μΉ˜ν•  수 μžˆλŠ” 방법을 μ œκ³΅ν•©λ‹ˆλ‹€. ν¬ν•¨ν•˜λ €λŠ” μ½˜ν…μΈ μ— ν•΄λ‹Ήν•˜λŠ” 특수 URL에 μ•‘μ„ΈμŠ€ν•˜λ©΄ 포함 κ°€λŠ₯ν•œ μš”μ†Œλ₯Ό ν¬ν•¨ν•˜μ—¬ μ½˜ν…μΈ μ— λŒ€ν•œ μžμ„Έν•œ 정보λ₯Ό 얻을 수 μžˆμŠ΅λ‹ˆλ‹€.

μœ„μΊ”λ””μ˜€μ—μ„œλŠ” Play URL둜 oEmbedλ₯Ό μ‚¬μš©ν•˜μ—¬ ν•΄λ‹Ή λΉ„λ””μ˜€μ— λŒ€ν•œ 포함 κ°€λŠ₯ν•œ μš”μ†Œλ₯Ό 생성할 수 μžˆμŠ΅λ‹ˆλ‹€.

oEmbed 응닡 λ°›κΈ°

oEmbed API둜 ν•΄λ‹Ή μ½˜ν…μΈ μ˜ 정보λ₯Ό μ•„λž˜μ™€ 같은 ν˜•μ‹μœΌλ‘œ μš”μ²­ν•©λ‹ˆλ‹€.

{oEmbed API endpoint}?url={μ½˜ν…μΈ  μ£Όμ†Œ}&format={XML/JSON}

URL μŠ€ν‚€λ§ˆ

GET https://play.wecandeo.com/oembed/?url={PlayURL}
GET https://play.wecandeo.com/oembed/?key={videoKey}

μœ„μΊ”λ””μ˜€ κ³΅κΈ‰μž 정보

provider_name: wecandeo
  provider_url: https://www.wecandeo.com/
  endpoints:
   schemes:
      https://play.wecandeo.com/video/v/*
   url: https://play.wecandeo.com/oembed/
   discovery: true
   example_urls:
      https://play.wecandeo.com/oembed/?url=https%3A%2F%2Fplay.wecandeo.com%2Fvideo%2Fv%2F%3Fkey%3DBOKNS9AQWrHDOWXC7DUr6tHd023xknvmIii8SOulPCMtAT1KxqmfHySho4pqLKNis4ZCy4IG7kZTQ431147TteoAieie
      https://play.wecandeo.com/oembed/?url=https%3A%2F%2Fplay.wecandeo.com%2Fvideo%2Fv%2F%3Fkey%3DBOKNS9AQWrHDOWXC7DUr6tHd023xknvmIii8SOulPCMtAT1KxqmfHySho4pqLKNis4ZCy4IG7kZTQ431147TteoAieie&format=json
...

λΉ„λ””μ˜€ μ‚½μž…

μ‘λ‹΅μ—λŠ” μ‚½μž… κ°€λŠ₯ν•œ μš”μ†Œκ°€ ν¬ν•¨λœ html ν•„λ“œλ₯Ό ν¬ν•¨ν•˜μ—¬ JSON(λ˜λŠ” XML)ν˜•μ‹μ˜ μ—¬λŸ¬ 메타데이터가 μ œκ³΅λ©λ‹ˆλ‹€.
이 λ°˜ν™˜λœ 데이터λ₯Ό μ‚¬μš©ν•˜μ—¬ μ‚¬μ΄νŠΈμ— ν•„μš”ν•œ 데이터λ₯Ό μ‚½μž…ν•©λ‹ˆλ‹€.

Response Sample

{
  url: "https://play.wecandeo.com/video/v/?key=BOKNS9AQWrHDOWXC7DUr6tHd023xknvmIii8SOulPCMtAT1KxqmfHySho4pqLKNis4ZCy4IG7kZTQ431147TteoAieie",
  type: "video",
  version: "1.0",
  title: "WECANDEO Promote",
	author: "",
	author_url: "",
	provider_name: "wecandeo",
	description: "",
	thumbnail_url: "http://timgs.acs.wecandeo.com/thumb/513/20150724/17/2257_6c4bd_00000_640_360.jpg",
	duration: 59.2,
	thumbnail_width: 640,
	thumbnail_height: 360,
	html: "<div style="position:relative; padding-bottom:56.25%; overflow:hidden;"><iframe width="100%" height="100%" src="https://play.wecandeo.com/video/v/?key=BOKNS9AQWrHDOWXC7DUr6tHd023xknvmIii8SOulPCMtAT1KxqmfHySho4pqLKNis4ZCy4IG7kZTQ431147TteoAieie" frameborder="0" allowfullscreen="" style="position:absolute;"></iframe></div>",
	cache_age: 86400,
}