musora-content-services 1.6.5 → 1.6.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 (127) hide show
  1. package/.github/workflows/conventional-commits.yaml +16 -0
  2. package/.github/workflows/docs.js.yml +58 -0
  3. package/.github/workflows/node.js.yml +0 -0
  4. package/.prettierignore +0 -0
  5. package/.prettierrc +0 -0
  6. package/.yarnrc.yml +1 -0
  7. package/CHANGELOG.md +9 -0
  8. package/README.md +1 -2
  9. package/babel.config.cjs +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  28. package/docs/scripts/collapse.js +0 -0
  29. package/docs/scripts/commonNav.js +0 -0
  30. package/docs/scripts/linenumber.js +0 -0
  31. package/docs/scripts/nav.js +0 -0
  32. package/docs/scripts/polyfill.js +0 -0
  33. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  34. package/docs/scripts/prettify/lang-css.js +0 -0
  35. package/docs/scripts/prettify/prettify.js +0 -0
  36. package/docs/scripts/search.js +0 -0
  37. package/docs/styles/jsdoc.css +0 -0
  38. package/docs/styles/prettify.css +0 -0
  39. package/docs/v2/Content-Organization.html +245 -0
  40. package/docs/v2/ContentOrganization.html +245 -0
  41. package/docs/v2/Gamification.html +245 -0
  42. package/docs/v2/UserManagement.html +269 -0
  43. package/docs/v2/UserManagementSystem.html +317 -0
  44. package/docs/v2/api_types.js.html +97 -0
  45. package/docs/v2/config.js.html +143 -0
  46. package/docs/v2/content-org_content-org.js.html +76 -0
  47. package/docs/v2/content-org_playlists-types.js.html +116 -0
  48. package/docs/v2/content-org_playlists.js.html +418 -0
  49. package/docs/v2/content.js.html +466 -0
  50. package/docs/v2/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  51. package/docs/v2/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  52. package/docs/v2/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  53. package/docs/v2/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  54. package/docs/v2/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  55. package/docs/v2/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  56. package/docs/v2/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  57. package/docs/v2/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  58. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  59. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  60. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  61. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  62. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  63. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  64. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  65. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  66. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  67. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  68. package/docs/v2/gamification_awards.js.html +664 -0
  69. package/docs/v2/gamification_gamification.js.html +76 -0
  70. package/docs/v2/gamification_types.js.html +98 -0
  71. package/docs/v2/global.html +5812 -0
  72. package/docs/v2/global.html#User +293 -0
  73. package/docs/v2/index.html +168 -0
  74. package/docs/v2/module-Awards.html +354 -0
  75. package/docs/v2/module-Config.html +434 -0
  76. package/docs/v2/module-Content-Services-V2.html +2434 -0
  77. package/docs/v2/module-Interests.html +1066 -0
  78. package/docs/v2/module-Notifications.html +1183 -0
  79. package/docs/v2/module-Permissions.html +406 -0
  80. package/docs/v2/module-Playlists.html +2862 -0
  81. package/docs/v2/module-Railcontent-Services.html +7954 -0
  82. package/docs/v2/module-Sanity-Services.html +9608 -0
  83. package/docs/v2/module-Session-Management.html +575 -0
  84. package/docs/v2/module-Sessions.html +575 -0
  85. package/docs/v2/module-User-Activity.html +4410 -0
  86. package/docs/v2/module-User-Management.html +490 -0
  87. package/docs/v2/module-User-Permissions.html +406 -0
  88. package/docs/v2/module-UserActivity.html +4410 -0
  89. package/docs/v2/module-UserManagement.html +915 -0
  90. package/docs/v2/module-UserNotifications.html +1223 -0
  91. package/docs/v2/module-UserProfile.html +266 -0
  92. package/docs/v2/railcontent.js.html +984 -0
  93. package/docs/v2/sanity.js.html +2459 -0
  94. package/docs/v2/scripts/collapse.js +39 -0
  95. package/docs/v2/scripts/commonNav.js +28 -0
  96. package/docs/v2/scripts/linenumber.js +25 -0
  97. package/docs/v2/scripts/nav.js +12 -0
  98. package/docs/v2/scripts/polyfill.js +4 -0
  99. package/docs/v2/scripts/prettify/Apache-License-2.0.txt +202 -0
  100. package/docs/v2/scripts/prettify/lang-css.js +2 -0
  101. package/docs/v2/scripts/prettify/prettify.js +28 -0
  102. package/docs/v2/scripts/search.js +99 -0
  103. package/docs/v2/styles/jsdoc.css +776 -0
  104. package/docs/v2/styles/prettify.css +80 -0
  105. package/docs/v2/types.js.html +122 -0
  106. package/docs/v2/userActivity.js.html +1451 -0
  107. package/docs/v2/user_interests.js.html +150 -0
  108. package/docs/v2/user_management.js.html +178 -0
  109. package/docs/v2/user_notifications.js.html +192 -0
  110. package/docs/v2/user_permissions.js.html +110 -0
  111. package/docs/v2/user_profile.js.html +105 -0
  112. package/docs/v2/user_sessions.js.html +139 -0
  113. package/docs/v2/user_types.js.html +208 -0
  114. package/docs/v2/user_user-management-system.js.html +79 -0
  115. package/docs/v2/user_user-management.js.html +78 -0
  116. package/jest.config.js +0 -0
  117. package/package.json +1 -1
  118. package/src/contentTypeConfig.js +27 -12
  119. package/src/services/imageSRCVerify.js +0 -0
  120. package/src/services/sanity.js +124 -82
  121. package/test/dataContext.test.js +0 -0
  122. package/test/imageSRCBuilder.test.js +0 -0
  123. package/test/imageSRCVerify.test.js +0 -0
  124. package/test/live/contentProgressLive.test.js +0 -0
  125. package/test/live/railcontentLive.test.js +0 -0
  126. package/test/localStorageMock.js +0 -0
  127. package/test/log.js +0 -0
