For developers: Delete video libraries
This topic explains how to delete video libraries. The examples below show you how to delete all of the available video libraries or how to delete only a specific video library by its ID.
Deleting a single video library
When deleting a specific video library by its ID, you must perform the following:
-
Get the video library.
First, get an instance of the video library that corresponds to the specified ID.
-
Delete the video library.
Mark the video library to be deleted and save the changes.
The following code deletes a video library by its ID.
Native API
First, you get an instance of the LibrariesManager class. Then, you get the video library with the specified ID. To mark the video library to be deleted, you call the DeleteVideoLibrary method of the manager with the instance of the video library as an argument. Finally, you save the changes.
Fluent API
First, you get the singular facade of the video library with the specified ID. To mark the video library to be deleted, you call the Deletemethod of the facade. Finally, you call SaveChanges.
Deleting all video libraries
When deleting all video libraries, you must perform the following:
-
Get all video libraries.
Get instances of the available video libraries.
-
Delete each video library.
Iterate through the collection and delete each video library.
The following code deletes all video libraries.
Native API
First, you get an instance of the LibrariesManager class. Then, you get all of the available video libraries. You iterate through the collection and mark each video library to be deleted. Finally, you save the changes.
Fluent API
First, you get the plural video libraries facade. To mark each item to be deleted, you call the Delete method of the facade. Finally, you save the changes.