yt 1.2.3 copy "yt: ^1.2.3" to clipboard
yt: ^1.2.3 copied to clipboard

Native Dart interface to multiple YouTube REST APIs including the Data API, Live Streaming API and Cloud Vision API.

example/example.dart

import 'dart:io';

import 'package:yt/yt.dart';

void main() async {
  final yt = Yt.withOAuth(OAuthCredentials.fromYaml('example/youtube.yaml'));

  final br = await yt.broadcast;

  final th = await yt.thumbnails;

  final broadcastItem = await br.insert(body: {
    'snippet': {
      'title': 'TEST AGAIN',
      'description': 'Test',
      'scheduledStartTime':
          DateTime.now().add(Duration(hours: 2)).toUtc().toIso8601String()
    },
    'status': {'privacyStatus': 'private'},
    'contentDetails': {
      'monitorStream': {
        'enableMonitorStream': false,
        'broadcastStreamDelayMs': 10
      },
      'enableDvr': true,
      'enableContentEncryption': true,
      'enableEmbed': true,
      'recordFromStart': true,
      'startWithSlate': false
    }
  }, part: 'snippet,status,contentDetails');

  await br.bind(
      broadcastId: broadcastItem.id,
      streamId: 'nryUpLOoYOYhjAwN6E4Wvw1589352667178384');

  print(broadcastItem);

  await th.set(
      videoId: broadcastItem.id,
      thumbnail: File(
          '/Users/chris/projects/skc/broadcast/broadcast_cli/thumbnail/pre-iftar.jpg'));

  print('image uploaded');
}
35
likes
130
points
16
downloads

Publisher

verified publishermuayid.com

Weekly Downloads

Native Dart interface to multiple YouTube REST APIs including the Data API, Live Streaming API and Cloud Vision API.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

color, crypto_keys, dio, dio_cache_interceptor, easy_enum, http_parser, image, jose, json_annotation, process_run, retrofit, universal_io, yaml

More

Packages that depend on yt