### GET /me/information Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves information about the authenticated user. ```APIDOC ## GET /me/information ### Description Retrieves detailed information about the authenticated user associated with the access token. ### Method GET ### Endpoint /me/information ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```csharp var userInfo = await userAuthenticatedClient.GetAccountInformationAsync(); ``` ### Response #### Success Response (200) - **Name** (string) - The user's name. - **Link** (string) - The URL to the user's Vimeo profile. - **Pictures** (Array of Picture objects) - Information about the user's profile pictures. - **Location** (string) - The user's location. - **Bio** (string) - A short biography of the user. #### Response Example ```json { "name": "John Doe", "link": "https://vimeo.com/johndoe", "pictures": [ { "type": "base", "link": "https://i.vimeocdn.com/user/12345_100x100.jpg" } ], "location": "New York, NY", "bio": "A passionate filmmaker." } ``` ``` -------------------------------- ### GET /albums/{album_id} Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves information about a specific album. ```APIDOC ## GET /albums/{album_id} ### Description Fetches detailed information about a specific album, identified by its ID. ### Method GET ### Endpoint /albums/{album_id} ### Parameters #### Path Parameters - **album_id** (int) - Required - The unique identifier of the album. #### Request Body None ### Request Example ```csharp var albumDetails = await userAuthenticatedClient.GetAlbumAsync(67890); ``` ### Response #### Success Response (200) - **Name** (string) - The name of the album. - **Description** (string) - The description of the album. - **CreatedTime** (string) - The date and time the album was created. #### Response Example ```json { "name": "New Project", "description": "Album for the new project assets.", "created_time": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### GET /me/albums Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves a list of albums belonging to the authenticated user. ```APIDOC ## GET /me/albums ### Description Fetches a list of all albums created by the authenticated user. ### Method GET ### Endpoint /me/albums ### Parameters #### Query Parameters - **direction** (string) - Optional - The direction to sort the results ('asc' or 'desc'). - **filter** (string) - Optional - Filters the results (e.g., 'full', 'thumbnail'). - **page** (int) - Optional - The page number of the results to retrieve. - **per_page** (int) - Optional - The number of results per page. - **query** (string) - Optional - A search query to filter albums by name. - **sort** (string) - Optional - The method to sort the results (e.g., 'date', 'name', 'modified_time'). #### Request Body None ### Request Example ```csharp var albums = await userAuthenticatedClient.GetAccountAlbumsAsync(sort: "date", direction: "desc"); ``` ### Response #### Success Response (200) - **Total** (int) - The total number of albums. - **Data** (Array of Album objects) - A list of album objects. #### Response Example ```json { "total": 2, "data": [ { "name": "My Vacation Videos", "description": "Videos from my trip." }, { "name": "Project Highlights", "description": "Key moments from projects." } ] } ``` ``` -------------------------------- ### GET /users/{user_id}/videos/{video_id} Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Checks if a user owns a specific video. ```APIDOC ## GET /users/{user_id}/videos/{video_id} ### Description Verifies if a given user owns a specific video. ### Method GET ### Endpoint /users/{user_id}/videos/{video_id} ### Parameters #### Path Parameters - **user_id** (int) - Required - The unique identifier of the user. - **video_id** (int) - Required - The unique identifier of the video. #### Request Body None ### Request Example ```csharp var ownsVideo = await userAuthenticatedClient.GetUserVideo(userId: 54321, videoId: 112233); ``` ### Response #### Success Response (200) - **Exists** (bool) - True if the user owns the video, false otherwise. #### Response Example ```json { "exists": true } ``` ``` -------------------------------- ### GET /me/albums/{albumId}/videos Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Retrieve videos contained within a specific album. ```APIDOC ## GET /me/albums/{albumId}/videos ### Description Retrieve videos in an album with pagination and sorting options. ### Method GET ### Parameters #### Path Parameters - **albumId** (long) - Required - The ID of the album. #### Query Parameters - **page** (int) - Optional - Page number. - **perPage** (int) - Optional - Number of items per page. - **sort** (string) - Optional - Sort field. - **direction** (string) - Optional - Sort direction (asc/desc). ``` -------------------------------- ### GET /albums/{album_id}/videos Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves a list of videos within a specific album. ```APIDOC ## GET /albums/{album_id}/videos ### Description Fetches a list of videos contained within a specified album. ### Method GET ### Endpoint /albums/{album_id}/videos ### Parameters #### Path Parameters - **album_id** (int) - Required - The unique identifier of the album. #### Query Parameters - **direction** (string) - Optional - The direction to sort the results ('asc' or 'desc'). - **filter** (string) - Optional - Filters the results (e.g., 'full', 'thumbnail'). - **page** (int) - Optional - The page number of the results to retrieve. - **per_page** (int) - Optional - The number of results per page. - **sort** (string) - Optional - The method to sort the results (e.g., 'date', 'name', 'modified_time'). #### Request Body None ### Request Example ```csharp var albumVideos = await userAuthenticatedClient.GetAlbumVideosAsync(albumId: 67890, sort: "date"); ``` ### Response #### Success Response (200) - **Total** (int) - The total number of videos in the album. - **Data** (Array of Video objects) - A list of video objects. #### Response Example ```json { "total": 5, "data": [ { "name": "Video 1", "description": "First video." }, { "name": "Video 2", "description": "Second video." } ] } ``` ``` -------------------------------- ### GET /users/{user_id}/videos Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves a list of videos uploaded by a specific user. ```APIDOC ## GET /users/{user_id}/videos ### Description Fetches a list of videos uploaded by a specified user. ### Method GET ### Endpoint /users/{user_id}/videos ### Parameters #### Path Parameters - **user_id** (int) - Required - The unique identifier of the user. #### Query Parameters - **direction** (string) - Optional - The direction to sort the results ('asc' or 'desc'). - **filter** (string) - Optional - Filters the results (e.g., 'full', 'thumbnail'). - **page** (int) - Optional - The page number of the results to retrieve. - **per_page** (int) - Optional - The number of results per page. - **query** (string) - Optional - A search query to filter videos by name. - **sort** (string) - Optional - The method to sort the results (e.g., 'date', 'name', 'modified_time'). #### Request Body None ### Request Example ```csharp var userVideos = await userAuthenticatedClient.GetVideosAsync(userId: 54321, sort: "date"); ``` ### Response #### Success Response (200) - **Total** (int) - The total number of videos uploaded by the user. - **Data** (Array of Video objects) - A list of video objects. #### Response Example ```json { "total": 10, "data": [ { "name": "My Awesome Video", "description": "A great video." } ] } ``` ``` -------------------------------- ### GET /users/{user_id}/folders/{folder_id}/videos Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Retrieves all videos uploaded by a user within a specific folder. ```APIDOC ## GET /users/{user_id}/folders/{folder_id}/videos ### Description Fetches all videos uploaded by a user that are organized within a specific folder. ### Method GET ### Endpoint /users/{user_id}/folders/{folder_id}/videos ### Parameters #### Path Parameters - **user_id** (int) - Required - The unique identifier of the user. - **folder_id** (int) - Required - The unique identifier of the folder. #### Query Parameters - **direction** (string) - Optional - The direction to sort the results ('asc' or 'desc'). - **page** (int) - Optional - The page number of the results to retrieve. - **per_page** (int) - Optional - The number of results per page. - **sort** (string) - Optional - The method to sort the results (e.g., 'date', 'name'). #### Request Body None ### Request Example ```csharp var folderVideos = await userAuthenticatedClient.GetAllVideosFromFolderAsync(userId: 54321, folderId: 98765); ``` ### Response #### Success Response (200) - **Total** (int) - The total number of videos in the folder. - **Data** (Array of Video objects) - A list of video objects within the folder. #### Response Example ```json { "total": 3, "data": [ { "name": "Folder Video 1", "description": "Video in folder." } ] } ``` ``` -------------------------------- ### Create Album Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Creates a new showcase (album) with specified metadata and privacy settings. ```csharp using VimeoDotNet; using VimeoDotNet.Parameters; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); var albumParams = new EditAlbumParameters { Name = "My Video Collection", Description = "A curated collection of my best videos", Privacy = EditAlbumPrivacyOption.Anybody, Sort = EditAlbumSortOption.Newest }; var album = await client.CreateAlbumAsync(UserId.Me, albumParams); Console.WriteLine($"Album created! ID: {album.Id}, URI: {album.Uri}"); ``` -------------------------------- ### Manage Folders and Projects in C# Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Organize videos into folders and manage folder contents, including moving videos and deleting folders. ```csharp using VimeoDotNet; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Create a new folder var folder = await client.CreateFolder( userId: UserId.Me, name: "My Project Folder", parentFolderUri: null // Optional: URI of parent folder for nested folders ); Console.WriteLine($"Folder created: {folder.Name}"); // Get all folders for user var folders = await client.GetUserFolders( userId: UserId.Me, page: 1, perPage: 25, query: null ); foreach (var f in folders.Data) { Console.WriteLine($"- {f.Name}"); } // Get items (videos and subfolders) in a folder var items = await client.GetFolderItems( userId: UserId.Me, folderId: 15721523, page: 1, perPage: 50 ); // Get all videos from a folder var folderVideos = await client.GetAllVideosFromFolderAsync( projectId: 15721523, userId: UserId.Me, page: 1, perPage: 50 ); // Move video to folder await client.MoveVideoToFolder(projectId: 15721523, clipId: 123456789); // Delete folder (videos are not deleted, just removed from folder) await client.DeleteFolder(UserId.Me, folderId: 15721523); ``` -------------------------------- ### Initialize VimeoClient with Personal Access Token Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Use this method for single-user applications by providing a personal access token from your Vimeo developer account. ```csharp using VimeoDotNet; // Create client with your personal access token var client = new VimeoClient("your_access_token_here"); // Now you can make authenticated API calls var accountInfo = await client.GetAccountInformationAsync(); Console.WriteLine($"Authenticated as: {accountInfo.Name}"); ``` -------------------------------- ### Manage Vimeo Channels in C# Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Create, retrieve, and delete channels, as well as manage video subscriptions and channel membership. ```csharp using VimeoDotNet; using VimeoDotNet.Parameters; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Create a new channel var channel = await client.CreateChannelAsync(new EditChannelParameters { Name = "My Video Channel", Description = "A channel for sharing videos", Privacy = "anybody" // "anybody" or "moderators" }); Console.WriteLine($"Channel created! ID: {channel.Id}"); // Get all available channels var channels = await client.GetChannelsAsync(new GetChannelsParameters { Page = 1, PerPage = 25 }); // Get a specific channel var myChannel = await client.GetChannelAsync(channelId: 1837771); Console.WriteLine($"Channel: {myChannel.Name}"); // Add video to channel var added = await client.AddToChannelAsync(channelId: 1837771, clipId: 123456789); // Get channels the user subscribes to var userChannels = await client.GetUserChannelsAsync(); // Delete a channel var deleted = await client.DeleteChannelAsync(channelId: 1837771); ``` -------------------------------- ### Manage Albums and Videos Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Retrieves user albums, adds videos to specific albums, and lists videos within an album. ```csharp using VimeoDotNet; using VimeoDotNet.Models; using VimeoDotNet.Parameters; var client = new VimeoClient("your_access_token"); // Get all albums for the authenticated user var albums = await client.GetAlbumsAsync(UserId.Me, new GetAlbumsParameters { Page = 1, PerPage = 25 }); Console.WriteLine($"Total albums: {albums.Total}"); foreach (var album in albums.Data) { Console.WriteLine($"- {album.Name} (ID: {album.Id})"); } // Get a specific album var myAlbum = await client.GetAlbumAsync(UserId.Me, albumId: 115220313); // Add a video to an album var added = await client.AddToAlbumAsync( userId: UserId.Me, albumId: 115220313, clipId: 123456789 ); Console.WriteLine($"Video added to album: {added}"); // Get videos in an album var albumVideos = await client.GetAlbumVideosAsync( userId: UserId.Me, albumId: 115220313, page: 1, perPage: 50, sort: "alphabetical", direction: "asc" ); ``` -------------------------------- ### Upload Video File with Progress Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Uploads a local video file using chunked transfer and provides a callback for progress monitoring. ```csharp using VimeoDotNet; using VimeoDotNet.Net; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Create binary content from file path using (var fileContent = new BinaryContent(@"C:\Videos\my_video.mp4")) { // Upload with progress callback (default chunk size is 128MB) var uploadRequest = await client.UploadEntireFileAsync( fileContent: fileContent, chunkSize: 134217728, // 128MB chunks replaceVideoId: null, statusCallback: (progress) => { Console.WriteLine($"Upload progress: {progress:F1}%"); } ); Console.WriteLine($"Upload complete!"); Console.WriteLine($"Clip ID: {uploadRequest.ClipId}"); Console.WriteLine($"Clip URI: {uploadRequest.ClipUri}"); // Optionally update the video metadata after upload await client.UpdateVideoMetadataAsync( uploadRequest.ClipId.Value, new VideoUpdateMetadata { Name = "My Uploaded Video" } ); } ``` -------------------------------- ### Folder Management API Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Endpoints for creating, retrieving, and managing folders (projects) to organize videos. ```APIDOC ## Folder Management ### Create and Manage Folders ### Description Organize videos into folders (projects) for better management. ### Method POST (Create), GET (Retrieve), PUT (Move), DELETE (Delete) ### Endpoint - `/users/{userId}/folders` (Create) - `/users/{userId}/folders` (Get Folders) - `/users/{userId}/folders/{folderId}/items` (Get Folder Items) - `/users/{userId}/projects/{projectId}/videos` (Get Folder Videos) - `/users/{userId}/folders/{folderId}/videos/{clipId}` (Move Video) - `/users/{userId}/folders/{folderId}` (Delete Folder) ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user. - **folderId** (integer) - Required - The ID of the folder. - **projectId** (integer) - Required - The ID of the project (folder). - **clipId** (integer) - Required - The ID of the video clip. #### Query Parameters - **page** (integer) - Optional - The page number for paginated results. - **perPage** (integer) - Optional - The number of items per page. - **query** (string) - Optional - Search query for folders. #### Request Body (Create Folder) - **name** (string) - Required - The name of the folder. - **parentFolderUri** (string) - Optional - The URI of the parent folder for nested folders. ### Request Example (Create Folder) ```csharp var folder = await client.CreateFolder( userId: UserId.Me, name: "My Project Folder", parentFolderUri: null ); ``` ### Request Example (Get Folders) ```csharp var folders = await client.GetUserFolders( userId: UserId.Me, page: 1, perPage: 25, query: null ); ``` ### Request Example (Get Folder Items) ```csharp var items = await client.GetFolderItems( userId: UserId.Me, folderId: 15721523, page: 1, perPage: 50 ); ``` ### Request Example (Get Folder Videos) ```csharp var folderVideos = await client.GetAllVideosFromFolderAsync( projectId: 15721523, userId: UserId.Me, page: 1, perPage: 50 ); ``` ### Request Example (Move Video to Folder) ```csharp await client.MoveVideoToFolder(projectId: 15721523, clipId: 123456789); ``` ### Request Example (Delete Folder) ```csharp await client.DeleteFolder(UserId.Me, folderId: 15721523); ``` ### Response #### Success Response (200) - **Folder** (object) - Details of the created or retrieved folder. - **Folders** (array) - A list of folders. - **Items** (array) - A list of items within a folder. #### Response Example (Folder Created) ```json { "id": 15721523, "name": "My Project Folder", "uri": "/users/me/folders/15721523" } ``` ``` -------------------------------- ### Fetch Paginated User Videos Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Retrieve a list of videos for the authenticated user or a specific user ID with pagination support. ```csharp using VimeoDotNet; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Get videos for the authenticated user (UserId.Me) var myVideos = await client.GetVideosAsync( userId: UserId.Me, page: 1, perPage: 25, query: null, // Optional search query fields: new[] { "uri", "name", "duration", "pictures" } // JSON filter ); Console.WriteLine($"Total videos: {myVideos.Total}"); Console.WriteLine($"Page: {myVideos.Page}"); foreach (var video in myVideos.Data) { Console.WriteLine($"- {video.Name} ({video.Duration}s)"); } // Get videos for a specific user by ID var userVideos = await client.GetVideosAsync(userId: 12345678, page: 1, perPage: 10); ``` -------------------------------- ### PUT /albums/{album_id}/{video_id} Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Adds a video to an album. ```APIDOC ## PUT /albums/{album_id}/{video_id} ### Description Adds a specific video to a specified album. ### Method PUT ### Endpoint /albums/{album_id}/{video_id} ### Parameters #### Path Parameters - **album_id** (int) - Required - The unique identifier of the album. - **video_id** (int) - Required - The unique identifier of the video to add. #### Request Body None ### Request Example ```csharp await userAuthenticatedClient.AddToAlbumAsync(albumId: 67890, videoId: 112233); ``` ### Response #### Success Response (204) No content is returned upon successful addition. ``` -------------------------------- ### Manage Video Thumbnails with Vimeo .NET Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Operations for retrieving, setting, uploading, and deleting video thumbnails. Requires BinaryContent for custom image uploads. ```csharp using VimeoDotNet; using VimeoDotNet.Net; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); var clipId = 123456789; // Get all thumbnails for a video var pictures = await client.GetPicturesAsync(clipId); foreach (var pic in pictures.Data) { Console.WriteLine($"Thumbnail: {pic.Uri}"); } // Get a specific thumbnail var picture = await client.GetPictureAsync(clipId, pictureId: 1234567); // Set thumbnail from a specific time in the video (in seconds) await client.SetThumbnailAsync(timeOffset: 30, clipId: clipId); Console.WriteLine("Thumbnail set from 30 seconds into video"); // Upload a custom thumbnail image using (var thumbnailFile = new BinaryContent(@"C:\Images\thumbnail.jpg")) { var uploadedPicture = await client.UploadThumbnailAsync(clipId, thumbnailFile); Console.WriteLine($"Custom thumbnail uploaded: {uploadedPicture.Uri}"); } // Delete a thumbnail await client.DeleteThumbnailVideoAsync(clipId, pictureId: 1234567); ``` -------------------------------- ### POST /videos (Upload) Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Upload a video file using chunked transfer with progress monitoring. ```APIDOC ## POST /videos ### Description Upload a video file with chunked transfer and progress monitoring. ### Method POST ### Parameters #### Request Body - **fileContent** (BinaryContent) - Required - The binary content of the video file. - **chunkSize** (long) - Optional - Size of upload chunks in bytes. - **replaceVideoId** (long) - Optional - ID of the video to replace. - **statusCallback** (Action) - Optional - Callback function for upload progress. ``` -------------------------------- ### Manage Account Information Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Retrieve current or specific user account details and update profile information using the VimeoClient. ```csharp using VimeoDotNet; using VimeoDotNet.Parameters; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Get current user's account information var account = await client.GetAccountInformationAsync(); Console.WriteLine($"Name: {account.Name}"); Console.WriteLine($"Bio: {account.Bio}"); Console.WriteLine($"Location: {account.Location}"); Console.WriteLine($"Account Type: {account.Account}"); Console.WriteLine($"Upload Quota: {account.UploadQuota?.Space?.Free} bytes remaining"); // Get another user's information by ID var otherUser = await client.GetUserInformationAsync(userId: 12345678); Console.WriteLine($"User: {otherUser.Name}"); // Update account information var updatedAccount = await client.UpdateAccountInformationAsync(new EditUserParameters { Name = "Updated Name", Bio = "Updated bio information", Location = "New York, NY" }); ``` -------------------------------- ### POST /videos/upload Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Initiates the video upload process by obtaining an upload ticket. ```APIDOC ## POST /videos/upload ### Description Begins the video upload process by requesting an upload ticket from Vimeo. This is the first step in a chunked upload. ### Method POST ### Endpoint /videos/upload ### Parameters #### Request Body - **Name** (string) - Required - The name of the video to be uploaded. - **Description** (string) - Optional - A description for the video. - **Size** (long) - Required - The total size of the video file in bytes. - **MimeType** (string) - Required - The MIME type of the video file (e.g., 'video/mp4'). ### Request Example ```csharp var uploadTicket = await userAuthenticatedClient.GetUploadTicketAsync( name: "My Uploaded Video", description: "This is a test video.", size: 100000000, // 100MB mimeType: "video/mp4" ); ``` ### Response #### Success Response (200) - **UploadLink** (string) - The URL to which video chunks should be uploaded. - **Ticket** (string) - The upload ticket identifier. #### Response Example ```json { "upload_link": "https://vimeo.com/upload/ticket:abcdef12345/chunked", "ticket": "abcdef12345" } ``` ``` -------------------------------- ### Upload Video from URL Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Initiates a pull upload by providing a public URL for Vimeo to fetch the video file. ```csharp using VimeoDotNet; using VimeoDotNet.Models; using VimeoDotNet.Enums; var client = new VimeoClient("your_access_token"); var metadata = new VideoUpdateMetadata { Name = "Video from URL", Description = "This video was uploaded via pull link", Privacy = VideoPrivacyEnum.Private }; var video = await client.UploadPullLinkAsync( link: "https://example.com/video.mp4", metaData: metadata, replaceVideoId: null ); Console.WriteLine($"Video created with ID: {video.Id}"); ``` -------------------------------- ### POST /me/albums Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Creates a new album for the authenticated user. ```APIDOC ## POST /me/albums ### Description Creates a new album for the authenticated user. ### Method POST ### Endpoint /me/albums ### Parameters #### Request Body - **Name** (string) - Required - The name of the new album. - **Description** (string) - Optional - A description for the new album. - **Privacy** (object) - Optional - Privacy settings for the album. - **View** (string) - Optional - Privacy setting for viewing ('anybody', 'nobody', 'contacts', 'onlythisuser'). ### Request Example ```csharp var newAlbum = await userAuthenticatedClient.CreateAlbumAsync( name: "New Project", description: "Album for the new project assets.", privacy: new Dictionary { { "view", "anybody" } } ); ``` ### Response #### Success Response (201) - **Name** (string) - The name of the created album. - **Description** (string) - The description of the created album. - **Link** (string) - The URL of the created album. #### Response Example ```json { "name": "New Project", "description": "Album for the new project assets.", "link": "https://vimeo.com/user/12345/album/67890" } ``` ``` -------------------------------- ### Manage Video Text Tracks in C# Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Upload, update, and delete subtitle or caption files associated with a specific video. ```csharp using VimeoDotNet; using VimeoDotNet.Models; using VimeoDotNet.Net; var client = new VimeoClient("your_access_token"); var videoId = 123456789; // Get all text tracks for a video var textTracks = await client.GetTextTracksAsync(videoId); if (textTracks?.Data != null) { foreach (var track in textTracks.Data) { Console.WriteLine($"Track: {track.Name} ({track.Language}) - {track.Type}"); } } // Upload a new subtitle file var track = new TextTrack { Name = "English Subtitles", Language = "en", Type = TextTrackType.SubTitles, Active = true }; using (var subtitleFile = new BinaryContent(@"C:\Subtitles\english.vtt")) { var uploadedTrack = await client.UploadTextTrackFileAsync( fileContent: subtitleFile, videoId: videoId, track: track ); Console.WriteLine($"Subtitle uploaded: {uploadedTrack.Uri}"); } // Update an existing text track var updatedTrack = await client.UpdateTextTrackAsync( videoId: videoId, trackId: 987654, track: new TextTrack { Name = "Updated English Subtitles", Language = "en", Type = TextTrackType.Captions, Active = true } ); // Delete a text track await client.DeleteTextTrackAsync(videoId: videoId, trackId: 987654); ``` -------------------------------- ### Update and Delete Albums in C# Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Modify album metadata, remove specific videos, or delete an album without affecting the contained videos. ```csharp using VimeoDotNet; using VimeoDotNet.Parameters; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Update album var updatedAlbum = await client.UpdateAlbumAsync( userId: UserId.Me, albumId: 115220313, parameters: new EditAlbumParameters { Name = "Updated Album Name", Description = "New description for the album", Sort = EditAlbumSortOption.Plays } ); // Remove video from album var removed = await client.RemoveFromAlbumAsync( userId: UserId.Me, albumId: 115220313, clipId: 123456789 ); // Delete album (does not delete videos) var deleted = await client.DeleteAlbumAsync(UserId.Me, albumId: 115220313); Console.WriteLine($"Album deleted: {deleted}"); ``` -------------------------------- ### Retrieve Video Details by ID Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Fetch metadata and quality links for a specific video using its unique clip ID. ```csharp using VimeoDotNet; var client = new VimeoClient("your_access_token"); // Get video by clip ID var video = await client.GetVideoAsync(123456789); if (video != null) { Console.WriteLine($"Title: {video.Name}"); Console.WriteLine($"Description: {video.Description}"); Console.WriteLine($"Duration: {video.Duration} seconds"); Console.WriteLine($"Link: {video.Link}"); Console.WriteLine($"Status: {video.VideoStatus}"); Console.WriteLine($"Created: {video.CreatedTime}"); Console.WriteLine($"Resolution: {video.Width}x{video.Height}"); // Access video quality URLs Console.WriteLine($"HD Link: {video.HighDefinitionVideoSecureLink}"); Console.WriteLine($"SD Link: {video.StandardVideoSecureLink}"); } ``` -------------------------------- ### Manage Embed Presets with Vimeo .NET Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Methods to retrieve, assign, and remove embed presets for controlling player appearance on specific videos. ```csharp using VimeoDotNet; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); // Get all embed presets for the user var presets = await client.GetEmbedPresetsAsync( userId: UserId.Me, page: 1, perPage: 25, fields: new[] { "uri", "name", "settings" } ); foreach (var preset in presets.Data) { Console.WriteLine($"Preset: {preset.Name}"); } // Get a specific embed preset var myPreset = await client.GetEmbedPresetAsync( userId: UserId.Me, presetId: 120476914 ); // Assign embed preset to a video await client.AssignEmbedPresetToVideoAsync(clipId: 123456789, presetId: 120476914); Console.WriteLine("Embed preset assigned to video"); // Remove embed preset from a video await client.UnassignEmbedPresetFromVideoAsync(clipId: 123456789, presetId: 120476914); ``` -------------------------------- ### Update Video Metadata Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Modify properties such as title, description, and privacy settings for an existing video. ```csharp using VimeoDotNet; using VimeoDotNet.Models; using VimeoDotNet.Enums; var client = new VimeoClient("your_access_token"); var metadata = new VideoUpdateMetadata { Name = "My Updated Video Title", Description = "A detailed description of the video content.", Privacy = VideoPrivacyEnum.Unlisted, EmbedPrivacy = VideoEmbedPrivacyEnum.Whitelist, Comments = VideoCommentsEnum.Anybody, AllowDownloadVideo = true, ReviewLinkEnabled = true }; // For password-protected videos // metadata.Privacy = VideoPrivacyEnum.Password; // metadata.Password = "secure_password"; await client.UpdateVideoMetadataAsync(clipId: 123456789, metaData: metadata); Console.WriteLine("Video metadata updated successfully!"); ``` -------------------------------- ### Authentication Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md This section details how to authenticate with the Vimeo API using OAuth2 and the vimeo-dot-net library. ```APIDOC ## Authentication ### Description This section details how to authenticate with the Vimeo API using OAuth2 and the vimeo-dot-net library. It covers obtaining client credentials, generating an authorization URL, and exchanging an authorization code for an access token. ### Method N/A (Client-side flow) ### Endpoint N/A ### Parameters #### Client Credentials - **clientId** (string) - Required - Your application's client ID obtained from developer.vimeo.com. - **clientSecret** (string) - Required - Your application's client secret obtained from developer.vimeo.com. #### OAuth Flow - **redirectionUrl** (string) - Required - The URL to which the user will be redirected after authorization. Must be registered in your Vimeo app settings. - **scopes** (List) - Required - A list of permissions your application is requesting (e.g., "public", "upload", "edit"). - **stateInformation** (string) - Optional - Arbitrary string to maintain state between the request and callback. ### Request Example (Generating Auth URL) ```csharp var clientId = "your_client_id_here"; var clientSecret = "your_client_secret_here"; var redirectionUrl = "https://your_website_here.com/callback"; var stateInformation = "1337"; var client = new VimeoDotNet.VimeoClient(clientId, clientSecret); var url = client.GetOauthUrl(redirectionUrl, new List() { "public", "private", "purchased", "create", "edit", "delete", "interact", "upload", "promo_codes", "video_files" }, stateInformation); Console.WriteLine(url); ``` ### Request Example (Exchanging Code for Token) ```csharp // After user is redirected to your redirectionUrl with an access code in query parameters Console.WriteLine("Give me your access code..."); var accessCode = Console.ReadLine(); var token = await client.GetAccessTokenAsync(accessCode, redirectionUrl); // Use the obtained token for authenticated requests var userAuthenticatedClient = new VimeoDotNet.VimeoClient(token.AccessToken); ``` ### Response (Token) - **AccessToken** (string) - The access token for authenticating API requests. - **TokenType** (string) - The type of token (usually "bearer"). - **Scope** (string) - The scopes granted to this token. - **ExpiresIn** (int) - The token's lifetime in seconds. - **RefreshToken** (string) - A token to obtain a new access token when the current one expires. ### Response Example (Token) ```json { "access_token": "your_access_token_here", "token_type": "bearer", "scope": "public,upload,edit", "expires_in": 3600, "refresh_token": "your_refresh_token_here" } ``` ``` -------------------------------- ### Authenticate User with Vimeo API Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md This C# code demonstrates how to authenticate your application and the user with the Vimeo API using OAuth2. It involves obtaining client credentials, generating an authorization URL, and exchanging an access code for a token. Ensure the redirection URL is registered in your Vimeo app settings. ```C# var clientId = "your_client_id_here"; var clientSecret = "your_client_secret_here"; // This URL needs to be added to your // callback url list on your app settings page in developer.vimeo.com. var redirectionUrl = "https://your_website_here.com/wherever-you-send-users-after-grant"; // You can put state information here that gets sent // to your callback url in the ?state= parameter var stateInformation = "1337"; var client = new VimeoDotNet.VimeoClient(clientId, clientSecret); var url = client.GetOauthUrl(redirectionUrl, new List() { "public", "private", "purchased", "create", "edit", "delete", "interact", "upload", "promo_codes", "video_files" }, stateInformation); // The user will use this URL to log in and allow access to your app. // The web page will redirect to your redirection URL with the access code in the query parameters. // If you are also the user, // you can just pull the code out of the URL yourself and use it right here. Console.WriteLine(url); Console.WriteLine("Give me your access code..."); var accessCode = Console.ReadLine(); var token = await client.GetAccessTokenAsync(accessCode, redirectionUrl); //we need a new client now, if it is a one off job you can just //you are now ready to upload or whatever using the userAuthenticatedClient var userAuthenticatedClient = new VimeoDotNet.VimeoClient(token.AccessToken); ``` -------------------------------- ### Monitor API Rate Limits Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Check current rate limit status and implement logic to wait for resets when limits are low. ```csharp using VimeoDotNet; var client = new VimeoClient("your_access_token"); // Make an API call var account = await client.GetAccountInformationAsync(); // Check rate limit information (updated after each API call) Console.WriteLine($"Rate Limit: {client.RateLimit}"); Console.WriteLine($"Remaining: {client.RateLimitRemaining}"); Console.WriteLine($"Reset Time: {client.RateLimitReset}"); // Implement rate limit handling if (client.RateLimitRemaining < 10) { var waitTime = client.RateLimitReset - DateTime.UtcNow; if (waitTime > TimeSpan.Zero) { Console.WriteLine($"Rate limit low. Waiting {waitTime.TotalSeconds} seconds..."); await Task.Delay(waitTime); } } ``` -------------------------------- ### Replace Existing Video Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Replaces the source file of an existing video while maintaining its original metadata and URL. ```csharp using VimeoDotNet; using VimeoDotNet.Net; var client = new VimeoClient("your_access_token"); var existingVideoId = 123456789; using (var fileContent = new BinaryContent(@"C:\Videos\updated_video.mp4")) { var uploadRequest = await client.UploadEntireFileAsync( fileContent: fileContent, replaceVideoId: existingVideoId, statusCallback: (progress) => Console.WriteLine($"Progress: {progress:F1}%") ); Console.WriteLine($"Video replaced successfully!"); } ``` -------------------------------- ### Channel Management API Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Endpoints for creating, retrieving, updating, and deleting channels, as well as managing videos within channels. ```APIDOC ## Channel Management ### Create and Manage Channels ### Description Create channels to share collections of videos publicly. ### Method POST (Create), GET (Retrieve), PUT (Update), DELETE (Delete) ### Endpoint - `/channels` (Create) - `/channels/{channelId}` (Retrieve/Update/Delete) - `/channels/{channelId}/videos` (Add Video) - `/users/{userId}/channels` (Get User Channels) ### Parameters #### Path Parameters - **channelId** (integer) - Required - The ID of the channel. - **userId** (string) - Required - The ID of the user. #### Query Parameters - **Page** (integer) - Optional - The page number for paginated results. - **PerPage** (integer) - Optional - The number of items per page. #### Request Body (Create Channel) - **Name** (string) - Required - The name of the channel. - **Description** (string) - Optional - The description of the channel. - **Privacy** (string) - Optional - The privacy setting for the channel (`anybody` or `moderators`). ### Request Example (Create Channel) ```csharp var channel = await client.CreateChannelAsync(new EditChannelParameters { Name = "My Video Channel", Description = "A channel for sharing videos", Privacy = "anybody" }); ``` ### Request Example (Get Channels) ```csharp var channels = await client.GetChannelsAsync(new GetChannelsParameters { Page = 1, PerPage = 25 }); ``` ### Request Example (Get Specific Channel) ```csharp var myChannel = await client.GetChannelAsync(channelId: 1837771); ``` ### Request Example (Add Video to Channel) ```csharp var added = await client.AddToChannelAsync(channelId: 1837771, clipId: 123456789); ``` ### Request Example (Get User Channels) ```csharp var userChannels = await client.GetUserChannelsAsync(); ``` ### Request Example (Delete Channel) ```csharp var deleted = await client.DeleteChannelAsync(channelId: 1837771); ``` ### Response #### Success Response (200) - **Channel** (object) - Details of the channel. - **Channels** (array) - A list of channels. #### Response Example (Channel Created) ```json { "id": 123456789, "name": "My Video Channel", "description": "A channel for sharing videos", "privacy": "anybody" } ``` ``` -------------------------------- ### Manage Video Tags with Vimeo .NET Source: https://context7.com/mfilippov/vimeo-dot-net/llms.txt Use these methods to add, retrieve, search, and remove tags associated with a specific video ID. ```csharp using VimeoDotNet; using VimeoDotNet.Models; var client = new VimeoClient("your_access_token"); var clipId = 123456789; // Add a tag to a video var tag = await client.AddVideoTagAsync(clipId, "tutorial"); Console.WriteLine($"Tag added: {tag.Name}"); // Get all tags for a video var tags = await client.GetVideoTags(clipId, page: 1, perPage: 50); foreach (var t in tags.Data) { Console.WriteLine($"- {t.Name}"); } // Get tag information var tagInfo = await client.GetVideoTagAsync("tutorial"); Console.WriteLine($"Tag: {tagInfo.Name}, URI: {tagInfo.Uri}"); // Search videos by tag var taggedVideos = await client.GetVideoByTag( tag: "tutorial", page: 1, perPage: 25, sort: GetVideoByTagSort.Created, direction: GetVideoByTagDirection.Desc ); Console.WriteLine($"Found {taggedVideos.Total} videos with tag 'tutorial'"); // Remove a tag from a video await client.DeleteVideoTagAsync(clipId, "tutorial"); ``` -------------------------------- ### PUT /albums/{album_id} Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Updates an existing album. ```APIDOC ## PUT /albums/{album_id} ### Description Updates the details of an existing album. ### Method PUT ### Endpoint /albums/{album_id} ### Parameters #### Path Parameters - **album_id** (int) - Required - The unique identifier of the album to update. #### Request Body - **Name** (string) - Optional - The new name for the album. - **Description** (string) - Optional - The new description for the album. ### Request Example ```csharp var updatedAlbum = await userAuthenticatedClient.UpdateAlbumAsync( albumId: 67890, name: "Updated Project Name", description: "Revised description." ); ``` ### Response #### Success Response (200) - **Name** (string) - The updated name of the album. - **Description** (string) - The updated description of the album. #### Response Example ```json { "name": "Updated Project Name", "description": "Revised description." } ``` ``` -------------------------------- ### PUT /me/information Source: https://github.com/mfilippov/vimeo-dot-net/blob/master/README.md Updates information for the authenticated user. ```APIDOC ## PUT /me/information ### Description Updates the profile information for the authenticated user. ### Method PUT ### Endpoint /me/information ### Parameters #### Request Body - **Name** (string) - Optional - The user's new name. - **Location** (string) - Optional - The user's new location. - **Bio** (string) - Optional - The user's new biography. ### Request Example ```csharp var updatedInfo = await userAuthenticatedClient.UpdateAccountInformationAsync( name: "Jane Doe", location: "Los Angeles, CA", bio: "Creating cinematic stories." ); ``` ### Response #### Success Response (200) - **Name** (string) - The updated user's name. - **Location** (string) - The updated user's location. - **Bio** (string) - The updated user's biography. #### Response Example ```json { "name": "Jane Doe", "location": "Los Angeles, CA", "bio": "Creating cinematic stories." } ``` ```