insert method

Future<Subscription> insert({
  1. String part = 'contentDetails,id,snippet,subscriberSnippet',
  2. List<String> partList = const [],
  3. required Map<String, dynamic> body,
  4. String? onBehalfOfContentOwner,
  5. String? onBehalfOfContentOwnerChannel,
})

Adds a subscription for the authenticated user's channel.

Implementation

Future<Subscription> insert({
  String part = 'contentDetails,id,snippet,subscriberSnippet',
  List<String> partList = const [],
  required Map<String, dynamic> body,
  String? onBehalfOfContentOwner,
  String? onBehalfOfContentOwnerChannel,
}) async {
  return await _rest.insert(
    // _authHeader,
    accept,
    contentType,
    buildParts(partList, part),
    body,
  );
}