Skip to content

Commit

Permalink
Add parent_folder_uri parameter and creating folder in a subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbaszler authored and mfilippov committed Nov 2, 2022
1 parent 02c50ba commit 0733205
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/VimeoDotNet/VimeoClient_Folders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace VimeoDotNet
{
public partial class VimeoClient
{
public async Task<Folder> CreateVideoFolder(UserId userId, string name)
public async Task<Folder> CreateVideoFolder(UserId userId, string name, string parentFolderUri = null)
{
try
{
Expand Down Expand Up @@ -42,7 +42,10 @@ public async Task<Folder> CreateVideoFolder(UserId userId, string name)
{
["name"] = name
};


if (string.IsNullOrWhiteSpace(parentFolderUri) == false)
parameters.Add("parent_folder_uri", parentFolderUri);

request.Body = new FormUrlEncodedContent(parameters);

var response = await request.ExecuteRequestAsync<Folder>().ConfigureAwait(false);
Expand Down

0 comments on commit 0733205

Please sign in to comment.