Coder Social home page Coder Social logo

jason-dgio / youtube_api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nstack-in/youtube_api

0.0 1.0 0.0 688 KB

This Plugin will help you in fetching data from Youtube. You just need YOUTUBE API KEY.

License: Apache License 2.0

Java 5.99% Objective-C 7.32% Dart 72.88% Ruby 13.81%

youtube_api's Introduction

Youtube API (youtube_api)

pub package

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.
  • Play Youtube Video [Coming Soon]

Usage

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

Complete Example Code

Example

alt text

static String key = 'YOUR_API_KEY';
YoutubeAPI ytApi = new YoutubeAPI(key);
List<YT_API> ytResult = [];

String query = "Flutter";
ytResult = await ytApi.Search(query);
// data which are available in ytResult are shown below 

These data are stored in ytResult

[
    {
        "kind": "video",
        "id": "9vzd289Eedk",
        "channelTitle": "Java",
        "title": "WEBINAR - Programmatic Trading in Indian Markets using Python with Kite Connect API",
         "description": "For traders today, Python is the most preferred programming language for trading, as it provides great flexibility in terms of building and executing strategies.",
        "publishedAt":"2016-10-18T14:41:14.000Z",
        "channelId": "UC8kXgHG13XdgsigIPRmrIyA",
        "thumbnails": {
             "default": {
              "url": "https://i.ytimg.com/vi/9vzd289Eedk/default.jpg",
              "width": 120,
              "height": 90
             },
             "medium": {
              "url": "https://i.ytimg.com/vi/9vzd289Eedk/mqdefault.jpg",
              "width": 320,
              "height": 180
             },
             "high": {
              "url": "https://i.ytimg.com/vi/9vzd289Eedk/hqdefault.jpg",
              "width": 480,
              "height": 360
             }
        },
        "channelurl":"https://www.youtube.com/channel/UC8kXgHG13XdgsigIPRmrIyA",
        "url":"https://www.youtube.com/watch?v=9vzd289Eedk"
    },
    {
      "kind": "video"
       // Here will you next result
    },
    {
       // Here will you next result
    },
    {
       // Here will you next result
        "url":"https://www.youtube.com/watch?v=9vzd289Eedk"
    }
 ]

Default per-page result is 10 .

If you want search any specif out i.e video or playlist or channel. For Channel only specify > Type : "channel"

For Video only specify > Type : "video"

For Playlist only specify > Type : "playlist"

maxResults(int) can be 1 - 50

int max = 25;

String type = "channel";

YoutubeAPI ytApi = new YoutubeAPI(key,
                                  maxResults: max,
                                  Type: type);

Note: This plugin is still under development, and some APIs might not be available yet. Feedback welcome and Pull Requests are most welcome!

youtube_api's People

Contributors

brammittendorff avatar cvadityaflipkart avatar kaushikb1996 avatar nitishk72 avatar solid-vovabeloded avatar udiedrichsen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.