set method
Uploads a watermark image to YouTube and sets it for a channel.
This method supports media upload. Uploaded files must conform to these constraints:
- Maximum file size: 10MB
- Accepted Media MIME types: image/jpeg, image/png, application/octet-stream
Implementation
Future<bool> set({
required String channelId,
required watermarksResource,
}) async {
final httpResponse = await _rest.set(
'application/json',
channelId,
watermarksResource,
);
if (httpResponse.response.statusCode == null) {
throw Exception('Error unset watermark');
}
return httpResponse.response.statusCode! == 204;
}