loadByVideoId method
id : video id accessKey : your vimeo account access key.
Implementation
Future<dynamic> loadByVideoId(
{required String videoId, required String accessKey}) async {
Uri uri = Uri.parse("https://api.vimeo.com/videos/$videoId");
var res =
await http.get(uri, headers: {"Authorization": "Bearer $accessKey"});
if (res.statusCode != 200) {
throw VimeoError(
error: res.reasonPhrase,
developerMessage: "Please check your video id",
errorCode: res.statusCode);
}
return jsonDecode(res.body);
}