musora-content-services 2.92.3 → 2.92.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/.github/workflows/docs.js.yml +64 -47
  2. package/CHANGELOG.md +23 -0
  3. package/package.json +1 -1
  4. package/src/index.d.ts +2 -0
  5. package/src/index.js +2 -0
  6. package/src/lib/brands.ts +7 -7
  7. package/src/services/content/artist.ts +10 -7
  8. package/src/services/content/genre.ts +10 -7
  9. package/src/services/content/instructor.ts +7 -7
  10. package/src/services/content-org/learning-paths.ts +3 -3
  11. package/src/services/progress-row/method-card.js +1 -1
  12. package/src/services/reporting/reporting.ts +19 -15
  13. package/src/services/sync/fetch.ts +3 -0
  14. package/src/services/user/onboarding.ts +3 -3
  15. package/docs/Content.html +0 -269
  16. package/docs/ContentOrganization.html +0 -245
  17. package/docs/Forums.html +0 -269
  18. package/docs/Gamification.html +0 -245
  19. package/docs/TestUser.html +0 -260
  20. package/docs/UserManagementSystem.html +0 -317
  21. package/docs/api_types.js.html +0 -97
  22. package/docs/config.js.html +0 -140
  23. package/docs/content-org_content-org.js.html +0 -76
  24. package/docs/content-org_guided-courses.ts.html +0 -110
  25. package/docs/content-org_learning-paths.ts.html +0 -391
  26. package/docs/content-org_playlists-types.js.html +0 -128
  27. package/docs/content-org_playlists.js.html +0 -440
  28. package/docs/content.js.html +0 -603
  29. package/docs/content_artist.ts.html +0 -206
  30. package/docs/content_content.ts.html +0 -77
  31. package/docs/content_genre.ts.html +0 -209
  32. package/docs/content_instructor.ts.html +0 -206
  33. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  34. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  35. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  36. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  37. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  38. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  39. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  40. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  42. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
  43. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  44. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  45. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  46. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  47. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
  48. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  49. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  50. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  51. package/docs/forums_categories.ts.html +0 -156
  52. package/docs/forums_discussions.js.html +0 -95
  53. package/docs/forums_forum.js.html +0 -95
  54. package/docs/forums_forums.ts.html +0 -160
  55. package/docs/forums_posts.ts.html +0 -284
  56. package/docs/forums_threads.ts.html +0 -284
  57. package/docs/gamification_awards.js.html +0 -165
  58. package/docs/gamification_awards.ts.html +0 -195
  59. package/docs/gamification_gamification.js.html +0 -76
  60. package/docs/gamification_types.js.html +0 -80
  61. package/docs/global.html +0 -6019
  62. package/docs/index.html +0 -167
  63. package/docs/liveTesting.ts.html +0 -103
  64. package/docs/module-Accounts.html +0 -2283
  65. package/docs/module-Artist.html +0 -993
  66. package/docs/module-Awards.html +0 -836
  67. package/docs/module-Categories.html +0 -711
  68. package/docs/module-Config.html +0 -431
  69. package/docs/module-Content-Services-V2.html +0 -2998
  70. package/docs/module-ForumCategories.html +0 -687
  71. package/docs/module-ForumDiscussions.html +0 -370
  72. package/docs/module-Forums.html +0 -16599
  73. package/docs/module-Genre.html +0 -981
  74. package/docs/module-GuidedCourses.html +0 -108
  75. package/docs/module-Instructor.html +0 -929
  76. package/docs/module-Interests.html +0 -1066
  77. package/docs/module-LearningPaths.html +0 -2424
  78. package/docs/module-Onboarding.html +0 -882
  79. package/docs/module-Payments.html +0 -392
  80. package/docs/module-Permissions.html +0 -406
  81. package/docs/module-Playlists.html +0 -3030
  82. package/docs/module-ProgressRow.html +0 -108
  83. package/docs/module-Railcontent-Services.html +0 -5876
  84. package/docs/module-Sanity-Services.html +0 -8244
  85. package/docs/module-Sessions.html +0 -575
  86. package/docs/module-Threads.html +0 -1119
  87. package/docs/module-UserActivity.html +0 -4534
  88. package/docs/module-UserChat.html +0 -410
  89. package/docs/module-UserManagement.html +0 -1932
  90. package/docs/module-UserMemberships.html +0 -829
  91. package/docs/module-UserNotifications.html +0 -2595
  92. package/docs/module-UserProfile.html +0 -370
  93. package/docs/progress-row_method-card.js.html +0 -184
  94. package/docs/railcontent.js.html +0 -724
  95. package/docs/sanity.js.html +0 -2322
  96. package/docs/scripts/collapse.js +0 -39
  97. package/docs/scripts/commonNav.js +0 -28
  98. package/docs/scripts/linenumber.js +0 -25
  99. package/docs/scripts/nav.js +0 -12
  100. package/docs/scripts/polyfill.js +0 -4
  101. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  102. package/docs/scripts/prettify/lang-css.js +0 -2
  103. package/docs/scripts/prettify/prettify.js +0 -28
  104. package/docs/scripts/search.js +0 -99
  105. package/docs/styles/jsdoc.css +0 -776
  106. package/docs/styles/prettify.css +0 -80
  107. package/docs/userActivity.js.html +0 -1512
  108. package/docs/user_account.ts.html +0 -265
  109. package/docs/user_chat.js.html +0 -98
  110. package/docs/user_interests.js.html +0 -150
  111. package/docs/user_management.js.html +0 -258
  112. package/docs/user_memberships.js.html +0 -144
  113. package/docs/user_memberships.ts.html +0 -292
  114. package/docs/user_notifications.js.html +0 -374
  115. package/docs/user_onboarding.ts.html +0 -329
  116. package/docs/user_payments.ts.html +0 -146
  117. package/docs/user_permissions.js.html +0 -110
  118. package/docs/user_profile.js.html +0 -115
  119. package/docs/user_sessions.js.html +0 -170
  120. package/docs/user_types.js.html +0 -224
  121. package/docs/user_user-management-system.js.html +0 -79
