패키지, 저장소 및 앱 카테고리 검색

youtube_api 표지
패키지 상세v1.0.4

youtube_api

YouTubeAPI는 YouTube 서버와 직접 상호 작용하는 플러그인입니다. 동영상 및 재생 목록 검색을 지원합니다.

30일 다운로드
143
좋아요
85
Pub 점수
100

패키지 설치

flutter pub add youtube_api

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

YouTubeAPI는 Flutter 플러그인으로, YouTube 서버와 직접 상호작용할 수 있게 해 주며 개발자가 동영상과 재생목록을 검색할 수 있도록 합니다. 간단함과 효율성을 위해 설계되었으며, 복잡한 설정 없이도 Flutter 애플리케이션에 원활하게 통합되어 YouTube의 핵심 검색 기능에 접근할 수 있습니다. 이 플러그인은 nstack.in에서 유지보수되며 GitHub에 호스팅되어 오픈소스 기여가 가능합니다. Android 및 iOS 플랫폼을 모두 지원하지만 메타데이터에는 구체적인 플랫폼 세부 정보는 포함되어 있지 않습니다.

사용 사례

  • 앱에 YouTube 동영상 검색 통합하기
  • 프로그래밍 방식으로 재생 목록 데이터 가져오기
  • 미디어 탐색 기능 구축
  • 비디오 추천 시스템 만들기
  • 사용자 중심 콘텐츠 탐색 활성화

주요 기능

  • 직접 YouTube 서버 통신
  • 비디오 및 플레이리스트 검색 기능
  • Flutter와의 간단한 통합
  • GitHub의 오픈소스 코드베이스
  • 크로스 플랫폼 지원 (Android/iOS)

적합한 대상

  • 미디어가 풍부한 Flutter 앱을 개발하는 개발자
  • YouTube 콘텐츠 탐색이 필요한 앱
  • 실시간 동영상 검색이 필요한 프로젝트
  • 비디오 도구 오픈소스 기여자
  • 교육 또는 엔터테인먼트 앱 제작자

고려 사항

  • API 호출을 위해 인터넷 연결이 필요합니다
  • YouTube의 공개 API 사용 가능 여부에 따라 다릅니다
  • 생산 환경 사용 시 API 키 구성이 필요할 수 있습니다
  • 검색 기능에 제한됨(재생 컨트롤 없음)
  • 메타데이터에 공식 문서가 제공되지 않았습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

YouTube API Client (youtube_api_client)

Forked (all restructured and improved) from youtube_api

A Flutter plugin for fetching interacting with YouTube Server to fetch data using API. Supports iOS and Android.

Features:

  • Search Video, Playlist, Channel on YouTube (query by keywords or by ID)
  • Get Trending Videos based on region code.

Usage

To use this plugin, add youtube_api_client as a dependency in your pubspec.yaml file.

Complete Example Code

Example
static String key = "YOUR_API_KEY";
final youtube = YoutubeApi(_key);
List<ApiResult> result = [];

Search for videos, channels and playlists

String query = "Flutter";
result = await youtube.search(query);
// data which are available in result is typed as in the example shown below

By default the search options are like the following:

SearchOptions options = const SearchOptions(
      type: ResultType.values,
      order: Order.relevance,
      videoDuration: VideoDuration.any,
    )

But you can customize them changing the parameter options. For example, if you want to get only results for channels, you can specify like so:

SearchOptions(type: ResultType.channel)

To get Trending videos in your Country-

regionCode='YOUR_COUNTRY_REGION_CODE(apha-2)';
result = await youtube.getTrends(regionCode);
//make sure you assign alpha-2 region code

To get results by id use searchVideosById, searchChannelsById, and searchPlaylistsById.

result = await youtube.searchVideosById(idList);

You can find your Country Region Code here

By default, it retrieves only the "snippet" data, which has enough information for most of the cases.

For example the snippet for a video contains:

  1. title (String)
  2. description (String)
  3. publish date (DateTime)
  4. channel ID (String)
  5. channel title (String)
  6. thumbnails (Map<ThumbnailResolution, Thumbnail> - custom classes)
  7. video category (Category - enum)
  8. tags (List)
  9. default language (String)
  10. defaultAudioLanguage (String)
  11. live broadcast content (LiveBroadcastContent - enum)

If you need more information from the API, you can add other parts in the query. For now it has only the part "snippet" and "content details" (containing: duration, dimension, definition, caption, licensed content, and projection). The original API has lots more of information, so you are welcome to help implementing those making pull requests.

Motivation

The original package seems to be abandoned. I improved a lot its code, making it more typed, and added more features.

카테고리

의존성

의존성 목록 2 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.