@@ -0,0 +1,2862 @@
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-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#.fetchAwardsForUser">fetchAwardsForUser</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#.getNewAndUpcoming">getNewAndUpcoming</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-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-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#~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#~togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></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#.fetchChallengeIndexMetadata">fetchChallengeIndexMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeLessonData">fetchChallengeLessonData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeMetadata">fetchChallengeMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeUserActiveChallenges">fetchChallengeUserActiveChallenges</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#.fetchCompletedChallenges">fetchCompletedChallenges</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#.fetchOwnedChallenges">fetchOwnedChallenges</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#.fetchUserChallengeProgress">fetchUserChallengeProgress</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#.postChallengesCommunityNotification">postChallengesCommunityNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnroll">postChallengesEnroll</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnrollmentNotification">postChallengesEnrollmentNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesHideCompletedBanner">postChallengesHideCompletedBanner</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesLeave">postChallengesLeave</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSetStartDate">postChallengesSetStartDate</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSoloNotification">postChallengesSoloNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesUnlock">postChallengesUnlock</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#.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#.fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</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#.fetchCoachLessons">fetchCoachLessons</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#.fetchGenreLessons">fetchGenreLessons</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#.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#.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#.fetchParentForDownload">fetchParentForDownload</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#.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#.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#~getNextAndPreviousQuarterDates">getNextAndPreviousQuarterDates</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</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#.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#.deletePicture">deletePicture</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</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-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#.fetchNotifications">fetchNotifications</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></ul></li><li><a href="module-UserProfile.html">UserProfile</a><ul class='methods'><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="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3><a href="global.html">Global</a></h3>
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#line13">line 13</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#line199">line 199</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#line68">line 68</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#line79">line 79</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#line302">line 302</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#line323">line 323</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#line343">line 343</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#line35">line 35</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#line217">line 217</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#line90">line 90</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#line245">line 245</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">Object</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.
2084
+ + * - `deleted_items` (array): List of playlist item IDs to delete.
2085
+ + * - `item_order` (array): Updated order of playlist items (ids, not railcontent_ids).</td>
2086
+ </tr>
2087
+
2088
+
2089
+ </tbody>
2090
+ </table>
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+
2101
+
2102
+
2103
+
2104
+
2105
+
2106
+
2107
+ <h5 class="h5-returns">Returns:</h5>
2108
+
2109
+
2110
+ <div class="param-desc">
2111
+ - A promise that resolves to the created playlist data and lessons if successful, or an error response if validation fails.
2112
+
2113
+ The server response includes:
2114
+ - `playlist`: Playlist metadata (same as fetchPlaylist)
2115
+ - `lessons`: Updated list of plalyist lessons (same as fetchPlaylistItems)
2116
+ </div>
2117
+
2118
+
2119
+
2120
+ <dl class="param-type">
2121
+ <dt>
2122
+ Type
2123
+ </dt>
2124
+ <dd>
2125
+
2126
+ <span class="param-type">Promise.&lt;object></span>
2127
+
2128
+
2129
+
2130
+ </dd>
2131
+ </dl>
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+ <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>
2143
+
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+ <dl class="details">
2150
+
2151
+ <dt class="tag-description">Description:</dt>
2152
+ <dd class="tag-description"><ul class="dummy"><li>Likes a playlist for the current user.</li></ul></dd>
2153
+
2154
+
2155
+
2156
+ <dt class="tag-source">Source:</dt>
2157
+ <dd class="tag-source"><ul class="dummy"><li>
2158
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line96">line 96</a>
2159
+ </li></ul></dd>
2160
+
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
+ </dl>
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+
2200
+
2201
+
2202
+
2203
+ <h5 class="h5-examples">Example</h5>
2204
+
2205
+ <pre class="prettyprint"><code>// Like playlist with ID '123'
2206
+ try {
2207
+ const response = await likePlaylist('123');
2208
+ console.log('Playlist liked successfully:', response);
2209
+ } catch (error) {
2210
+ console.error('Failed to like playlist:', 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 like.</td>
2262
+ </tr>
2263
+
2264
+
2265
+ </tbody>
2266
+ </table>
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+ <h5 class="h5-returns">Returns:</h5>
2284
+
2285
+
2286
+
2287
+
2288
+ <dl class="param-type">
2289
+ <dt>
2290
+ Type
2291
+ </dt>
2292
+ <dd>
2293
+
2294
+ <span class="param-type">Promise.&lt;Object></span>
2295
+
2296
+
2297
+
2298
+ </dd>
2299
+ </dl>
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+ <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>
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+ <dl class="details">
2318
+
2319
+ <dt class="tag-description">Description:</dt>
2320
+ <dd class="tag-description"><ul class="dummy"><li>Reports a playlist</li></ul></dd>
2321
+
2322
+
2323
+
2324
+ <dt class="tag-source">Source:</dt>
2325
+ <dd class="tag-source"><ul class="dummy"><li>
2326
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line142">line 142</a>
2327
+ </li></ul></dd>
2328
+
2329
+
2330
+
2331
+
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+
2341
+
2342
+
2343
+
2344
+
2345
+
2346
+
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+
2357
+
2358
+
2359
+ </dl>
2360
+
2361
+
2362
+
2363
+
2364
+
2365
+
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+ <h5 class="h5-examples">Example</h5>
2372
+
2373
+ <pre class="prettyprint"><code>// Report playlist with ID '123'
2374
+ try {
2375
+ const response = await reportPlaylist('123');
2376
+ console.log('Playlist reported successfully:', response);
2377
+ } catch (error) {
2378
+ console.error('Failed to report playlist:', error);
2379
+ }</code></pre>
2380
+
2381
+
2382
+
2383
+
2384
+ <h5 class="h5-parameters">Parameters:</h5>
2385
+
2386
+
2387
+ <table class="params">
2388
+ <thead>
2389
+ <tr>
2390
+
2391
+ <th>Name</th>
2392
+
2393
+
2394
+ <th>Type</th>
2395
+
2396
+
2397
+
2398
+
2399
+
2400
+ <th class="last">Description</th>
2401
+ </tr>
2402
+ </thead>
2403
+
2404
+ <tbody>
2405
+
2406
+
2407
+ <tr>
2408
+
2409
+ <td class="name"><code>playlistId</code></td>
2410
+
2411
+
2412
+ <td class="type">
2413
+
2414
+
2415
+ <span class="param-type">string</span>
2416
+ |
2417
+
2418
+ <span class="param-type">number</span>
2419
+
2420
+
2421
+
2422
+
2423
+ </td>
2424
+
2425
+
2426
+
2427
+
2428
+
2429
+ <td class="description last">The unique identifier of the playlist to report.</td>
2430
+ </tr>
2431
+
2432
+
2433
+ </tbody>
2434
+ </table>
2435
+
2436
+
2437
+
2438
+
2439
+
2440
+
2441
+
2442
+
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+ <h5 class="h5-returns">Returns:</h5>
2452
+
2453
+
2454
+
2455
+
2456
+ <dl class="param-type">
2457
+ <dt>
2458
+ Type
2459
+ </dt>
2460
+ <dd>
2461
+
2462
+ <span class="param-type">Promise.&lt;Object></span>
2463
+
2464
+
2465
+
2466
+ </dd>
2467
+ </dl>
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+
2474
+
2475
+
2476
+
2477
+
2478
+ <h4 class="name" id="~togglePlaylistPrivate"><span class="type-signature type-signature-async, inner">(async, inner) </span>togglePlaylistPrivate<span class="signature">(playlistId, deleted_items)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2479
+
2480
+
2481
+
2482
+
2483
+
2484
+
2485
+ <dl class="details">
2486
+
2487
+ <dt class="tag-description">Description:</dt>
2488
+ <dd class="tag-description"><ul class="dummy"><li>Delete Items from playlist</li></ul></dd>
2489
+
2490
+
2491
+
2492
+ <dt class="tag-source">Source:</dt>
2493
+ <dd class="tag-source"><ul class="dummy"><li>
2494
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line262">line 262</a>
2495
+ </li></ul></dd>
2496
+
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+ </dl>
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+ <h5 class="h5-examples">Example</h5>
2540
+
2541
+ <pre class="prettyprint"><code>// Delete items 8462221 and 8462222 from playlist 81111
2542
+ try {
2543
+ const response = await deleteItemsFromPlaylist(81111, [8462221, 8462222]);
2544
+ } catch (error) {
2545
+ console.error('Failed to delete playlist items:', error);
2546
+ }</code></pre>
2547
+
2548
+
2549
+
2550
+
2551
+ <h5 class="h5-parameters">Parameters:</h5>
2552
+
2553
+
2554
+ <table class="params">
2555
+ <thead>
2556
+ <tr>
2557
+
2558
+ <th>Name</th>
2559
+
2560
+
2561
+ <th>Type</th>
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+ <th class="last">Description</th>
2568
+ </tr>
2569
+ </thead>
2570
+
2571
+ <tbody>
2572
+
2573
+
2574
+ <tr>
2575
+
2576
+ <td class="name"><code>playlistId</code></td>
2577
+
2578
+
2579
+ <td class="type">
2580
+
2581
+
2582
+ <span class="param-type">string</span>
2583
+ |
2584
+
2585
+ <span class="param-type">number</span>
2586
+
2587
+
2588
+
2589
+
2590
+ </td>
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+ <td class="description last">The unique identifier of the playlist to update.</td>
2597
+ </tr>
2598
+
2599
+
2600
+
2601
+ <tr>
2602
+
2603
+ <td class="name"><code>deleted_items</code></td>
2604
+
2605
+
2606
+ <td class="type">
2607
+
2608
+
2609
+ <span class="param-type">array</span>
2610
+
2611
+
2612
+
2613
+
2614
+ </td>
2615
+
2616
+
2617
+
2618
+
2619
+
2620
+ <td class="description last">list of playlist ids to delete (user_playlist_item_id, not the railcontent_id)</td>
2621
+ </tr>
2622
+
2623
+
2624
+ </tbody>
2625
+ </table>
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+
2642
+ <h5 class="h5-returns">Returns:</h5>
2643
+
2644
+
2645
+
2646
+
2647
+ <dl class="param-type">
2648
+ <dt>
2649
+ Type
2650
+ </dt>
2651
+ <dd>
2652
+
2653
+ <span class="param-type">Promise.&lt;Object></span>
2654
+
2655
+
2656
+
2657
+ </dd>
2658
+ </dl>
2659
+
2660
+
2661
+
2662
+
2663
+
2664
+
2665
+
2666
+
2667
+
2668
+
2669
+ <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>
2670
+
2671
+
2672
+
2673
+
2674
+
2675
+
2676
+ <dl class="details">
2677
+
2678
+ <dt class="tag-description">Description:</dt>
2679
+ <dd class="tag-description"><ul class="dummy"><li>Unlikes a previously liked playlist.</li></ul></dd>
2680
+
2681
+
2682
+
2683
+ <dt class="tag-source">Source:</dt>
2684
+ <dd class="tag-source"><ul class="dummy"><li>
2685
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line119">line 119</a>
2686
+ </li></ul></dd>
2687
+
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
+ </dl>
2719
+
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+
2726
+
2727
+
2728
+
2729
+
2730
+ <h5 class="h5-examples">Example</h5>
2731
+
2732
+ <pre class="prettyprint"><code>// Unlike playlist with ID '123'
2733
+ try {
2734
+ const response = await unlikePlaylist('123');
2735
+ console.log('Playlist unliked successfully:', response);
2736
+ } catch (error) {
2737
+ console.error('Failed to unlike playlist:', 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>playlistId</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 to unlike.</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
+
2838
+ </article>
2839
+
2840
+ </section>
2841
+
2842
+
2843
+
2844
+
2845
+
2846
+
2847
+ </div>
2848
+
2849
+ <br class="clear">
2850
+
2851
+ <footer>
2852
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Jun 16 2025 14:26:22 GMT+0300 (Eastern European Summer Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2853
+ </footer>
2854
+
2855
+ <script>prettyPrint();</script>
2856
+ <script src="scripts/polyfill.js"></script>
2857
+ <script src="scripts/linenumber.js"></script>
2858
+
2859
+
2860
+
2861
+ </body>
2862
+ </html>