Skip to content

Commit

Permalink
Specify required options (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan authored Oct 11, 2024
1 parent a1ed305 commit 12a9186
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions guides/plugins/apps/app-sdks/javascript/05-http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ import { createMediaFolder, uploadMediaFile, getMediaFolderByName } from '@shopw
// The same http client as usual
const httpClient = ...;

// Create a new folder, optionally you can pass a parent folder id
const folderId = await createMediaFolder(httpClient, 'My Folder');
// Create a new folder
const folderId = await createMediaFolder(httpClient, 'My Folder', {});

// Create a new folder with parent folder id
const folderId = await createMediaFolder(httpClient, 'My Folder', {parentId: "parent-id"});

// Lookup a folder by name
const folderId = await getMediaFolderByName(httpClient, 'My Folder');
Expand Down

0 comments on commit 12a9186

Please sign in to comment.