Tenor의 V1 API에서 마이그레이션하는 방법
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Tenor의 V1 API를 사용하는 기존 통합의 경우 이 페이지의 단계에 따라 V2로 마이그레이션하세요.
V2 API 키 가져오기
V1 버전을 대체할 V2 API 키를 가져오려면 빠른 시작 가이드의 설정 단계에 나온 안내를 따르세요.
V2 도메인으로 업데이트
API 도메인을 https://tenor.googleapis.com/v2/
로 업데이트합니다. Tenor의 V2 API는 HTTPS 연결만 지원합니다. 콘텐츠의 경우 애플리케이션이 https://media.tenor.com
및 https://c.tenor.com
에서 콘텐츠 다운로드를 지원하는지 확인하세요.
예를 들어 다음 V1 도메인 중 하나에 API를 호출했다고 가정해 보겠습니다.
https://api.tenor.com/v1/search?<parameters>
https://g.tenor.com/v1/search?<parameters>
V2 호출을 업데이트하려면 호출을 https://tenor.googleapis.com/v2/search?<parameters>
로 변경합니다.
엔드포인트 변경사항
대부분의 API 엔드포인트 매개변수는 V1에 설명된 것과 동일합니다. 주목할 만한 예외는 다음과 같습니다.
- Tenor의 검색 엔드포인트에서 이제
searchfilter
매개변수를 통한 스티커 검색을 지원합니다.
- API 호출에
client_key
및 country
매개변수를 포함합니다.
- 이제
media_filter
매개변수는 미리 설정된 enum이 아닌 원하는 형식의 쉼표로 구분된 목록을 사용합니다.
- 이제 카테고리 엔드포인트에서
type
매개변수에 featured
및 trending
를 지원합니다.
- API가 더 이상
anon_id
매개변수를 지원하지 않습니다.
- 요청할 결과 페이지가 더 이상 없는 경우 API 응답의
next
필드가 이제 "0"
가 아닌 빈 문자열입니다.
사용 가능한 엔드포인트가 다음과 같이 변경되었습니다.
- 인기 급상승 동영상 엔드포인트는 더 이상 지원되지 않습니다. 대신 추천 엔드포인트를 사용하는 것이 좋습니다.
- GIF 엔드포인트가 게시물 엔드포인트로 리브랜딩되었습니다.
- 임의 GIF 엔드포인트가
random
매개변수를 통해 검색 엔드포인트에 통합되었습니다.
응답 객체 및 오류 변경사항
- GIF 객체가 응답 객체로 리브랜딩되었습니다.
- 응답 객체에서
media
필드가 media_formats
로 리브랜딩되었습니다. media_formats
의 값은 이제 지도 배열이 아닌 지도 { CONTENT_FORMAT : MEDIA_OBJECT }
입니다.
- 콘텐츠 미리보기 이미지 미리보기는 각 콘텐츠 형식의 미디어 객체에서 자체 형식으로 이동되었습니다. 응답 객체의
media_formats
필드 아래에 제공됩니다.
- 응답 객체에 더 이상 결과가 없으면
next
필드는 "0"
이 아닌 빈 문자열 ""
입니다.
- Tenor API 오류 코드가 Google의 표준 API 오류 코드로 이전되었습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2023-07-11(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2023-07-11(UTC)"],[[["Existing Tenor integrations using the V1 API must migrate to V2 by updating API keys, domains, and endpoints."],["V2 introduces changes to endpoints, parameters, and response objects, including sticker search and rebranded elements."],["Developers should update their API calls to use `https://tenor.googleapis.com/v2/` and ensure HTTPS support for content downloads."],["Notable endpoint changes include the removal of the Trending endpoint, renaming of GIF to Posts, and incorporating Random GIF into Search."],["Response objects and errors have been updated, including renaming the GIF Object to Response Object and modifying the `media` field to `media_formats`."]]],["To migrate from Tenor's V1 to V2 API, obtain a new V2 API key and update API domains to `https://tenor.googleapis.com/v2/`, ensuring support for content downloads from `https://media.tenor.com` and `https://c.tenor.com`. Key endpoint updates include sticker search via `searchfilter`, `client_key` and `country` parameters, comma-separated `media_filter` formats, and changes to Categories. `Trending` is replaced by `Featured`, `GIF` becomes `Posts`, `Random GIF` is under `Search`. Response object changes involve `media` to `media_formats` and updated error codes.\n"]]