@@ -1,3030 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>Playlists - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
-
18
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
- </head>
20
- <body>
21
-
22
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
- <label for="nav-trigger" class="navicon-button x">
24
- <div class="navicon"></div>
25
- </label>
26
-
27
- <label for="nav-trigger" class="overlay"></label>
28
-
29
- <nav >
30
-
31
-
32
- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Accounts.html">Accounts</a><ul class='methods'><li data-type='method'><a href="module-Accounts.html#~confirmEmailChange">confirmEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~deleteAccount">deleteAccount</a></li><li data-type='method'><a href="module-Accounts.html#~numberOfActiveUsers">numberOfActiveUsers</a></li><li data-type='method'><a href="module-Accounts.html#~requestEmailChange">requestEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~resetPassword">resetPassword</a></li><li data-type='method'><a href="module-Accounts.html#~sendAccountSetupEmail">sendAccountSetupEmail</a></li><li data-type='method'><a href="module-Accounts.html#~sendPasswordResetEmail">sendPasswordResetEmail</a></li><li data-type='method'><a href="module-Accounts.html#~setupAccount">setupAccount</a></li><li data-type='method'><a href="module-Accounts.html#~status">status</a></li><li data-type='method'><a href="module-Accounts.html#~toggleStudentView">toggleStudentView</a></li></ul></li><li><a href="module-Artist.html">Artist</a><ul class='methods'><li data-type='method'><a href="module-Artist.html#~fetchArtistBySlug">fetchArtistBySlug</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtists">fetchArtists</a></li></ul></li><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#~fetchAwardsForUser">fetchAwardsForUser</a></li><li data-type='method'><a href="module-Awards.html#~fetchCertificate">fetchCertificate</a></li><li data-type='method'><a href="module-Awards.html#~getAwardDataForGuidedContent">getAwardDataForGuidedContent</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getLegacyMethods">getLegacyMethods</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getOwnedContent">getOwnedContent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-Forums.html">Forums</a><ul class='methods'><li data-type='method'><a href="module-Forums.html#~createForumCategory">createForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~createPost">createPost</a></li><li data-type='method'><a href="module-Forums.html#~createThread">createThread</a></li><li data-type='method'><a href="module-Forums.html#~deleteForumCategory">deleteForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~deletePost">deletePost</a></li><li data-type='method'><a href="module-Forums.html#~deleteThread">deleteThread</a></li><li data-type='method'><a href="module-Forums.html#~fetchCommunityGuidelines">fetchCommunityGuidelines</a></li><li data-type='method'><a href="module-Forums.html#~fetchFollowedThreads">fetchFollowedThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchForumCategories">fetchForumCategories</a></li><li data-type='method'><a href="module-Forums.html#~fetchLatestThreads">fetchLatestThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchPosts">fetchPosts</a></li><li data-type='method'><a href="module-Forums.html#~fetchThreads">fetchThreads</a></li><li data-type='method'><a href="module-Forums.html#~followThread">followThread</a></li><li data-type='method'><a href="module-Forums.html#~jumpToPost">jumpToPost</a></li><li data-type='method'><a href="module-Forums.html#~likePost">likePost</a></li><li data-type='method'><a href="module-Forums.html#~lockThread">lockThread</a></li><li data-type='method'><a href="module-Forums.html#~markThreadAsRead">markThreadAsRead</a></li><li data-type='method'><a href="module-Forums.html#~pinThread">pinThread</a></li><li data-type='method'><a href="module-Forums.html#~search">search</a></li><li data-type='method'><a href="module-Forums.html#~unfollowThread">unfollowThread</a></li><li data-type='method'><a href="module-Forums.html#~unlikePost">unlikePost</a></li><li data-type='method'><a href="module-Forums.html#~unlockThread">unlockThread</a></li><li data-type='method'><a href="module-Forums.html#~unpinThread">unpinThread</a></li><li data-type='method'><a href="module-Forums.html#~updateForumCategory">updateForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~updatePost">updatePost</a></li><li data-type='method'><a href="module-Forums.html#~updateThread">updateThread</a></li></ul></li><li></li><li></li><li><a href="module-Genre.html">Genre</a><ul class='methods'><li data-type='method'><a href="module-Genre.html#~fetchGenreBySlug">fetchGenreBySlug</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenres">fetchGenres</a></li></ul></li><li><a href="module-GuidedCourses.html">GuidedCourses</a></li><li><a href="module-Instructor.html">Instructor</a><ul class='methods'><li data-type='method'><a href="module-Instructor.html#~fetchInstructorBySlug">fetchInstructorBySlug</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructorLessons">fetchInstructorLessons</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructors">fetchInstructors</a></li></ul></li><li><a href="module-Interests.html">Interests</a><ul class='methods'><li data-type='method'><a href="module-Interests.html#.fetchInterests">fetchInterests</a></li><li data-type='method'><a href="module-Interests.html#.fetchUninterests">fetchUninterests</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsInterested">markContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsNotInterested">markContentAsNotInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsInterested">removeContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsNotInterested">removeContentAsNotInterested</a></li></ul></li><li><a href="module-LearningPaths.html">LearningPaths</a><ul class='methods'><li data-type='method'><a href="module-LearningPaths.html#~completeLearningPathIntroVideo">completeLearningPathIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~completeMethodIntroVideo">completeMethodIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~fetchLearningPathLessons">fetchLearningPathLessons</a></li><li data-type='method'><a href="module-LearningPaths.html#~fetchLearningPathProgressCheckLessons">fetchLearningPathProgressCheckLessons</a></li><li data-type='method'><a href="module-LearningPaths.html#~getActivePath">getActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getDailySession">getDailySession</a></li><li data-type='method'><a href="module-LearningPaths.html#~getEnrichedLearningPath">getEnrichedLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getLearningPathLessonsByIds">getLearningPathLessonsByIds</a></li><li data-type='method'><a href="module-LearningPaths.html#~mapContentToParent">mapContentToParent</a></li><li data-type='method'><a href="module-LearningPaths.html#~resetAllLearningPaths">resetAllLearningPaths</a></li><li data-type='method'><a href="module-LearningPaths.html#~startLearningPath">startLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateDailySession">updateDailySession</a></li></ul></li><li><a href="module-Onboarding.html">Onboarding</a><ul class='methods'><li data-type='method'><a href="module-Onboarding.html#~getOnboardingRecommendedContent">getOnboardingRecommendedContent</a></li><li data-type='method'><a href="module-Onboarding.html#~startOnboarding">startOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~updateOnboarding">updateOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~userOnboardingForBrand">userOnboardingForBrand</a></li></ul></li><li><a href="module-Payments.html">Payments</a><ul class='methods'><li data-type='method'><a href="module-Payments.html#~fetchCustomerPayments">fetchCustomerPayments</a></li></ul></li><li><a href="module-Permissions.html">Permissions</a><ul class='methods'><li data-type='method'><a href="module-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-Permissions.html#.reset">reset</a></li></ul></li><li><a href="module-Playlists.html">Playlists</a><ul class='methods'><li data-type='method'><a href="module-Playlists.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Playlists.html#.fetchUserPlaylists">fetchUserPlaylists</a></li><li data-type='method'><a href="module-Playlists.html#.togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#.undeletePlaylist">undeletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~deleteItemsFromPlaylist">deleteItemsFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~restoreItemFromPlaylist">restoreItemFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></li><li><a href="module-ProgressRow.html">ProgressRow</a></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComment">fetchComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchRecentUserActivities">fetchRecentUserActivities</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchTopComment">fetchTopComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPracticeNotes">fetchUserPracticeNotes</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportComment">reportComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.restoreComment">restoreComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#~fetchLastInteractedChild">fetchLastInteractedChild</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2IntroVideo">fetchMethodV2IntroVideo</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2Structure">fetchMethodV2Structure</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2StructureFromId">fetchMethodV2StructureFromId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOtherSongVersions">fetchOtherSongVersions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOwnedContent">fetchOwnedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedRecommendedContent">fetchRelatedRecommendedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchReturning">fetchReturning</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSiblingContent">fetchSiblingContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchTopLevelParentId">fetchTopLevelParentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~fetchRelatedByLicense">fetchRelatedByLicense</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li></ul></li><li><a href="module-Sessions.html">Sessions</a><ul class='methods'><li data-type='method'><a href="module-Sessions.html#.login">login</a></li><li data-type='method'><a href="module-Sessions.html#.logout">logout</a></li></ul></li><li><a href="module-UserActivity.html">UserActivity</a><ul class='methods'><li data-type='method'><a href="module-UserActivity.html#.calculateLongestStreaks">calculateLongestStreaks</a></li><li data-type='method'><a href="module-UserActivity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.deleteUserActivity">deleteUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-UserActivity.html#.getProgressRows">getProgressRows</a></li><li data-type='method'><a href="module-UserActivity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.pinProgressRow">pinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserActivity">recordUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserActivity">restoreUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.unpinProgressRow">unpinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.updateUserPractice">updateUserPractice</a></li></ul></li><li><a href="module-UserChat.html">UserChat</a><ul class='methods'><li data-type='method'><a href="module-UserChat.html#.fetchChatSettings">fetchChatSettings</a></li></ul></li><li><a href="module-UserManagement.html">UserManagement</a><ul class='methods'><li data-type='method'><a href="module-UserManagement.html#.blockUser">blockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.blockedUsers">blockedUsers</a></li><li data-type='method'><a href="module-UserManagement.html#.deletePicture">deletePicture</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserData">getUserData</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserSignature">getUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.isUsernameAvailable">isUsernameAvailable</a></li><li data-type='method'><a href="module-UserManagement.html#.setUserSignature">setUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.toggleSignaturePrivate">toggleSignaturePrivate</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.updateDisplayName">updateDisplayName</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPicture">uploadPicture</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPictureFromS3">uploadPictureFromS3</a></li></ul></li><li><a href="module-UserMemberships.html">UserMemberships</a><ul class='methods'><li data-type='method'><a href="module-UserMemberships.html#~fetchMemberships">fetchMemberships</a></li><li data-type='method'><a href="module-UserMemberships.html#~fetchRechargeTokens">fetchRechargeTokens</a></li><li data-type='method'><a href="module-UserMemberships.html#~restorePurchases">restorePurchases</a></li><li data-type='method'><a href="module-UserMemberships.html#~upgradeSubscription">upgradeSubscription</a></li></ul></li><li><a href="module-UserNotifications.html">UserNotifications</a><ul class='methods'><li data-type='method'><a href="module-UserNotifications.html#.deleteNotification">deleteNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchLiveEventPollingState">fetchLiveEventPollingState</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotificationSettings">fetchNotificationSettings</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotifications">fetchNotifications</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchUnreadCount">fetchUnreadCount</a></li><li data-type='method'><a href="module-UserNotifications.html#.markAllNotificationsAsRead">markAllNotificationsAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsRead">markNotificationAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsUnread">markNotificationAsUnread</a></li><li data-type='method'><a href="module-UserNotifications.html#.pauseLiveEventPolling">pauseLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.restoreNotification">restoreNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.startLiveEventPolling">startLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.updateNotificationSetting">updateNotificationSetting</a></li></ul></li><li><a href="module-UserProfile.html">UserProfile</a><ul class='methods'><li data-type='method'><a href="module-UserProfile.html#.deleteProfilePicture">deleteProfilePicture</a></li><li data-type='method'><a href="module-UserProfile.html#.otherStats">otherStats</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="ContentOrganization.html">ContentOrganization</a></li><li><a href="Forums.html">Forums</a></li><li><a href="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3>Interfaces</h3><ul><li><a href="TestUser.html">TestUser</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createTestUser">createTestUser</a></li></ul>
33
-
34
- </nav>
35
-
36
- <div id="main">
37
-
38
- <h1 class="page-title">Playlists</h1>
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- <section>
47
-
48
- <header>
49
-
50
-
51
-
52
- </header>
53
-
54
- <article>
55
-
56
- <div class="container-overview">
57
-
58
-
59
-
60
-
61
-
62
- </div>
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
- <h3 class="subsection-title">Members</h3>
79
-
80
-
81
-
82
- <h4 class="name" id="~excludeFromGeneratedIndex"><span class="type-signature type-signature-inner, constant">(inner, constant) </span>excludeFromGeneratedIndex<span class="type-signature"> :Array.&lt;string></span></h4>
83
-
84
-
85
-
86
-
87
-
88
- <dl class="details">
89
-
90
- <dt class="tag-description">Description:</dt>
91
- <dd class="tag-description"><ul class="dummy"><li>Exported functions that are excluded from index generation.</li></ul></dd>
92
-
93
-
94
-
95
- <dt class="tag-source">Source:</dt>
96
- <dd class="tag-source"><ul class="dummy"><li>
97
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line14">line 14</a>
98
- </li></ul></dd>
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
- </dl>
131
-
132
-
133
-
134
-
135
-
136
- <div class="description usertext">
137
- Exported functions that are excluded from index generation.
138
- </div>
139
-
140
-
141
-
142
- <h5 class="h5-types">Type:</h5>
143
- <ul>
144
- <li>
145
-
146
- <span class="param-type">Array.&lt;string></span>
147
-
148
-
149
-
150
- </li>
151
- </ul>
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
- <h3 class="subsection-title">Methods</h3>
163
-
164
-
165
-
166
-
167
-
168
-
169
- <h4 class="name" id=".addItemToPlaylist"><span class="type-signature type-signature-static">(static) </span>addItemToPlaylist<span class="signature">(payload)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
170
-
171
-
172
-
173
-
174
-
175
-
176
- <dl class="details">
177
-
178
- <dt class="tag-description">Description:</dt>
179
- <dd class="tag-description"><ul class="dummy"><li>Adds an item to one or more playlists</li></ul></dd>
180
-
181
-
182
-
183
- <dt class="tag-source">Source:</dt>
184
- <dd class="tag-source"><ul class="dummy"><li>
185
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line200">line 200</a>
186
- </li></ul></dd>
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
- </dl>
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
- <h5 class="h5-examples">Example</h5>
231
-
232
- <pre class="prettyprint"><code>const payload = {
233
- content_id: 123,
234
- playlist_id: [1, 2, 3],
235
- position: 2,
236
-
237
- };
238
-
239
- addItemToPlaylist(payload)
240
- .then(response => {
241
- if (response?.success) {
242
- console.log("Item(s) added to playlist successfully");
243
- }
244
- if (response?.limit_exceeded) {
245
- console.warn("Some playlists exceeded the item limit:", response.limit_exceeded);
246
- }
247
- })
248
- .catch(error => {
249
- console.error("Error adding item to playlist:", error);
250
- });</code></pre>
251
-
252
-
253
-
254
-
255
- <h5 class="h5-parameters">Parameters:</h5>
256
-
257
-
258
- <table class="params">
259
- <thead>
260
- <tr>
261
-
262
- <th>Name</th>
263
-
264
-
265
- <th>Type</th>
266
-
267
-
268
-
269
-
270
-
271
- <th class="last">Description</th>
272
- </tr>
273
- </thead>
274
-
275
- <tbody>
276
-
277
-
278
- <tr>
279
-
280
- <td class="name"><code>payload</code></td>
281
-
282
-
283
- <td class="type">
284
-
285
-
286
- <span class="param-type"><a href="global.html#AddItemToPlaylistDTO">AddItemToPlaylistDTO</a></span>
287
-
288
-
289
-
290
-
291
- </td>
292
-
293
-
294
-
295
-
296
-
297
- <td class="description last">The request payload containing necessary parameters.</td>
298
- </tr>
299
-
300
-
301
- </tbody>
302
- </table>
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
- <h5 class="h5-throws">Throws:</h5>
318
-
319
-
320
-
321
- <dl>
322
- <dt>
323
- <div class="param-desc usertext">
324
- - Throws an error if the request encounters issues during the operation.
325
- </div>
326
- </dt>
327
- <dd></dd>
328
- <dt>
329
- <dl class="param-type">
330
- <dt>
331
- Type
332
- </dt>
333
- <dd>
334
-
335
- <span class="param-type">Error</span>
336
-
337
-
338
-
339
- </dd>
340
- </dl>
341
- </dt>
342
- <dd></dd>
343
- </dl>
344
-
345
-
346
-
347
-
348
-
349
- <h5 class="h5-returns">Returns:</h5>
350
-
351
-
352
- <div class="param-desc">
353
- - A promise that resolves to an object with the response data, including:
354
- - `added` (Array): Playlist ids that we were success
355
- - `limit_exceeded` (Array): A list of playlists where the item limit was exceeded, if any.
356
- - `unauthorized` (Array): A list of successfully added items (empty if none).
357
-
358
- Resolves to `null` if the request fails.
359
- </div>
360
-
361
-
362
-
363
- <dl class="param-type">
364
- <dt>
365
- Type
366
- </dt>
367
- <dd>
368
-
369
- <span class="param-type">Promise.&lt;(Object|null)></span>
370
-
371
-
372
-
373
- </dd>
374
- </dl>
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
- <h4 class="name" id=".createPlaylist"><span class="type-signature type-signature-static">(static) </span>createPlaylist<span class="signature">(playlistData)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="global.html#Playlist">Playlist</a>>}</span></h4>
386
-
387
-
388
-
389
-
390
-
391
-
392
- <dl class="details">
393
-
394
- <dt class="tag-description">Description:</dt>
395
- <dd class="tag-description"><ul class="dummy"><li>Creates a new user playlist by sending a POST request with playlist data to the API.
396
-
397
- This function calls the `/playlists/playlist` endpoint, where the server validates the incoming data and associates
398
- the new playlist with the authenticated user. The `name` field is required, while other fields are optional.</li></ul></dd>
399
-
400
-
401
-
402
- <dt class="tag-source">Source:</dt>
403
- <dd class="tag-source"><ul class="dummy"><li>
404
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line69">line 69</a>
405
- </li></ul></dd>
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
-
437
- </dl>
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
- <h5 class="h5-examples">Example</h5>
450
-
451
- <pre class="prettyprint"><code>createPlaylist({ name: "My Playlist", description: "A cool playlist", private: true })
452
- .then(response => console.log(response))
453
- .catch(error => console.error('Error creating playlist:', error));</code></pre>
454
-
455
-
456
-
457
-
458
- <h5 class="h5-parameters">Parameters:</h5>
459
-
460
-
461
- <table class="params">
462
- <thead>
463
- <tr>
464
-
465
- <th>Name</th>
466
-
467
-
468
- <th>Type</th>
469
-
470
-
471
-
472
-
473
-
474
- <th class="last">Description</th>
475
- </tr>
476
- </thead>
477
-
478
- <tbody>
479
-
480
-
481
- <tr>
482
-
483
- <td class="name"><code>playlistData</code></td>
484
-
485
-
486
- <td class="type">
487
-
488
-
489
- <span class="param-type"><a href="global.html#CreatePlaylistDTO">CreatePlaylistDTO</a></span>
490
-
491
-
492
-
493
-
494
- </td>
495
-
496
-
497
-
498
-
499
-
500
- <td class="description last">An object containing data to create the playlist. The fields include:
501
- - `name` (string): The name of the new playlist (required, max 255 characters).
502
- - `description` (string): A description of the playlist (optional, max 1000 characters).
503
- - `category` (string): The category of the playlist.
504
- - `private` (boolean): Whether the playlist is private (optional, defaults to false).
505
- - `brand` (string): Brand identifier for the playlist.</td>
506
- </tr>
507
-
508
-
509
- </tbody>
510
- </table>
511
-
512
-
513
-
514
-
515
-
516
-
517
-
518
-
519
-
520
-
521
-
522
-
523
-
524
-
525
-
526
-
527
- <h5 class="h5-returns">Returns:</h5>
528
-
529
-
530
- <div class="param-desc">
531
- - A promise that resolves to the created playlist data if successful, or an error response if validation fails.
532
- </div>
533
-
534
-
535
-
536
- <dl class="param-type">
537
- <dt>
538
- Type
539
- </dt>
540
- <dd>
541
-
542
- <span class="param-type">Promise.&lt;<a href="global.html#Playlist">Playlist</a>></span>
543
-
544
-
545
-
546
- </dd>
547
- </dl>
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
- <h4 class="name" id=".deletePlaylist"><span class="type-signature type-signature-static">(static) </span>deletePlaylist<span class="signature">(playlist)</span><span class="type-signature"> &rarr; {Promise.&lt;(any|string|null)>}</span></h4>
559
-
560
-
561
-
562
-
563
-
564
-
565
- <dl class="details">
566
-
567
- <dt class="tag-description">Description:</dt>
568
- <dd class="tag-description"><ul class="dummy"><li>Soft deletes a playlist. Will cascade and also soft delete entries in other playlist tables (pinned, reported, liked,
569
- playlist content) and last engaged that have this playlist id</li></ul></dd>
570
-
571
-
572
-
573
- <dt class="tag-source">Source:</dt>
574
- <dd class="tag-source"><ul class="dummy"><li>
575
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line80">line 80</a>
576
- </li></ul></dd>
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
- </dl>
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
- <h5 class="h5-parameters">Parameters:</h5>
623
-
624
-
625
- <table class="params">
626
- <thead>
627
- <tr>
628
-
629
- <th>Name</th>
630
-
631
-
632
- <th>Type</th>
633
-
634
-
635
-
636
-
637
-
638
- <th class="last">Description</th>
639
- </tr>
640
- </thead>
641
-
642
- <tbody>
643
-
644
-
645
- <tr>
646
-
647
- <td class="name"><code>playlist</code></td>
648
-
649
-
650
- <td class="type">
651
-
652
-
653
- <span class="param-type">id</span>
654
-
655
-
656
-
657
-
658
- </td>
659
-
660
-
661
-
662
-
663
-
664
- <td class="description last">the id of the playlist you want to soft delete.</td>
665
- </tr>
666
-
667
-
668
- </tbody>
669
- </table>
670
-
671
-
672
-
673
-
674
-
675
-
676
-
677
-
678
-
679
-
680
-
681
-
682
-
683
-
684
-
685
-
686
- <h5 class="h5-returns">Returns:</h5>
687
-
688
-
689
-
690
-
691
- <dl class="param-type">
692
- <dt>
693
- Type
694
- </dt>
695
- <dd>
696
-
697
- <span class="param-type">Promise.&lt;(any|string|null)></span>
698
-
699
-
700
-
701
- </dd>
702
- </dl>
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
-
712
-
713
- <h4 class="name" id=".duplicatePlaylist"><span class="type-signature type-signature-static">(static) </span>duplicatePlaylist<span class="signature">(playlistId, playlistData)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="global.html#Playlist">Playlist</a>>}</span></h4>
714
-
715
-
716
-
717
-
718
-
719
-
720
- <dl class="details">
721
-
722
- <dt class="tag-description">Description:</dt>
723
- <dd class="tag-description"><ul class="dummy"><li>Duplicates a playlist and playlist items for the provided playlistID for the authorized user</li></ul></dd>
724
-
725
-
726
-
727
- <dt class="tag-source">Source:</dt>
728
- <dd class="tag-source"><ul class="dummy"><li>
729
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line324">line 324</a>
730
- </li></ul></dd>
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
-
747
-
748
-
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
- </dl>
763
-
764
-
765
-
766
-
767
-
768
-
769
-
770
-
771
-
772
-
773
-
774
- <h5 class="h5-examples">Example</h5>
775
-
776
- <pre class="prettyprint"><code>duplicatePlaylist(81167, { name: "My Playlist (Duplicate)", description: "A cool playlist", private: true })
777
- .then(response => console.log(response))
778
- .catch(error => console.error('Error creating playlist:', error));</code></pre>
779
-
780
-
781
-
782
-
783
- <h5 class="h5-parameters">Parameters:</h5>
784
-
785
-
786
- <table class="params">
787
- <thead>
788
- <tr>
789
-
790
- <th>Name</th>
791
-
792
-
793
- <th>Type</th>
794
-
795
-
796
-
797
-
798
-
799
- <th class="last">Description</th>
800
- </tr>
801
- </thead>
802
-
803
- <tbody>
804
-
805
-
806
- <tr>
807
-
808
- <td class="name"><code>playlistId</code></td>
809
-
810
-
811
- <td class="type">
812
-
813
-
814
- <span class="param-type">string</span>
815
- |
816
-
817
- <span class="param-type">number</span>
818
-
819
-
820
-
821
-
822
- </td>
823
-
824
-
825
-
826
-
827
-
828
- <td class="description last"></td>
829
- </tr>
830
-
831
-
832
-
833
- <tr>
834
-
835
- <td class="name"><code>playlistData</code></td>
836
-
837
-
838
- <td class="type">
839
-
840
-
841
- <span class="param-type"><a href="global.html#DuplicatePlaylistDTO">DuplicatePlaylistDTO</a></span>
842
-
843
-
844
-
845
-
846
- </td>
847
-
848
-
849
-
850
-
851
-
852
- <td class="description last">An object containing data to create the playlist. The fields include:
853
- - `name` (string): The name of the new playlist (required, max 255 characters).
854
- - `description` (string): A description of the playlist (optional, max 1000 characters).
855
- - `category` (string): The category of the playlist.
856
- - `private` (boolean): Whether the playlist is private (optional, defaults to false).
857
- - `brand` (string): Brand identifier for the playlist.
858
- - 'items' (array): List of playlist items to duplicate in updated order</td>
859
- </tr>
860
-
861
-
862
- </tbody>
863
- </table>
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
-
877
-
878
-
879
-
880
- <h5 class="h5-returns">Returns:</h5>
881
-
882
-
883
-
884
-
885
- <dl class="param-type">
886
- <dt>
887
- Type
888
- </dt>
889
- <dd>
890
-
891
- <span class="param-type">Promise.&lt;<a href="global.html#Playlist">Playlist</a>></span>
892
-
893
-
894
-
895
- </dd>
896
- </dl>
897
-
898
-
899
-
900
-
901
-
902
-
903
-
904
-
905
-
906
-
907
- <h4 class="name" id=".fetchPlaylist"><span class="type-signature type-signature-static">(static) </span>fetchPlaylist<span class="signature">(playlistId)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
908
-
909
-
910
-
911
-
912
-
913
-
914
- <dl class="details">
915
-
916
- <dt class="tag-description">Description:</dt>
917
- <dd class="tag-description"><ul class="dummy"><li>Retrieves details of a specific playlist by its ID.
918
-
919
- This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
920
- The server validates the user's access to the playlist and returns playlist details if the user is authorized.</li></ul></dd>
921
-
922
-
923
-
924
- <dt class="tag-source">Source:</dt>
925
- <dd class="tag-source"><ul class="dummy"><li>
926
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line345">line 345</a>
927
- </li></ul></dd>
928
-
929
-
930
-
931
-
932
-
933
-
934
-
935
-
936
-
937
-
938
-
939
-
940
-
941
-
942
-
943
-
944
-
945
-
946
-
947
-
948
-
949
-
950
-
951
-
952
-
953
-
954
-
955
-
956
-
957
-
958
-
959
- </dl>
960
-
961
-
962
-
963
-
964
-
965
-
966
-
967
-
968
-
969
-
970
-
971
- <h5 class="h5-examples">Example</h5>
972
-
973
- <pre class="prettyprint"><code>fetchPlaylist(12345)
974
- .then(response => console.log(response.data))
975
- .catch(error => console.error('Error fetching playlist:', error));</code></pre>
976
-
977
-
978
-
979
-
980
- <h5 class="h5-parameters">Parameters:</h5>
981
-
982
-
983
- <table class="params">
984
- <thead>
985
- <tr>
986
-
987
- <th>Name</th>
988
-
989
-
990
- <th>Type</th>
991
-
992
-
993
-
994
-
995
-
996
- <th class="last">Description</th>
997
- </tr>
998
- </thead>
999
-
1000
- <tbody>
1001
-
1002
-
1003
- <tr>
1004
-
1005
- <td class="name"><code>playlistId</code></td>
1006
-
1007
-
1008
- <td class="type">
1009
-
1010
-
1011
- <span class="param-type">string</span>
1012
- |
1013
-
1014
- <span class="param-type">number</span>
1015
-
1016
-
1017
-
1018
-
1019
- </td>
1020
-
1021
-
1022
-
1023
-
1024
-
1025
- <td class="description last">The unique identifier of the playlist to retrieve.</td>
1026
- </tr>
1027
-
1028
-
1029
- </tbody>
1030
- </table>
1031
-
1032
-
1033
-
1034
-
1035
-
1036
-
1037
-
1038
-
1039
-
1040
-
1041
-
1042
-
1043
-
1044
-
1045
-
1046
-
1047
- <h5 class="h5-returns">Returns:</h5>
1048
-
1049
-
1050
- <div class="param-desc">
1051
- - A promise that resolves to the response from the API, containing:
1052
- - `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
1053
- </div>
1054
-
1055
-
1056
-
1057
- <dl class="param-type">
1058
- <dt>
1059
- Type
1060
- </dt>
1061
- <dd>
1062
-
1063
- <span class="param-type">Promise.&lt;Object></span>
1064
-
1065
-
1066
-
1067
- </dd>
1068
- </dl>
1069
-
1070
-
1071
-
1072
-
1073
-
1074
-
1075
-
1076
-
1077
-
1078
-
1079
- <h4 class="name" id=".fetchPlaylistItems"><span class="type-signature type-signature-static">(static) </span>fetchPlaylistItems<span class="signature">(playlistId)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;Object>>}</span></h4>
1080
-
1081
-
1082
-
1083
-
1084
-
1085
-
1086
- <dl class="details">
1087
-
1088
- <dt class="tag-description">Description:</dt>
1089
- <dd class="tag-description"><ul class="dummy"><li>Retrieves items within a specified playlist by playlist ID.
1090
-
1091
- This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
1092
- The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
1093
-
1094
-
1095
-
1096
- <dt class="tag-source">Source:</dt>
1097
- <dd class="tag-source"><ul class="dummy"><li>
1098
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line365">line 365</a>
1099
- </li></ul></dd>
1100
-
1101
-
1102
-
1103
-
1104
-
1105
-
1106
-
1107
-
1108
-
1109
-
1110
-
1111
-
1112
-
1113
-
1114
-
1115
-
1116
-
1117
-
1118
-
1119
-
1120
-
1121
-
1122
-
1123
-
1124
-
1125
-
1126
-
1127
-
1128
-
1129
-
1130
-
1131
- </dl>
1132
-
1133
-
1134
-
1135
-
1136
-
1137
-
1138
-
1139
-
1140
-
1141
-
1142
-
1143
- <h5 class="h5-examples">Example</h5>
1144
-
1145
- <pre class="prettyprint"><code>fetchPlaylistItems(12345)
1146
- .then(items => console.log(items))
1147
- .catch(error => console.error('Error fetching playlist items:', error));</code></pre>
1148
-
1149
-
1150
-
1151
-
1152
- <h5 class="h5-parameters">Parameters:</h5>
1153
-
1154
-
1155
- <table class="params">
1156
- <thead>
1157
- <tr>
1158
-
1159
- <th>Name</th>
1160
-
1161
-
1162
- <th>Type</th>
1163
-
1164
-
1165
-
1166
-
1167
-
1168
- <th class="last">Description</th>
1169
- </tr>
1170
- </thead>
1171
-
1172
- <tbody>
1173
-
1174
-
1175
- <tr>
1176
-
1177
- <td class="name"><code>playlistId</code></td>
1178
-
1179
-
1180
- <td class="type">
1181
-
1182
-
1183
- <span class="param-type">string</span>
1184
- |
1185
-
1186
- <span class="param-type">number</span>
1187
-
1188
-
1189
-
1190
-
1191
- </td>
1192
-
1193
-
1194
-
1195
-
1196
-
1197
- <td class="description last">The unique identifier of the playlist whose items are to be fetched.</td>
1198
- </tr>
1199
-
1200
-
1201
- </tbody>
1202
- </table>
1203
-
1204
-
1205
-
1206
-
1207
-
1208
-
1209
-
1210
-
1211
-
1212
-
1213
-
1214
-
1215
-
1216
-
1217
-
1218
-
1219
- <h5 class="h5-returns">Returns:</h5>
1220
-
1221
-
1222
- <div class="param-desc">
1223
- - A promise that resolves to an array of playlist items
1224
- </div>
1225
-
1226
-
1227
-
1228
- <dl class="param-type">
1229
- <dt>
1230
- Type
1231
- </dt>
1232
- <dd>
1233
-
1234
- <span class="param-type">Promise.&lt;Array.&lt;Object>></span>
1235
-
1236
-
1237
-
1238
- </dd>
1239
- </dl>
1240
-
1241
-
1242
-
1243
-
1244
-
1245
-
1246
-
1247
-
1248
-
1249
-
1250
- <h4 class="name" id=".fetchUserPlaylists"><span class="type-signature type-signature-static">(static) </span>fetchUserPlaylists<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1251
-
1252
-
1253
-
1254
-
1255
-
1256
-
1257
- <dl class="details">
1258
-
1259
- <dt class="tag-description">Description:</dt>
1260
- <dd class="tag-description"><ul class="dummy"><li>Fetches user playlists for a specific brand.
1261
-
1262
- Allows optional pagination, sorting, and search parameters to control the result set.</li></ul></dd>
1263
-
1264
-
1265
-
1266
- <dt class="tag-source">Source:</dt>
1267
- <dd class="tag-source"><ul class="dummy"><li>
1268
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line36">line 36</a>
1269
- </li></ul></dd>
1270
-
1271
-
1272
-
1273
-
1274
-
1275
-
1276
-
1277
-
1278
-
1279
-
1280
-
1281
-
1282
-
1283
-
1284
-
1285
-
1286
-
1287
-
1288
-
1289
-
1290
-
1291
-
1292
-
1293
-
1294
-
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
- </dl>
1302
-
1303
-
1304
-
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
-
1312
-
1313
- <h5 class="h5-examples">Example</h5>
1314
-
1315
- <pre class="prettyprint"><code>fetchUserPlaylists('drumeo', { page: 1, sort: 'name', searchTerm: 'rock' })
1316
- .then(playlists => console.log(playlists))
1317
- .catch(error => console.error(error));</code></pre>
1318
-
1319
-
1320
-
1321
-
1322
- <h5 class="h5-parameters">Parameters:</h5>
1323
-
1324
-
1325
- <table class="params">
1326
- <thead>
1327
- <tr>
1328
-
1329
- <th>Name</th>
1330
-
1331
-
1332
- <th>Type</th>
1333
-
1334
-
1335
- <th>Attributes</th>
1336
-
1337
-
1338
-
1339
- <th>Default</th>
1340
-
1341
-
1342
- <th class="last">Description</th>
1343
- </tr>
1344
- </thead>
1345
-
1346
- <tbody>
1347
-
1348
-
1349
- <tr>
1350
-
1351
- <td class="name"><code>brand</code></td>
1352
-
1353
-
1354
- <td class="type">
1355
-
1356
-
1357
- <span class="param-type">string</span>
1358
-
1359
-
1360
-
1361
-
1362
- </td>
1363
-
1364
-
1365
- <td class="attributes">
1366
-
1367
-
1368
-
1369
-
1370
-
1371
- </td>
1372
-
1373
-
1374
-
1375
- <td class="default">
1376
-
1377
- </td>
1378
-
1379
-
1380
- <td class="description last">The brand identifier for which playlists are being fetched.</td>
1381
- </tr>
1382
-
1383
-
1384
-
1385
- <tr>
1386
-
1387
- <td class="name"><code>params.limit</code></td>
1388
-
1389
-
1390
- <td class="type">
1391
-
1392
-
1393
- <span class="param-type">number</span>
1394
-
1395
-
1396
-
1397
-
1398
- </td>
1399
-
1400
-
1401
- <td class="attributes">
1402
-
1403
- &lt;optional><br>
1404
-
1405
-
1406
-
1407
-
1408
-
1409
- </td>
1410
-
1411
-
1412
-
1413
- <td class="default">
1414
-
1415
- <code>10</code>
1416
-
1417
- </td>
1418
-
1419
-
1420
- <td class="description last">The maximum number of playlists to return per page (default is 10).</td>
1421
- </tr>
1422
-
1423
-
1424
-
1425
- <tr>
1426
-
1427
- <td class="name"><code>params.page</code></td>
1428
-
1429
-
1430
- <td class="type">
1431
-
1432
-
1433
- <span class="param-type">number</span>
1434
-
1435
-
1436
-
1437
-
1438
- </td>
1439
-
1440
-
1441
- <td class="attributes">
1442
-
1443
- &lt;optional><br>
1444
-
1445
-
1446
-
1447
-
1448
-
1449
- </td>
1450
-
1451
-
1452
-
1453
- <td class="default">
1454
-
1455
- <code>1</code>
1456
-
1457
- </td>
1458
-
1459
-
1460
- <td class="description last">The page number for pagination.</td>
1461
- </tr>
1462
-
1463
-
1464
-
1465
- <tr>
1466
-
1467
- <td class="name"><code>params.sort</code></td>
1468
-
1469
-
1470
- <td class="type">
1471
-
1472
-
1473
- <span class="param-type">string</span>
1474
-
1475
-
1476
-
1477
-
1478
- </td>
1479
-
1480
-
1481
- <td class="attributes">
1482
-
1483
- &lt;optional><br>
1484
-
1485
-
1486
-
1487
-
1488
-
1489
- </td>
1490
-
1491
-
1492
-
1493
- <td class="default">
1494
-
1495
- <code>'-created_at'</code>
1496
-
1497
- </td>
1498
-
1499
-
1500
- <td class="description last">The sorting order for the playlists (default is by created_at in descending order).</td>
1501
- </tr>
1502
-
1503
-
1504
-
1505
- <tr>
1506
-
1507
- <td class="name"><code>params.content_id</code></td>
1508
-
1509
-
1510
- <td class="type">
1511
-
1512
-
1513
- <span class="param-type">int</span>
1514
- |
1515
-
1516
- <span class="param-type">string</span>
1517
-
1518
-
1519
-
1520
-
1521
- </td>
1522
-
1523
-
1524
- <td class="attributes">
1525
-
1526
- &lt;optional><br>
1527
-
1528
-
1529
-
1530
-
1531
-
1532
- </td>
1533
-
1534
-
1535
-
1536
- <td class="default">
1537
-
1538
- </td>
1539
-
1540
-
1541
- <td class="description last">If content_id exists, the endpoint checks in each playlist if we have the content in the items.</td>
1542
- </tr>
1543
-
1544
-
1545
- </tbody>
1546
- </table>
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
-
1554
-
1555
-
1556
-
1557
-
1558
-
1559
-
1560
-
1561
-
1562
-
1563
- <h5 class="h5-returns">Returns:</h5>
1564
-
1565
-
1566
- <div class="param-desc">
1567
- - A promise that resolves to the response from the API, containing the user playlists data.
1568
- </div>
1569
-
1570
-
1571
-
1572
- <dl class="param-type">
1573
- <dt>
1574
- Type
1575
- </dt>
1576
- <dd>
1577
-
1578
- <span class="param-type">Promise.&lt;(Object|null)></span>
1579
-
1580
-
1581
-
1582
- </dd>
1583
- </dl>
1584
-
1585
-
1586
-
1587
-
1588
-
1589
-
1590
-
1591
-
1592
-
1593
-
1594
- <h4 class="name" id=".togglePlaylistPrivate"><span class="type-signature type-signature-static">(static) </span>togglePlaylistPrivate<span class="signature">(playlistId, is_private)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="global.html#Playlist">Playlist</a>>}</span></h4>
1595
-
1596
-
1597
-
1598
-
1599
-
1600
-
1601
- <dl class="details">
1602
-
1603
- <dt class="tag-description">Description:</dt>
1604
- <dd class="tag-description"><ul class="dummy"><li>Toggles a playlists public/private state</li></ul></dd>
1605
-
1606
-
1607
-
1608
- <dt class="tag-source">Source:</dt>
1609
- <dd class="tag-source"><ul class="dummy"><li>
1610
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line218">line 218</a>
1611
- </li></ul></dd>
1612
-
1613
-
1614
-
1615
-
1616
-
1617
-
1618
-
1619
-
1620
-
1621
-
1622
-
1623
-
1624
-
1625
-
1626
-
1627
-
1628
-
1629
-
1630
-
1631
-
1632
-
1633
-
1634
-
1635
-
1636
-
1637
-
1638
-
1639
-
1640
-
1641
-
1642
-
1643
- </dl>
1644
-
1645
-
1646
-
1647
-
1648
-
1649
-
1650
-
1651
-
1652
-
1653
-
1654
-
1655
- <h5 class="h5-examples">Example</h5>
1656
-
1657
- <pre class="prettyprint"><code>togglePlaylistPrivate(11541, true)
1658
- .then(response => console.log(response))
1659
- .catch(error => console.error('Error creating playlist:', error));</code></pre>
1660
-
1661
-
1662
-
1663
-
1664
- <h5 class="h5-parameters">Parameters:</h5>
1665
-
1666
-
1667
- <table class="params">
1668
- <thead>
1669
- <tr>
1670
-
1671
- <th>Name</th>
1672
-
1673
-
1674
- <th>Type</th>
1675
-
1676
-
1677
-
1678
-
1679
-
1680
- <th class="last">Description</th>
1681
- </tr>
1682
- </thead>
1683
-
1684
- <tbody>
1685
-
1686
-
1687
- <tr>
1688
-
1689
- <td class="name"><code>playlistId</code></td>
1690
-
1691
-
1692
- <td class="type">
1693
-
1694
-
1695
- <span class="param-type">string</span>
1696
- |
1697
-
1698
- <span class="param-type">number</span>
1699
-
1700
-
1701
-
1702
-
1703
- </td>
1704
-
1705
-
1706
-
1707
-
1708
-
1709
- <td class="description last"></td>
1710
- </tr>
1711
-
1712
-
1713
-
1714
- <tr>
1715
-
1716
- <td class="name"><code>is_private</code></td>
1717
-
1718
-
1719
- <td class="type">
1720
-
1721
-
1722
- <span class="param-type">Boolean</span>
1723
-
1724
-
1725
-
1726
-
1727
- </td>
1728
-
1729
-
1730
-
1731
-
1732
-
1733
- <td class="description last">flag for private/public</td>
1734
- </tr>
1735
-
1736
-
1737
- </tbody>
1738
- </table>
1739
-
1740
-
1741
-
1742
-
1743
-
1744
-
1745
-
1746
-
1747
-
1748
-
1749
-
1750
-
1751
-
1752
-
1753
-
1754
-
1755
- <h5 class="h5-returns">Returns:</h5>
1756
-
1757
-
1758
- <div class="param-desc">
1759
- - A promise that resolves to the updated playlist data if successful, or an error response if validation fails.
1760
- </div>
1761
-
1762
-
1763
-
1764
- <dl class="param-type">
1765
- <dt>
1766
- Type
1767
- </dt>
1768
- <dd>
1769
-
1770
- <span class="param-type">Promise.&lt;<a href="global.html#Playlist">Playlist</a>></span>
1771
-
1772
-
1773
-
1774
- </dd>
1775
- </dl>
1776
-
1777
-
1778
-
1779
-
1780
-
1781
-
1782
-
1783
-
1784
-
1785
-
1786
- <h4 class="name" id=".undeletePlaylist"><span class="type-signature type-signature-static">(static) </span>undeletePlaylist<span class="signature">(playlist)</span><span class="type-signature"> &rarr; {Promise.&lt;(any|string|null)>}</span></h4>
1787
-
1788
-
1789
-
1790
-
1791
-
1792
-
1793
- <dl class="details">
1794
-
1795
- <dt class="tag-description">Description:</dt>
1796
- <dd class="tag-description"><ul class="dummy"><li>Soft restores a playlist. Will cascade and also soft restore entries in other playlist tables (pinned, reported, liked,
1797
- playlist content) and last engaged that have this playlist id</li></ul></dd>
1798
-
1799
-
1800
-
1801
- <dt class="tag-source">Source:</dt>
1802
- <dd class="tag-source"><ul class="dummy"><li>
1803
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line91">line 91</a>
1804
- </li></ul></dd>
1805
-
1806
-
1807
-
1808
-
1809
-
1810
-
1811
-
1812
-
1813
-
1814
-
1815
-
1816
-
1817
-
1818
-
1819
-
1820
-
1821
-
1822
-
1823
-
1824
-
1825
-
1826
-
1827
-
1828
-
1829
-
1830
-
1831
-
1832
-
1833
-
1834
-
1835
-
1836
- </dl>
1837
-
1838
-
1839
-
1840
-
1841
-
1842
-
1843
-
1844
-
1845
-
1846
-
1847
-
1848
-
1849
-
1850
- <h5 class="h5-parameters">Parameters:</h5>
1851
-
1852
-
1853
- <table class="params">
1854
- <thead>
1855
- <tr>
1856
-
1857
- <th>Name</th>
1858
-
1859
-
1860
- <th>Type</th>
1861
-
1862
-
1863
-
1864
-
1865
-
1866
- <th class="last">Description</th>
1867
- </tr>
1868
- </thead>
1869
-
1870
- <tbody>
1871
-
1872
-
1873
- <tr>
1874
-
1875
- <td class="name"><code>playlist</code></td>
1876
-
1877
-
1878
- <td class="type">
1879
-
1880
-
1881
- <span class="param-type">id</span>
1882
-
1883
-
1884
-
1885
-
1886
- </td>
1887
-
1888
-
1889
-
1890
-
1891
-
1892
- <td class="description last">the id of the playlist you want to soft restore.</td>
1893
- </tr>
1894
-
1895
-
1896
- </tbody>
1897
- </table>
1898
-
1899
-
1900
-
1901
-
1902
-
1903
-
1904
-
1905
-
1906
-
1907
-
1908
-
1909
-
1910
-
1911
-
1912
-
1913
-
1914
- <h5 class="h5-returns">Returns:</h5>
1915
-
1916
-
1917
-
1918
-
1919
- <dl class="param-type">
1920
- <dt>
1921
- Type
1922
- </dt>
1923
- <dd>
1924
-
1925
- <span class="param-type">Promise.&lt;(any|string|null)></span>
1926
-
1927
-
1928
-
1929
- </dd>
1930
- </dl>
1931
-
1932
-
1933
-
1934
-
1935
-
1936
-
1937
-
1938
-
1939
-
1940
-
1941
- <h4 class="name" id=".updatePlaylist"><span class="type-signature type-signature-static">(static) </span>updatePlaylist<span class="signature">(playlistId, updateData)</span><span class="type-signature"> &rarr; {Promise.&lt;object>}</span></h4>
1942
-
1943
-
1944
-
1945
-
1946
-
1947
-
1948
- <dl class="details">
1949
-
1950
- <dt class="tag-description">Description:</dt>
1951
- <dd class="tag-description"><ul class="dummy"><li>Updates a playlists values</li></ul></dd>
1952
-
1953
-
1954
-
1955
- <dt class="tag-source">Source:</dt>
1956
- <dd class="tag-source"><ul class="dummy"><li>
1957
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line247">line 247</a>
1958
- </li></ul></dd>
1959
-
1960
-
1961
-
1962
-
1963
-
1964
-
1965
-
1966
-
1967
-
1968
-
1969
-
1970
-
1971
-
1972
-
1973
-
1974
-
1975
-
1976
-
1977
-
1978
-
1979
-
1980
-
1981
-
1982
-
1983
-
1984
-
1985
-
1986
-
1987
-
1988
-
1989
-
1990
- </dl>
1991
-
1992
-
1993
-
1994
-
1995
-
1996
-
1997
-
1998
-
1999
-
2000
-
2001
-
2002
- <h5 class="h5-examples">Example</h5>
2003
-
2004
- <pre class="prettyprint"><code>updatePlaylist(661113 { name: "My Playlist", description: "A cool playlist", is_private: true, deleted_items : [2189832, 221091] })
2005
- .then(response => console.log(response.playlist); console.log(response.lessons))
2006
- .catch(error => console.error('Error updating playlist:', error));</code></pre>
2007
-
2008
-
2009
-
2010
-
2011
- <h5 class="h5-parameters">Parameters:</h5>
2012
-
2013
-
2014
- <table class="params">
2015
- <thead>
2016
- <tr>
2017
-
2018
- <th>Name</th>
2019
-
2020
-
2021
- <th>Type</th>
2022
-
2023
-
2024
-
2025
-
2026
-
2027
- <th class="last">Description</th>
2028
- </tr>
2029
- </thead>
2030
-
2031
- <tbody>
2032
-
2033
-
2034
- <tr>
2035
-
2036
- <td class="name"><code>playlistId</code></td>
2037
-
2038
-
2039
- <td class="type">
2040
-
2041
-
2042
- <span class="param-type">string</span>
2043
- |
2044
-
2045
- <span class="param-type">number</span>
2046
-
2047
-
2048
-
2049
-
2050
- </td>
2051
-
2052
-
2053
-
2054
-
2055
-
2056
- <td class="description last"></td>
2057
- </tr>
2058
-
2059
-
2060
-
2061
- <tr>
2062
-
2063
- <td class="name"><code>updateData</code></td>
2064
-
2065
-
2066
- <td class="type">
2067
-
2068
-
2069
- <span class="param-type"><a href="global.html#UpdatePlaylistDTO">UpdatePlaylistDTO</a></span>
2070
-
2071
-
2072
-
2073
-
2074
- </td>
2075
-
2076
-
2077
-
2078
-
2079
-
2080
- <td class="description last">An object containing fields to update on the playlist:
2081
- - `name` (string): The name of the new playlist (required, max 255 characters).
2082
- - `description` (string): A description of the playlist (optional, max 1000 characters).
2083
- - `category` (string): The category of the playlist (optional).
2084
- - `is_private` (boolean): Whether the playlist is private (optional, defaults to false).
2085
- - `deleted_items` (array): List of playlist item IDs to delete (optional).
2086
- - `item_order` (array): Updated order of playlist items (ids, not railcontent_ids) (optional).</td>
2087
- </tr>
2088
-
2089
-
2090
- </tbody>
2091
- </table>
2092
-
2093
-
2094
-
2095
-
2096
-
2097
-
2098
-
2099
-
2100
-
2101
-
2102
-
2103
-
2104
-
2105
-
2106
-
2107
-
2108
- <h5 class="h5-returns">Returns:</h5>
2109
-
2110
-
2111
- <div class="param-desc">
2112
- - A promise that resolves to the created playlist data and lessons if successful, or an error response if validation fails.
2113
-
2114
- The server response includes:
2115
- - `playlist`: Playlist metadata (same as fetchPlaylist)
2116
- - `lessons`: Updated list of plalyist lessons (same as fetchPlaylistItems)
2117
- </div>
2118
-
2119
-
2120
-
2121
- <dl class="param-type">
2122
- <dt>
2123
- Type
2124
- </dt>
2125
- <dd>
2126
-
2127
- <span class="param-type">Promise.&lt;object></span>
2128
-
2129
-
2130
-
2131
- </dd>
2132
- </dl>
2133
-
2134
-
2135
-
2136
-
2137
-
2138
-
2139
-
2140
-
2141
-
2142
-
2143
- <h4 class="name" id="~deleteItemsFromPlaylist"><span class="type-signature type-signature-async, inner">(async, inner) </span>deleteItemsFromPlaylist<span class="signature">(playlistId, deleted_items)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2144
-
2145
-
2146
-
2147
-
2148
-
2149
-
2150
- <dl class="details">
2151
-
2152
- <dt class="tag-description">Description:</dt>
2153
- <dd class="tag-description"><ul class="dummy"><li>Delete Items from playlist</li></ul></dd>
2154
-
2155
-
2156
-
2157
- <dt class="tag-source">Source:</dt>
2158
- <dd class="tag-source"><ul class="dummy"><li>
2159
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line262">line 262</a>
2160
- </li></ul></dd>
2161
-
2162
-
2163
-
2164
-
2165
-
2166
-
2167
-
2168
-
2169
-
2170
-
2171
-
2172
-
2173
-
2174
-
2175
-
2176
-
2177
-
2178
-
2179
-
2180
-
2181
-
2182
-
2183
-
2184
-
2185
-
2186
-
2187
-
2188
-
2189
-
2190
-
2191
-
2192
- </dl>
2193
-
2194
-
2195
-
2196
-
2197
-
2198
-
2199
-
2200
-
2201
-
2202
-
2203
-
2204
- <h5 class="h5-examples">Example</h5>
2205
-
2206
- <pre class="prettyprint"><code>// Delete items 8462221 and 8462222 from playlist 81111
2207
- try {
2208
- const response = await deleteItemsFromPlaylist(81111, [8462221, 8462222]);
2209
- } catch (error) {
2210
- console.error('Failed to delete playlist items:', error);
2211
- }</code></pre>
2212
-
2213
-
2214
-
2215
-
2216
- <h5 class="h5-parameters">Parameters:</h5>
2217
-
2218
-
2219
- <table class="params">
2220
- <thead>
2221
- <tr>
2222
-
2223
- <th>Name</th>
2224
-
2225
-
2226
- <th>Type</th>
2227
-
2228
-
2229
-
2230
-
2231
-
2232
- <th class="last">Description</th>
2233
- </tr>
2234
- </thead>
2235
-
2236
- <tbody>
2237
-
2238
-
2239
- <tr>
2240
-
2241
- <td class="name"><code>playlistId</code></td>
2242
-
2243
-
2244
- <td class="type">
2245
-
2246
-
2247
- <span class="param-type">string</span>
2248
- |
2249
-
2250
- <span class="param-type">number</span>
2251
-
2252
-
2253
-
2254
-
2255
- </td>
2256
-
2257
-
2258
-
2259
-
2260
-
2261
- <td class="description last">The unique identifier of the playlist to update.</td>
2262
- </tr>
2263
-
2264
-
2265
-
2266
- <tr>
2267
-
2268
- <td class="name"><code>deleted_items</code></td>
2269
-
2270
-
2271
- <td class="type">
2272
-
2273
-
2274
- <span class="param-type">array</span>
2275
-
2276
-
2277
-
2278
-
2279
- </td>
2280
-
2281
-
2282
-
2283
-
2284
-
2285
- <td class="description last">list of playlist ids to delete (user_playlist_item_id, not the railcontent_id)</td>
2286
- </tr>
2287
-
2288
-
2289
- </tbody>
2290
- </table>
2291
-
2292
-
2293
-
2294
-
2295
-
2296
-
2297
-
2298
-
2299
-
2300
-
2301
-
2302
-
2303
-
2304
-
2305
-
2306
-
2307
- <h5 class="h5-returns">Returns:</h5>
2308
-
2309
-
2310
-
2311
-
2312
- <dl class="param-type">
2313
- <dt>
2314
- Type
2315
- </dt>
2316
- <dd>
2317
-
2318
- <span class="param-type">Promise.&lt;Object></span>
2319
-
2320
-
2321
-
2322
- </dd>
2323
- </dl>
2324
-
2325
-
2326
-
2327
-
2328
-
2329
-
2330
-
2331
-
2332
-
2333
-
2334
- <h4 class="name" id="~likePlaylist"><span class="type-signature type-signature-async, inner">(async, inner) </span>likePlaylist<span class="signature">(playlistId)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2335
-
2336
-
2337
-
2338
-
2339
-
2340
-
2341
- <dl class="details">
2342
-
2343
- <dt class="tag-description">Description:</dt>
2344
- <dd class="tag-description"><ul class="dummy"><li>Likes a playlist for the current user.</li></ul></dd>
2345
-
2346
-
2347
-
2348
- <dt class="tag-source">Source:</dt>
2349
- <dd class="tag-source"><ul class="dummy"><li>
2350
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line97">line 97</a>
2351
- </li></ul></dd>
2352
-
2353
-
2354
-
2355
-
2356
-
2357
-
2358
-
2359
-
2360
-
2361
-
2362
-
2363
-
2364
-
2365
-
2366
-
2367
-
2368
-
2369
-
2370
-
2371
-
2372
-
2373
-
2374
-
2375
-
2376
-
2377
-
2378
-
2379
-
2380
-
2381
-
2382
-
2383
- </dl>
2384
-
2385
-
2386
-
2387
-
2388
-
2389
-
2390
-
2391
-
2392
-
2393
-
2394
-
2395
- <h5 class="h5-examples">Example</h5>
2396
-
2397
- <pre class="prettyprint"><code>// Like playlist with ID '123'
2398
- try {
2399
- const response = await likePlaylist('123');
2400
- console.log('Playlist liked successfully:', response);
2401
- } catch (error) {
2402
- console.error('Failed to like playlist:', error);
2403
- }</code></pre>
2404
-
2405
-
2406
-
2407
-
2408
- <h5 class="h5-parameters">Parameters:</h5>
2409
-
2410
-
2411
- <table class="params">
2412
- <thead>
2413
- <tr>
2414
-
2415
- <th>Name</th>
2416
-
2417
-
2418
- <th>Type</th>
2419
-
2420
-
2421
-
2422
-
2423
-
2424
- <th class="last">Description</th>
2425
- </tr>
2426
- </thead>
2427
-
2428
- <tbody>
2429
-
2430
-
2431
- <tr>
2432
-
2433
- <td class="name"><code>playlistId</code></td>
2434
-
2435
-
2436
- <td class="type">
2437
-
2438
-
2439
- <span class="param-type">string</span>
2440
- |
2441
-
2442
- <span class="param-type">number</span>
2443
-
2444
-
2445
-
2446
-
2447
- </td>
2448
-
2449
-
2450
-
2451
-
2452
-
2453
- <td class="description last">The unique identifier of the playlist to like.</td>
2454
- </tr>
2455
-
2456
-
2457
- </tbody>
2458
- </table>
2459
-
2460
-
2461
-
2462
-
2463
-
2464
-
2465
-
2466
-
2467
-
2468
-
2469
-
2470
-
2471
-
2472
-
2473
-
2474
-
2475
- <h5 class="h5-returns">Returns:</h5>
2476
-
2477
-
2478
-
2479
-
2480
- <dl class="param-type">
2481
- <dt>
2482
- Type
2483
- </dt>
2484
- <dd>
2485
-
2486
- <span class="param-type">Promise.&lt;Object></span>
2487
-
2488
-
2489
-
2490
- </dd>
2491
- </dl>
2492
-
2493
-
2494
-
2495
-
2496
-
2497
-
2498
-
2499
-
2500
-
2501
-
2502
- <h4 class="name" id="~reportPlaylist"><span class="type-signature type-signature-async, inner">(async, inner) </span>reportPlaylist<span class="signature">(playlistId)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2503
-
2504
-
2505
-
2506
-
2507
-
2508
-
2509
- <dl class="details">
2510
-
2511
- <dt class="tag-description">Description:</dt>
2512
- <dd class="tag-description"><ul class="dummy"><li>Reports a playlist</li></ul></dd>
2513
-
2514
-
2515
-
2516
- <dt class="tag-source">Source:</dt>
2517
- <dd class="tag-source"><ul class="dummy"><li>
2518
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line143">line 143</a>
2519
- </li></ul></dd>
2520
-
2521
-
2522
-
2523
-
2524
-
2525
-
2526
-
2527
-
2528
-
2529
-
2530
-
2531
-
2532
-
2533
-
2534
-
2535
-
2536
-
2537
-
2538
-
2539
-
2540
-
2541
-
2542
-
2543
-
2544
-
2545
-
2546
-
2547
-
2548
-
2549
-
2550
-
2551
- </dl>
2552
-
2553
-
2554
-
2555
-
2556
-
2557
-
2558
-
2559
-
2560
-
2561
-
2562
-
2563
- <h5 class="h5-examples">Example</h5>
2564
-
2565
- <pre class="prettyprint"><code>// Report playlist with ID '123'
2566
- try {
2567
- const response = await reportPlaylist('123');
2568
- console.log('Playlist reported successfully:', response);
2569
- } catch (error) {
2570
- console.error('Failed to report playlist:', error);
2571
- }</code></pre>
2572
-
2573
-
2574
-
2575
-
2576
- <h5 class="h5-parameters">Parameters:</h5>
2577
-
2578
-
2579
- <table class="params">
2580
- <thead>
2581
- <tr>
2582
-
2583
- <th>Name</th>
2584
-
2585
-
2586
- <th>Type</th>
2587
-
2588
-
2589
-
2590
-
2591
-
2592
- <th class="last">Description</th>
2593
- </tr>
2594
- </thead>
2595
-
2596
- <tbody>
2597
-
2598
-
2599
- <tr>
2600
-
2601
- <td class="name"><code>playlistId</code></td>
2602
-
2603
-
2604
- <td class="type">
2605
-
2606
-
2607
- <span class="param-type">string</span>
2608
- |
2609
-
2610
- <span class="param-type">number</span>
2611
-
2612
-
2613
-
2614
-
2615
- </td>
2616
-
2617
-
2618
-
2619
-
2620
-
2621
- <td class="description last">The unique identifier of the playlist to report.</td>
2622
- </tr>
2623
-
2624
-
2625
- </tbody>
2626
- </table>
2627
-
2628
-
2629
-
2630
-
2631
-
2632
-
2633
-
2634
-
2635
-
2636
-
2637
-
2638
-
2639
-
2640
-
2641
-
2642
-
2643
- <h5 class="h5-returns">Returns:</h5>
2644
-
2645
-
2646
-
2647
-
2648
- <dl class="param-type">
2649
- <dt>
2650
- Type
2651
- </dt>
2652
- <dd>
2653
-
2654
- <span class="param-type">Promise.&lt;Object></span>
2655
-
2656
-
2657
-
2658
- </dd>
2659
- </dl>
2660
-
2661
-
2662
-
2663
-
2664
-
2665
-
2666
-
2667
-
2668
-
2669
-
2670
- <h4 class="name" id="~restoreItemFromPlaylist"><span class="type-signature type-signature-async, inner">(async, inner) </span>restoreItemFromPlaylist<span class="signature">(playlistItemId)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2671
-
2672
-
2673
-
2674
-
2675
-
2676
-
2677
- <dl class="details">
2678
-
2679
- <dt class="tag-description">Description:</dt>
2680
- <dd class="tag-description"><ul class="dummy"><li>Restore items</li></ul></dd>
2681
-
2682
-
2683
-
2684
- <dt class="tag-source">Source:</dt>
2685
- <dd class="tag-source"><ul class="dummy"><li>
2686
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line284">line 284</a>
2687
- </li></ul></dd>
2688
-
2689
-
2690
-
2691
-
2692
-
2693
-
2694
-
2695
-
2696
-
2697
-
2698
-
2699
-
2700
-
2701
-
2702
-
2703
-
2704
-
2705
-
2706
-
2707
-
2708
-
2709
-
2710
-
2711
-
2712
-
2713
-
2714
-
2715
-
2716
-
2717
-
2718
-
2719
- </dl>
2720
-
2721
-
2722
-
2723
-
2724
-
2725
-
2726
-
2727
-
2728
-
2729
-
2730
-
2731
- <h5 class="h5-examples">Example</h5>
2732
-
2733
- <pre class="prettyprint"><code>// Restore item 8462221
2734
- try {
2735
- const response = await restoreItemFromPlaylist(8462221);
2736
- } catch (error) {
2737
- console.error('Failed to restore playlist item:', error);
2738
- }</code></pre>
2739
-
2740
-
2741
-
2742
-
2743
- <h5 class="h5-parameters">Parameters:</h5>
2744
-
2745
-
2746
- <table class="params">
2747
- <thead>
2748
- <tr>
2749
-
2750
- <th>Name</th>
2751
-
2752
-
2753
- <th>Type</th>
2754
-
2755
-
2756
-
2757
-
2758
-
2759
- <th class="last">Description</th>
2760
- </tr>
2761
- </thead>
2762
-
2763
- <tbody>
2764
-
2765
-
2766
- <tr>
2767
-
2768
- <td class="name"><code>playlistItemId</code></td>
2769
-
2770
-
2771
- <td class="type">
2772
-
2773
-
2774
- <span class="param-type">string</span>
2775
- |
2776
-
2777
- <span class="param-type">number</span>
2778
-
2779
-
2780
-
2781
-
2782
- </td>
2783
-
2784
-
2785
-
2786
-
2787
-
2788
- <td class="description last">The unique identifier of the playlist ite to restore.</td>
2789
- </tr>
2790
-
2791
-
2792
- </tbody>
2793
- </table>
2794
-
2795
-
2796
-
2797
-
2798
-
2799
-
2800
-
2801
-
2802
-
2803
-
2804
-
2805
-
2806
-
2807
-
2808
-
2809
-
2810
- <h5 class="h5-returns">Returns:</h5>
2811
-
2812
-
2813
-
2814
-
2815
- <dl class="param-type">
2816
- <dt>
2817
- Type
2818
- </dt>
2819
- <dd>
2820
-
2821
- <span class="param-type">Promise.&lt;Object></span>
2822
-
2823
-
2824
-
2825
- </dd>
2826
- </dl>
2827
-
2828
-
2829
-
2830
-
2831
-
2832
-
2833
-
2834
-
2835
-
2836
-
2837
- <h4 class="name" id="~unlikePlaylist"><span class="type-signature type-signature-async, inner">(async, inner) </span>unlikePlaylist<span class="signature">(playlistId)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2838
-
2839
-
2840
-
2841
-
2842
-
2843
-
2844
- <dl class="details">
2845
-
2846
- <dt class="tag-description">Description:</dt>
2847
- <dd class="tag-description"><ul class="dummy"><li>Unlikes a previously liked playlist.</li></ul></dd>
2848
-
2849
-
2850
-
2851
- <dt class="tag-source">Source:</dt>
2852
- <dd class="tag-source"><ul class="dummy"><li>
2853
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line120">line 120</a>
2854
- </li></ul></dd>
2855
-
2856
-
2857
-
2858
-
2859
-
2860
-
2861
-
2862
-
2863
-
2864
-
2865
-
2866
-
2867
-
2868
-
2869
-
2870
-
2871
-
2872
-
2873
-
2874
-
2875
-
2876
-
2877
-
2878
-
2879
-
2880
-
2881
-
2882
-
2883
-
2884
-
2885
-
2886
- </dl>
2887
-
2888
-
2889
-
2890
-
2891
-
2892
-
2893
-
2894
-
2895
-
2896
-
2897
-
2898
- <h5 class="h5-examples">Example</h5>
2899
-
2900
- <pre class="prettyprint"><code>// Unlike playlist with ID '123'
2901
- try {
2902
- const response = await unlikePlaylist('123');
2903
- console.log('Playlist unliked successfully:', response);
2904
- } catch (error) {
2905
- console.error('Failed to unlike playlist:', error);
2906
- }</code></pre>
2907
-
2908
-
2909
-
2910
-
2911
- <h5 class="h5-parameters">Parameters:</h5>
2912
-
2913
-
2914
- <table class="params">
2915
- <thead>
2916
- <tr>
2917
-
2918
- <th>Name</th>
2919
-
2920
-
2921
- <th>Type</th>
2922
-
2923
-
2924
-
2925
-
2926
-
2927
- <th class="last">Description</th>
2928
- </tr>
2929
- </thead>
2930
-
2931
- <tbody>
2932
-
2933
-
2934
- <tr>
2935
-
2936
- <td class="name"><code>playlistId</code></td>
2937
-
2938
-
2939
- <td class="type">
2940
-
2941
-
2942
- <span class="param-type">string</span>
2943
- |
2944
-
2945
- <span class="param-type">number</span>
2946
-
2947
-
2948
-
2949
-
2950
- </td>
2951
-
2952
-
2953
-
2954
-
2955
-
2956
- <td class="description last">The unique identifier of the playlist to unlike.</td>
2957
- </tr>
2958
-
2959
-
2960
- </tbody>
2961
- </table>
2962
-
2963
-
2964
-
2965
-
2966
-
2967
-
2968
-
2969
-
2970
-
2971
-
2972
-
2973
-
2974
-
2975
-
2976
-
2977
-
2978
- <h5 class="h5-returns">Returns:</h5>
2979
-
2980
-
2981
-
2982
-
2983
- <dl class="param-type">
2984
- <dt>
2985
- Type
2986
- </dt>
2987
- <dd>
2988
-
2989
- <span class="param-type">Promise.&lt;Object></span>
2990
-
2991
-
2992
-
2993
- </dd>
2994
- </dl>
2995
-
2996
-
2997
-
2998
-
2999
-
3000
-
3001
-
3002
-
3003
-
3004
-
3005
-
3006
- </article>
3007
-
3008
- </section>
3009
-
3010
-
3011
-
3012
-
3013
-
3014
-
3015
- </div>
3016
-
3017
- <br class="clear">
3018
-
3019
- <footer>
3020
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Nov 28 2025 11:22:56 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
3021
- </footer>
3022
-
3023
- <script>prettyPrint();</script>
3024
- <script src="scripts/polyfill.js"></script>
3025
- <script src="scripts/linenumber.js"></script>
3026
-
3027
-
3028
-
3029
- </body>
3030
- </html>