subscribeChannel method
dynamic
subscribeChannel({
- required String channel,
- GoogleApisClientApiKey? googleApisClientApiKey,
Implementation
subscribeChannel({
required String channel,
GoogleApisClientApiKey? googleApisClientApiKey,
}) async {
YouTubeApi youTubeApi =
await youTubeApiClient(googleApisClientApiKey: googleApisClientApiKey);
channel = "UC_x5XG1OV2P6uZZ5FSM9Ttw";
return (await youTubeApi.subscriptions.insert(
Subscription(
snippet: SubscriptionSnippet(
resourceId: ResourceId(
kind: 'youtube#channel',
channelId: channel,
),
),
),
["snippet"],
))
.toJson();
}