Skip to content

Commit

Permalink
Merge pull request #88 from matus12/EN-207-Add-codenames-to-asset-fol…
Browse files Browse the repository at this point in the history
…ders

EN-207 Add codenames to asset folders
  • Loading branch information
saminamhk authored Aug 15, 2024
2 parents a2232d1 + 1e70bed commit ed2bd83
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion js/management-api-v2/cm_api_v2_patch_asset_folders.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const response = await client.modifyAssetFolders()
op: "addinto",
value: {
external_id: "folder-with-shared-assets",
codename: "shared_assets",
name: "Shared assets",
folders: []
},
Expand All @@ -31,7 +32,7 @@ const response = await client.modifyAssetFolders()
op: "rename",
value: "Legal documents",
reference: {
external_id: "folder-documents"
codename: "folder_documents"
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions js/management-api-v2/cm_api_v2_post_asset_folders.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ const response = await client.addAssetFolders()
{
id: "958001d8-2228-4373-b966-5262b5b96f71",
name: "Downloads",
codename: "downloads",
external_id: "folder-with-downloadable-assets",
folders: [
{
id: "9ca927b6-6e4d-4d6b-81e3-ec5e8f7772a0",
name: "Archives",
codename: "archives",
external_id: "folder-with-downloadable-archives",
folders: []
}
Expand Down
3 changes: 2 additions & 1 deletion net/management-api-v2/cm_api_v2_patch_asset_folders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{
ExternalId = "folder-with-shared-assets",
Name = "Shared assets",
Codename = "shared_assets",
Folders = Enumerable.Empty<AssetFolderHierarchy>(),
},
Before = Reference.ByExternalId("folder-with-downloadable-assets")
Expand All @@ -26,7 +27,7 @@
},
new AssetFolderRenameModel
{
Reference = Reference.ByExternalId("folder-documents"),
Reference = Reference.ByCodename("folder_documents"),
Value = "Legal documents"
}
});
1 change: 1 addition & 0 deletions net/management-api-v2/cm_api_v2_post_asset_folders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{
Name = "Top level folder",
ExternalId = "top-folder",
Codename = "top_folder",
Folders = new []
{
new AssetFolderHierarchy
Expand Down
3 changes: 2 additions & 1 deletion rest/management-api-v2/cm_api_v2_patch_asset_folders.curl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ curl --request PATCH \
"value": {
"external_id": "another-folder",
"name": "Another second level folder",
"codename": "another_second_level_folder",
"folders": []
},
"reference" : {
Expand All @@ -28,7 +29,7 @@ curl --request PATCH \
"op": "rename",
"value":"A new name",
"reference" : {
"external_id": "second-folder"
"codename": "second_folder"
}
}
]'
1 change: 1 addition & 0 deletions rest/management-api-v2/cm_api_v2_post_asset_folders.curl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ curl --request POST \
"folders": [
{
"name": "Second level folder",
"codename": "second_level_folder",
"external_id": "second-folder",
"folders": []
}
Expand Down

0 comments on commit ed2bd83

Please sign in to comment.