Learn about the new Picker API and important Library API changes.
Details here.
Library API 시작하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Library API를 사용하면 사용자의 Google 포토 보관함 내에서 사진, 동영상, 앨범과 상호작용할 수 있지만 중요한 점은 애플리케이션에서 만든 콘텐츠에만 액세스하고 관리할 수 있다는 것입니다.
시작하기 전에
Library API의 주요 사용 사례
Library API는 앱에서 다음 작업을 실행해야 하는 시나리오에 적합합니다.
- 미디어 업로드 및 저장: 앱에서 생성한 사진 및 동영상을 사용자의 Google 포토 라이브러리로 안전하게 가져옵니다.
- 콘텐츠 정리: 사용자가 앱 관련 미디어를 정리할 수 있도록 앨범을 만들고 관리합니다.
- 사진 및 앨범 개선: 제목, 설명 또는 위치 정보와 같은 보강을 통해 미디어 항목과 앨범에 컨텍스트를 추가합니다.
- 앱에서 생성한 데이터에 액세스: 앱에서 이전에 만든 사진, 동영상, 앨범을 검색하고 상호작용합니다.
일반적인 Library API 워크플로
Library API는 다양한 기능을 제공하지만 일반적인 워크플로는 다음 단계를 포함할 수 있습니다.
미디어 업로드: 업로드 엔드포인트를 사용하여 사진 또는 동영상 바이트를 Google 포토에 안전하게 업로드합니다. 이 단계에서는 uploadToken
를 생성합니다.
미디어 항목 만들기: uploadToken
를 제공하는 mediaItems.batchCreate
메서드를 사용하여 사용자 라이브러리에 미디어 항목을 만듭니다.
앨범 만들기(선택사항): albums.create
메서드를 사용하여 사용자의 라이브러리 내에 앨범을 만들어 미디어 항목을 정리합니다.
앨범 관리:
앱 생성 미디어 액세스:
mediaItems.get
또는 mediaItems.batchGet
를 사용하여 특정 미디어 항목에 관한 세부정보를 가져옵니다.
mediaItems.search
를 사용하여 앱에서 만든 미디어 항목을 검색합니다.
- 앱에서 만든 특정 앨범 내의 미디어 항목을 나열하는 경우
mediaItems.search
를 앨범 ID와 함께 사용합니다.
다음 단계
- 참조 문서 검토: 자세한 Library API 참조 문서를 살펴보고 사용 가능한 모든 메서드와 매개변수에 대해 알아보세요.
- 샘플 사용해 보기: 샘플을 확인하여 라이브러리 API가 작동하는 모습을 보고 통합에 대한 아이디어를 얻으세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-06(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"]],["최종 업데이트: 2024-11-06(UTC)"],[[["The Library API allows your application to interact with photos, videos, and albums in users' Google Photos libraries, but only for content created by your application."],["Key use cases include uploading/storing media, organizing content into albums, enhancing media with details, and accessing previously created app data."],["A typical workflow involves uploading media, creating media items, optionally creating and managing albums, and accessing the app-created media."],["Before starting, ensure the Library API aligns with your needs by reviewing the overview and configuring your app for API access."]]],["The Library API enables interaction with Google Photos, specifically for app-created content. Key actions include uploading media using an `uploadToken`, creating media items in the user's library, and optionally organizing them into albums. You can also manage albums by adding or removing media, adding enrichments, and retrieving album information. The API allows retrieval and searching of app-created media items. The first step before starting to use this API is to configure your application and ensure the Library API is suitable for your use case.\n"]]