musora-content-services 2.4.0 → 2.5.1

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 (56) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Gamification.html +2 -2
  4. package/docs/UserManagementSystem.html +26 -2
  5. package/docs/api_types.js.html +2 -2
  6. package/docs/config.js.html +2 -2
  7. package/docs/content-org_content-org.js.html +2 -2
  8. package/docs/content-org_playlists-types.js.html +6 -6
  9. package/docs/content-org_playlists.js.html +220 -18
  10. package/docs/content.js.html +2 -2
  11. package/docs/gamification_awards.js.html +2 -2
  12. package/docs/gamification_gamification.js.html +2 -2
  13. package/docs/gamification_types.js.html +2 -2
  14. package/docs/global.html +14 -23
  15. package/docs/index.html +2 -2
  16. package/docs/module-Awards.html +2 -2
  17. package/docs/module-Config.html +2 -2
  18. package/docs/module-Content-Services-V2.html +2 -2
  19. package/docs/module-Interests.html +1066 -0
  20. package/docs/module-Permissions.html +2 -2
  21. package/docs/module-Playlists.html +1738 -157
  22. package/docs/module-Railcontent-Services.html +823 -3862
  23. package/docs/module-Sanity-Services.html +2 -2
  24. package/docs/module-Sessions.html +2 -2
  25. package/docs/module-User-Activity.html +405 -32
  26. package/docs/module-UserManagement.html +2 -2
  27. package/docs/railcontent.js.html +65 -464
  28. package/docs/sanity.js.html +3 -3
  29. package/docs/userActivity.js.html +176 -42
  30. package/docs/user_interests.js.html +150 -0
  31. package/docs/user_management.js.html +2 -2
  32. package/docs/user_permissions.js.html +2 -2
  33. package/docs/user_sessions.js.html +2 -2
  34. package/docs/user_types.js.html +2 -2
  35. package/docs/user_user-management-system.js.html +3 -2
  36. package/package.json +1 -1
  37. package/src/index.d.ts +15 -0
  38. package/src/index.js +15 -0
  39. package/src/infrastructure/http/HttpClient.ts +0 -0
  40. package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
  41. package/src/infrastructure/http/index.ts +0 -0
  42. package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
  43. package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
  44. package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
  45. package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
  46. package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
  47. package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -6
  48. package/src/services/content-org/playlists.js +0 -0
  49. package/src/services/contentAggregator.js +0 -0
  50. package/src/services/contentProgress.js +9 -0
  51. package/src/services/recommendations.js +0 -0
  52. package/src/services/user/interests.js +78 -0
  53. package/src/services/user/user-management-system.js +1 -0
  54. package/test/HttpClient.test.js +0 -0
  55. package/test/content.test.js +0 -0
  56. package/test/sanityQueryService.test.js +0 -0
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
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-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#.fetchUserPlaylists">fetchUserPlaylists</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#.countAssignmentsAndLessons">countAssignmentsAndLessons</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#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistItem">deletePlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistLike">deletePlaylistLike</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.duplicatePlaylist">duplicatePlaylist</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#.fetchPinnedPlaylists">fetchPinnedPlaylists</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItem">fetchPlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItems">fetchPlaylistItems</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#.likePlaylist">likePlaylist</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#.pinPlaylist">pinPlaylist</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#.reportPlaylist">reportPlaylist</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#.unpinPlaylist">unpinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylistItem">updatePlaylistItem</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-User-Activity.html">User-Activity</a><ul class='methods'><li data-type='method'><a href="module-User-Activity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-User-Activity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.updateUserPractice">updateUserPractice</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#.unblockUser">unblockUser</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>
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#.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#.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#.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-User-Activity.html">User-Activity</a><ul class='methods'><li data-type='method'><a href="module-User-Activity.html#.calculateLongestStreaks">calculateLongestStreaks</a></li><li data-type='method'><a href="module-User-Activity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-User-Activity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.updateUserPractice">updateUserPractice</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#.unblockUser">unblockUser</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
33
 
34
34
  </nav>
35
35
 
@@ -182,7 +182,7 @@
182
182
 
183
183
  <dt class="tag-source">Source:</dt>
184
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#line116">line 116</a>
185
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line175">line 175</a>
186
186
  </li></ul></dd>
187
187
 
188
188
 
@@ -400,7 +400,7 @@ the new playlist with the authenticated user. The `name` field is required, whil
400
400
 
401
401
  <dt class="tag-source">Source:</dt>
402
402
  <dd class="tag-source"><ul class="dummy"><li>
403
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line78">line 78</a>
403
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line68">line 68</a>
404
404
  </li></ul></dd>
405
405
 
406
406
 
@@ -448,7 +448,7 @@ the new playlist with the authenticated user. The `name` field is required, whil
448
448
  <h5 class="h5-examples">Example</h5>
449
449
 
450
450
  <pre class="prettyprint"><code>createPlaylist({ name: "My Playlist", description: "A cool playlist", private: true })
451
- .then(response => console.log(response.message))
451
+ .then(response => console.log(response))
452
452
  .catch(error => console.error('Error creating playlist:', error));</code></pre>
453
453
 
454
454
 
@@ -500,8 +500,7 @@ the new playlist with the authenticated user. The `name` field is required, whil
500
500
  - `name` (string): The name of the new playlist (required, max 255 characters).
501
501
  - `description` (string): A description of the playlist (optional, max 1000 characters).
502
502
  - `category` (string): The category of the playlist.
503
- - `thumbnail_url` (string): The URL of the playlist thumbnail (optional, must be a valid URL).
504
- - `private` (boolean): Whether the playlist is private (optional, defaults to true).
503
+ - `private` (boolean): Whether the playlist is private (optional, defaults to false).
505
504
  - `brand` (string): Brand identifier for the playlist.</td>
506
505
  </tr>
507
506
 
@@ -529,10 +528,6 @@ the new playlist with the authenticated user. The `name` field is required, whil
529
528
 
530
529
  <div class="param-desc">
531
530
  - A promise that resolves to the created playlist data if successful, or an error response if validation fails.
532
-
533
- The server response includes:
534
- - `message`: Success message indicating playlist creation (e.g., "Playlist created successfully").
535
- - `playlist`: The data for the created playlist, including the `user_id` of the authenticated user.
536
531
  </div>
537
532
 
538
533
 
@@ -559,7 +554,7 @@ The server response includes:
559
554
 
560
555
 
561
556
 
562
- <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>
557
+ <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>
563
558
 
564
559
 
565
560
 
@@ -569,15 +564,13 @@ The server response includes:
569
564
  <dl class="details">
570
565
 
571
566
  <dt class="tag-description">Description:</dt>
572
- <dd class="tag-description"><ul class="dummy"><li>Fetches user playlists for a specific brand.
573
-
574
- Allows optional pagination, sorting, and search parameters to control the result set.</li></ul></dd>
567
+ <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>
575
568
 
576
569
 
577
570
 
578
571
  <dt class="tag-source">Source:</dt>
579
572
  <dd class="tag-source"><ul class="dummy"><li>
580
- <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line36">line 36</a>
573
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line277">line 277</a>
581
574
  </li></ul></dd>
582
575
 
583
576
 
@@ -624,9 +617,9 @@ Allows optional pagination, sorting, and search parameters to control the result
624
617
 
625
618
  <h5 class="h5-examples">Example</h5>
626
619
 
627
- <pre class="prettyprint"><code>fetchUserPlaylists('drumeo', { page: 1, sort: 'name', searchTerm: 'rock' })
628
- .then(playlists => console.log(playlists))
629
- .catch(error => console.error(error));</code></pre>
620
+ <pre class="prettyprint"><code>duplicatePlaylist(81167, { name: "My Playlist (Duplicate)", description: "A cool playlist", private: true })
621
+ .then(response => console.log(response))
622
+ .catch(error => console.error('Error creating playlist:', error));</code></pre>
630
623
 
631
624
 
632
625
 
@@ -644,12 +637,8 @@ Allows optional pagination, sorting, and search parameters to control the result
644
637
  <th>Type</th>
645
638
 
646
639
 
647
- <th>Attributes</th>
648
-
649
640
 
650
641
 
651
- <th>Default</th>
652
-
653
642
 
654
643
  <th class="last">Description</th>
655
644
  </tr>
@@ -660,49 +649,40 @@ Allows optional pagination, sorting, and search parameters to control the result
660
649
 
661
650
  <tr>
662
651
 
663
- <td class="name"><code>brand</code></td>
652
+ <td class="name"><code>playlistId</code></td>
664
653
 
665
654
 
666
655
  <td class="type">
667
656
 
668
657
 
669
658
  <span class="param-type">string</span>
659
+ |
670
660
 
661
+ <span class="param-type">number</span>
671
662
 
672
663
 
673
-
674
- </td>
675
664
 
676
665
 
677
- <td class="attributes">
678
-
679
-
680
-
666
+ </td>
681
667
 
682
-
683
- </td>
684
668
 
685
669
 
686
670
 
687
- <td class="default">
688
-
689
- </td>
690
-
691
671
 
692
- <td class="description last">The brand identifier for which playlists are being fetched.</td>
672
+ <td class="description last"></td>
693
673
  </tr>
694
674
 
695
675
 
696
676
 
697
677
  <tr>
698
678
 
699
- <td class="name"><code>params.limit</code></td>
679
+ <td class="name"><code>playlistData</code></td>
700
680
 
701
681
 
702
682
  <td class="type">
703
683
 
704
684
 
705
- <span class="param-type">number</span>
685
+ <span class="param-type"><a href="global.html#CreatePlaylistDTO">CreatePlaylistDTO</a></span>
706
686
 
707
687
 
708
688
 
@@ -710,160 +690,171 @@ Allows optional pagination, sorting, and search parameters to control the result
710
690
  </td>
711
691
 
712
692
 
713
- <td class="attributes">
714
-
715
- &lt;optional><br>
716
-
717
-
718
-
719
-
720
-
721
- </td>
722
-
723
693
 
724
694
 
725
- <td class="default">
726
-
727
- <code>10</code>
728
-
729
- </td>
730
-
731
695
 
732
- <td class="description last">The maximum number of playlists to return per page (default is 10).</td>
696
+ <td class="description last">An object containing data to create the playlist. The fields include:
697
+ - `name` (string): The name of the new playlist (required, max 255 characters).
698
+ - `description` (string): A description of the playlist (optional, max 1000 characters).
699
+ - `category` (string): The category of the playlist.
700
+ - `private` (boolean): Whether the playlist is private (optional, defaults to false).
701
+ - `brand` (string): Brand identifier for the playlist.</td>
733
702
  </tr>
734
703
 
735
704
 
705
+ </tbody>
706
+ </table>
736
707
 
737
- <tr>
738
-
739
- <td class="name"><code>params.page</code></td>
740
-
741
708
 
742
- <td class="type">
743
-
744
-
745
- <span class="param-type">number</span>
746
709
 
747
710
 
748
711
 
749
-
750
- </td>
751
712
 
752
-
753
- <td class="attributes">
754
-
755
- &lt;optional><br>
756
-
757
713
 
758
-
759
714
 
760
-
761
- </td>
762
-
763
715
 
764
-
765
- <td class="default">
766
-
767
- <code>1</code>
768
-
769
- </td>
770
-
771
716
 
772
- <td class="description last">The page number for pagination.</td>
773
- </tr>
717
+
718
+
719
+
720
+
721
+
722
+
723
+ <h5 class="h5-returns">Returns:</h5>
724
+
725
+
726
+
727
+
728
+ <dl class="param-type">
729
+ <dt>
730
+ Type
731
+ </dt>
732
+ <dd>
733
+
734
+ <span class="param-type">Promise.&lt;<a href="global.html#Playlist">Playlist</a>></span>
735
+
736
+
737
+
738
+ </dd>
739
+ </dl>
774
740
 
775
741
 
776
742
 
777
- <tr>
778
-
779
- <td class="name"><code>params.sort</code></td>
780
-
781
743
 
782
- <td class="type">
744
+
745
+
783
746
 
784
-
785
- <span class="param-type">string</span>
786
747
 
748
+
787
749
 
750
+ <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>
788
751
 
789
-
790
- </td>
752
+
791
753
 
792
-
793
- <td class="attributes">
794
-
795
- &lt;optional><br>
796
-
797
754
 
798
-
799
755
 
800
-
801
- </td>
802
-
803
756
 
804
-
805
- <td class="default">
806
-
807
- <code>'-created_at'</code>
808
-
809
- </td>
810
-
757
+ <dl class="details">
758
+
759
+ <dt class="tag-description">Description:</dt>
760
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves details of a specific playlist by its ID.
811
761
 
812
- <td class="description last">The sorting order for the playlists (default is by created_at in descending order).</td>
813
- </tr>
762
+ This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
763
+ The server validates the user's access to the playlist and returns playlist details if the user is authorized.</li></ul></dd>
764
+
814
765
 
815
766
 
767
+ <dt class="tag-source">Source:</dt>
768
+ <dd class="tag-source"><ul class="dummy"><li>
769
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line298">line 298</a>
770
+ </li></ul></dd>
771
+
816
772
 
817
- <tr>
818
-
819
- <td class="name"><code>params.searchTerm</code></td>
820
-
773
+
821
774
 
822
- <td class="type">
823
-
824
-
825
- <span class="param-type">string</span>
775
+
776
+
777
+
826
778
 
779
+
827
780
 
781
+
828
782
 
829
-
830
- </td>
783
+
831
784
 
832
-
833
- <td class="attributes">
834
-
835
- &lt;optional><br>
836
-
785
+
837
786
 
838
-
787
+
839
788
 
840
-
841
- </td>
842
-
789
+
843
790
 
844
-
845
- <td class="default">
846
-
847
- </td>
848
-
791
+
849
792
 
850
- <td class="description last">A search term to filter playlists by name.</td>
851
- </tr>
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+ </dl>
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+ <h5 class="h5-examples">Example</h5>
815
+
816
+ <pre class="prettyprint"><code>fetchPlaylist(12345)
817
+ .then(response => console.log(response.data))
818
+ .catch(error => console.error('Error fetching playlist:', error));</code></pre>
819
+
820
+
821
+
822
+
823
+ <h5 class="h5-parameters">Parameters:</h5>
824
+
825
+
826
+ <table class="params">
827
+ <thead>
828
+ <tr>
829
+
830
+ <th>Name</th>
831
+
832
+
833
+ <th>Type</th>
834
+
835
+
852
836
 
837
+
838
+
839
+ <th class="last">Description</th>
840
+ </tr>
841
+ </thead>
842
+
843
+ <tbody>
853
844
 
854
845
 
855
846
  <tr>
856
847
 
857
- <td class="name"><code>params.content_id</code></td>
848
+ <td class="name"><code>playlistId</code></td>
858
849
 
859
850
 
860
851
  <td class="type">
861
852
 
862
853
 
863
- <span class="param-type">int</span>
854
+ <span class="param-type">string</span>
864
855
  |
865
856
 
866
- <span class="param-type">string</span>
857
+ <span class="param-type">number</span>
867
858
 
868
859
 
869
860
 
@@ -871,24 +862,10 @@ Allows optional pagination, sorting, and search parameters to control the result
871
862
  </td>
872
863
 
873
864
 
874
- <td class="attributes">
875
-
876
- &lt;optional><br>
877
-
878
-
879
-
880
-
881
-
882
- </td>
883
-
884
865
 
885
866
 
886
- <td class="default">
887
-
888
- </td>
889
-
890
867
 
891
- <td class="description last">If content_id exists, the endpoint checks in each playlist if we have the content in the items.</td>
868
+ <td class="description last">The unique identifier of the playlist to retrieve.</td>
892
869
  </tr>
893
870
 
894
871
 
@@ -914,7 +891,8 @@ Allows optional pagination, sorting, and search parameters to control the result
914
891
 
915
892
 
916
893
  <div class="param-desc">
917
- - A promise that resolves to the response from the API, containing the user playlists data.
894
+ - A promise that resolves to the response from the API, containing:
895
+ - `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
918
896
  </div>
919
897
 
920
898
 
@@ -925,7 +903,1610 @@ Allows optional pagination, sorting, and search parameters to control the result
925
903
  </dt>
926
904
  <dd>
927
905
 
928
- <span class="param-type">Promise.&lt;(Object|null)></span>
906
+ <span class="param-type">Promise.&lt;Object></span>
907
+
908
+
909
+
910
+ </dd>
911
+ </dl>
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+ <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>
923
+
924
+
925
+
926
+
927
+
928
+
929
+ <dl class="details">
930
+
931
+ <dt class="tag-description">Description:</dt>
932
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves items within a specified playlist by playlist ID.
933
+
934
+ This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
935
+ The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
936
+
937
+
938
+
939
+ <dt class="tag-source">Source:</dt>
940
+ <dd class="tag-source"><ul class="dummy"><li>
941
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line318">line 318</a>
942
+ </li></ul></dd>
943
+
944
+
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+ </dl>
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+ <h5 class="h5-examples">Example</h5>
987
+
988
+ <pre class="prettyprint"><code>fetchPlaylistItems(12345)
989
+ .then(items => console.log(items))
990
+ .catch(error => console.error('Error fetching playlist items:', error));</code></pre>
991
+
992
+
993
+
994
+
995
+ <h5 class="h5-parameters">Parameters:</h5>
996
+
997
+
998
+ <table class="params">
999
+ <thead>
1000
+ <tr>
1001
+
1002
+ <th>Name</th>
1003
+
1004
+
1005
+ <th>Type</th>
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+ <th class="last">Description</th>
1012
+ </tr>
1013
+ </thead>
1014
+
1015
+ <tbody>
1016
+
1017
+
1018
+ <tr>
1019
+
1020
+ <td class="name"><code>playlistId</code></td>
1021
+
1022
+
1023
+ <td class="type">
1024
+
1025
+
1026
+ <span class="param-type">string</span>
1027
+ |
1028
+
1029
+ <span class="param-type">number</span>
1030
+
1031
+
1032
+
1033
+
1034
+ </td>
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+ <td class="description last">The unique identifier of the playlist whose items are to be fetched.</td>
1041
+ </tr>
1042
+
1043
+
1044
+ </tbody>
1045
+ </table>
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+ <h5 class="h5-returns">Returns:</h5>
1063
+
1064
+
1065
+ <div class="param-desc">
1066
+ - A promise that resolves to an array of playlist items
1067
+ </div>
1068
+
1069
+
1070
+
1071
+ <dl class="param-type">
1072
+ <dt>
1073
+ Type
1074
+ </dt>
1075
+ <dd>
1076
+
1077
+ <span class="param-type">Promise.&lt;Array.&lt;Object>></span>
1078
+
1079
+
1080
+
1081
+ </dd>
1082
+ </dl>
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+ <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>
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+ <dl class="details">
1101
+
1102
+ <dt class="tag-description">Description:</dt>
1103
+ <dd class="tag-description"><ul class="dummy"><li>Fetches user playlists for a specific brand.
1104
+
1105
+ Allows optional pagination, sorting, and search parameters to control the result set.</li></ul></dd>
1106
+
1107
+
1108
+
1109
+ <dt class="tag-source">Source:</dt>
1110
+ <dd class="tag-source"><ul class="dummy"><li>
1111
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line35">line 35</a>
1112
+ </li></ul></dd>
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+
1144
+ </dl>
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+ <h5 class="h5-examples">Example</h5>
1157
+
1158
+ <pre class="prettyprint"><code>fetchUserPlaylists('drumeo', { page: 1, sort: 'name', searchTerm: 'rock' })
1159
+ .then(playlists => console.log(playlists))
1160
+ .catch(error => console.error(error));</code></pre>
1161
+
1162
+
1163
+
1164
+
1165
+ <h5 class="h5-parameters">Parameters:</h5>
1166
+
1167
+
1168
+ <table class="params">
1169
+ <thead>
1170
+ <tr>
1171
+
1172
+ <th>Name</th>
1173
+
1174
+
1175
+ <th>Type</th>
1176
+
1177
+
1178
+ <th>Attributes</th>
1179
+
1180
+
1181
+
1182
+ <th>Default</th>
1183
+
1184
+
1185
+ <th class="last">Description</th>
1186
+ </tr>
1187
+ </thead>
1188
+
1189
+ <tbody>
1190
+
1191
+
1192
+ <tr>
1193
+
1194
+ <td class="name"><code>brand</code></td>
1195
+
1196
+
1197
+ <td class="type">
1198
+
1199
+
1200
+ <span class="param-type">string</span>
1201
+
1202
+
1203
+
1204
+
1205
+ </td>
1206
+
1207
+
1208
+ <td class="attributes">
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+ </td>
1215
+
1216
+
1217
+
1218
+ <td class="default">
1219
+
1220
+ </td>
1221
+
1222
+
1223
+ <td class="description last">The brand identifier for which playlists are being fetched.</td>
1224
+ </tr>
1225
+
1226
+
1227
+
1228
+ <tr>
1229
+
1230
+ <td class="name"><code>params.limit</code></td>
1231
+
1232
+
1233
+ <td class="type">
1234
+
1235
+
1236
+ <span class="param-type">number</span>
1237
+
1238
+
1239
+
1240
+
1241
+ </td>
1242
+
1243
+
1244
+ <td class="attributes">
1245
+
1246
+ &lt;optional><br>
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+ </td>
1253
+
1254
+
1255
+
1256
+ <td class="default">
1257
+
1258
+ <code>10</code>
1259
+
1260
+ </td>
1261
+
1262
+
1263
+ <td class="description last">The maximum number of playlists to return per page (default is 10).</td>
1264
+ </tr>
1265
+
1266
+
1267
+
1268
+ <tr>
1269
+
1270
+ <td class="name"><code>params.page</code></td>
1271
+
1272
+
1273
+ <td class="type">
1274
+
1275
+
1276
+ <span class="param-type">number</span>
1277
+
1278
+
1279
+
1280
+
1281
+ </td>
1282
+
1283
+
1284
+ <td class="attributes">
1285
+
1286
+ &lt;optional><br>
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+ </td>
1293
+
1294
+
1295
+
1296
+ <td class="default">
1297
+
1298
+ <code>1</code>
1299
+
1300
+ </td>
1301
+
1302
+
1303
+ <td class="description last">The page number for pagination.</td>
1304
+ </tr>
1305
+
1306
+
1307
+
1308
+ <tr>
1309
+
1310
+ <td class="name"><code>params.sort</code></td>
1311
+
1312
+
1313
+ <td class="type">
1314
+
1315
+
1316
+ <span class="param-type">string</span>
1317
+
1318
+
1319
+
1320
+
1321
+ </td>
1322
+
1323
+
1324
+ <td class="attributes">
1325
+
1326
+ &lt;optional><br>
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+ </td>
1333
+
1334
+
1335
+
1336
+ <td class="default">
1337
+
1338
+ <code>'-created_at'</code>
1339
+
1340
+ </td>
1341
+
1342
+
1343
+ <td class="description last">The sorting order for the playlists (default is by created_at in descending order).</td>
1344
+ </tr>
1345
+
1346
+
1347
+
1348
+ <tr>
1349
+
1350
+ <td class="name"><code>params.content_id</code></td>
1351
+
1352
+
1353
+ <td class="type">
1354
+
1355
+
1356
+ <span class="param-type">int</span>
1357
+ |
1358
+
1359
+ <span class="param-type">string</span>
1360
+
1361
+
1362
+
1363
+
1364
+ </td>
1365
+
1366
+
1367
+ <td class="attributes">
1368
+
1369
+ &lt;optional><br>
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+ </td>
1376
+
1377
+
1378
+
1379
+ <td class="default">
1380
+
1381
+ </td>
1382
+
1383
+
1384
+ <td class="description last">If content_id exists, the endpoint checks in each playlist if we have the content in the items.</td>
1385
+ </tr>
1386
+
1387
+
1388
+ </tbody>
1389
+ </table>
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+ <h5 class="h5-returns">Returns:</h5>
1407
+
1408
+
1409
+ <div class="param-desc">
1410
+ - A promise that resolves to the response from the API, containing the user playlists data.
1411
+ </div>
1412
+
1413
+
1414
+
1415
+ <dl class="param-type">
1416
+ <dt>
1417
+ Type
1418
+ </dt>
1419
+ <dd>
1420
+
1421
+ <span class="param-type">Promise.&lt;(Object|null)></span>
1422
+
1423
+
1424
+
1425
+ </dd>
1426
+ </dl>
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+ <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>
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+ <dl class="details">
1445
+
1446
+ <dt class="tag-description">Description:</dt>
1447
+ <dd class="tag-description"><ul class="dummy"><li>Toggles a playlists public/private state</li></ul></dd>
1448
+
1449
+
1450
+
1451
+ <dt class="tag-source">Source:</dt>
1452
+ <dd class="tag-source"><ul class="dummy"><li>
1453
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line193">line 193</a>
1454
+ </li></ul></dd>
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+ </dl>
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+ <h5 class="h5-examples">Example</h5>
1499
+
1500
+ <pre class="prettyprint"><code>togglePlaylistPrivate(11541, true)
1501
+ .then(response => console.log(response))
1502
+ .catch(error => console.error('Error creating playlist:', error));</code></pre>
1503
+
1504
+
1505
+
1506
+
1507
+ <h5 class="h5-parameters">Parameters:</h5>
1508
+
1509
+
1510
+ <table class="params">
1511
+ <thead>
1512
+ <tr>
1513
+
1514
+ <th>Name</th>
1515
+
1516
+
1517
+ <th>Type</th>
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+ <th class="last">Description</th>
1524
+ </tr>
1525
+ </thead>
1526
+
1527
+ <tbody>
1528
+
1529
+
1530
+ <tr>
1531
+
1532
+ <td class="name"><code>playlistId</code></td>
1533
+
1534
+
1535
+ <td class="type">
1536
+
1537
+
1538
+ <span class="param-type">string</span>
1539
+ |
1540
+
1541
+ <span class="param-type">number</span>
1542
+
1543
+
1544
+
1545
+
1546
+ </td>
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+ <td class="description last"></td>
1553
+ </tr>
1554
+
1555
+
1556
+
1557
+ <tr>
1558
+
1559
+ <td class="name"><code>is_private</code></td>
1560
+
1561
+
1562
+ <td class="type">
1563
+
1564
+
1565
+ <span class="param-type">Boolean</span>
1566
+
1567
+
1568
+
1569
+
1570
+ </td>
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+ <td class="description last">flag for private/public</td>
1577
+ </tr>
1578
+
1579
+
1580
+ </tbody>
1581
+ </table>
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+ <h5 class="h5-returns">Returns:</h5>
1599
+
1600
+
1601
+ <div class="param-desc">
1602
+ - A promise that resolves to the updated playlist data if successful, or an error response if validation fails.
1603
+ </div>
1604
+
1605
+
1606
+
1607
+ <dl class="param-type">
1608
+ <dt>
1609
+ Type
1610
+ </dt>
1611
+ <dd>
1612
+
1613
+ <span class="param-type">Promise.&lt;<a href="global.html#Playlist">Playlist</a>></span>
1614
+
1615
+
1616
+
1617
+ </dd>
1618
+ </dl>
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+ <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>
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+ <dl class="details">
1637
+
1638
+ <dt class="tag-description">Description:</dt>
1639
+ <dd class="tag-description"><ul class="dummy"><li>Updates a playlists values</li></ul></dd>
1640
+
1641
+
1642
+
1643
+ <dt class="tag-source">Source:</dt>
1644
+ <dd class="tag-source"><ul class="dummy"><li>
1645
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line221">line 221</a>
1646
+ </li></ul></dd>
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+
1660
+
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+ </dl>
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+ <h5 class="h5-examples">Example</h5>
1691
+
1692
+ <pre class="prettyprint"><code>updatePlaylist(661113 { name: "My Playlist", description: "A cool playlist", is_private: true, deleted_items : [2189832, 221091] })
1693
+ .then(response => console.log(response.playlist); console.log(response.lessons))
1694
+ .catch(error => console.error('Error updating playlist:', error));</code></pre>
1695
+
1696
+
1697
+
1698
+
1699
+ <h5 class="h5-parameters">Parameters:</h5>
1700
+
1701
+
1702
+ <table class="params">
1703
+ <thead>
1704
+ <tr>
1705
+
1706
+ <th>Name</th>
1707
+
1708
+
1709
+ <th>Type</th>
1710
+
1711
+
1712
+
1713
+
1714
+
1715
+ <th class="last">Description</th>
1716
+ </tr>
1717
+ </thead>
1718
+
1719
+ <tbody>
1720
+
1721
+
1722
+ <tr>
1723
+
1724
+ <td class="name"><code>playlistId</code></td>
1725
+
1726
+
1727
+ <td class="type">
1728
+
1729
+
1730
+ <span class="param-type">string</span>
1731
+ |
1732
+
1733
+ <span class="param-type">number</span>
1734
+
1735
+
1736
+
1737
+
1738
+ </td>
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+ <td class="description last"></td>
1745
+ </tr>
1746
+
1747
+
1748
+
1749
+ <tr>
1750
+
1751
+ <td class="name"><code>updateData</code></td>
1752
+
1753
+
1754
+ <td class="type">
1755
+
1756
+
1757
+ <span class="param-type">Object</span>
1758
+
1759
+
1760
+
1761
+
1762
+ </td>
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+ <td class="description last">An object containing fields to update on the playlist:
1769
+ - `name` (string): The name of the new playlist (required, max 255 characters).
1770
+ - `description` (string): A description of the playlist (optional, max 1000 characters).
1771
+ - `category` (string): The category of the playlist.
1772
+ + * - `deleted_items` (array): List of playlist item IDs to delete.
1773
+ + * - `item_order` (array): Updated order of playlist items (ids, not railcontent_ids).</td>
1774
+ </tr>
1775
+
1776
+
1777
+ </tbody>
1778
+ </table>
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+ <h5 class="h5-returns">Returns:</h5>
1796
+
1797
+
1798
+ <div class="param-desc">
1799
+ - A promise that resolves to the created playlist data and lessons if successful, or an error response if validation fails.
1800
+
1801
+ The server response includes:
1802
+ - `playlist`: Playlist metadata (same as fetchPlaylist)
1803
+ - `lessons`: Updated list of plalyist lessons (same as fetchPlaylistItems)
1804
+ </div>
1805
+
1806
+
1807
+
1808
+ <dl class="param-type">
1809
+ <dt>
1810
+ Type
1811
+ </dt>
1812
+ <dd>
1813
+
1814
+ <span class="param-type">Promise.&lt;object></span>
1815
+
1816
+
1817
+
1818
+ </dd>
1819
+ </dl>
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+ <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>
1831
+
1832
+
1833
+
1834
+
1835
+
1836
+
1837
+ <dl class="details">
1838
+
1839
+ <dt class="tag-description">Description:</dt>
1840
+ <dd class="tag-description"><ul class="dummy"><li>Likes a playlist for the current user.</li></ul></dd>
1841
+
1842
+
1843
+
1844
+ <dt class="tag-source">Source:</dt>
1845
+ <dd class="tag-source"><ul class="dummy"><li>
1846
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line73">line 73</a>
1847
+ </li></ul></dd>
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+ </dl>
1880
+
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+
1890
+
1891
+ <h5 class="h5-examples">Example</h5>
1892
+
1893
+ <pre class="prettyprint"><code>// Like playlist with ID '123'
1894
+ try {
1895
+ const response = await likePlaylist('123');
1896
+ console.log('Playlist liked successfully:', response);
1897
+ } catch (error) {
1898
+ console.error('Failed to like playlist:', error);
1899
+ }</code></pre>
1900
+
1901
+
1902
+
1903
+
1904
+ <h5 class="h5-parameters">Parameters:</h5>
1905
+
1906
+
1907
+ <table class="params">
1908
+ <thead>
1909
+ <tr>
1910
+
1911
+ <th>Name</th>
1912
+
1913
+
1914
+ <th>Type</th>
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+ <th class="last">Description</th>
1921
+ </tr>
1922
+ </thead>
1923
+
1924
+ <tbody>
1925
+
1926
+
1927
+ <tr>
1928
+
1929
+ <td class="name"><code>playlistId</code></td>
1930
+
1931
+
1932
+ <td class="type">
1933
+
1934
+
1935
+ <span class="param-type">string</span>
1936
+ |
1937
+
1938
+ <span class="param-type">number</span>
1939
+
1940
+
1941
+
1942
+
1943
+ </td>
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+ <td class="description last">The unique identifier of the playlist to like.</td>
1950
+ </tr>
1951
+
1952
+
1953
+ </tbody>
1954
+ </table>
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+ <h5 class="h5-returns">Returns:</h5>
1972
+
1973
+
1974
+
1975
+
1976
+ <dl class="param-type">
1977
+ <dt>
1978
+ Type
1979
+ </dt>
1980
+ <dd>
1981
+
1982
+ <span class="param-type">Promise.&lt;Object></span>
1983
+
1984
+
1985
+
1986
+ </dd>
1987
+ </dl>
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+
1998
+ <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>
1999
+
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+ <dl class="details">
2006
+
2007
+ <dt class="tag-description">Description:</dt>
2008
+ <dd class="tag-description"><ul class="dummy"><li>Reports a playlist</li></ul></dd>
2009
+
2010
+
2011
+
2012
+ <dt class="tag-source">Source:</dt>
2013
+ <dd class="tag-source"><ul class="dummy"><li>
2014
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line119">line 119</a>
2015
+ </li></ul></dd>
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+
2038
+
2039
+
2040
+
2041
+
2042
+
2043
+
2044
+
2045
+
2046
+
2047
+ </dl>
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+ <h5 class="h5-examples">Example</h5>
2060
+
2061
+ <pre class="prettyprint"><code>// Report playlist with ID '123'
2062
+ try {
2063
+ const response = await reportPlaylist('123');
2064
+ console.log('Playlist reported successfully:', response);
2065
+ } catch (error) {
2066
+ console.error('Failed to report playlist:', error);
2067
+ }</code></pre>
2068
+
2069
+
2070
+
2071
+
2072
+ <h5 class="h5-parameters">Parameters:</h5>
2073
+
2074
+
2075
+ <table class="params">
2076
+ <thead>
2077
+ <tr>
2078
+
2079
+ <th>Name</th>
2080
+
2081
+
2082
+ <th>Type</th>
2083
+
2084
+
2085
+
2086
+
2087
+
2088
+ <th class="last">Description</th>
2089
+ </tr>
2090
+ </thead>
2091
+
2092
+ <tbody>
2093
+
2094
+
2095
+ <tr>
2096
+
2097
+ <td class="name"><code>playlistId</code></td>
2098
+
2099
+
2100
+ <td class="type">
2101
+
2102
+
2103
+ <span class="param-type">string</span>
2104
+ |
2105
+
2106
+ <span class="param-type">number</span>
2107
+
2108
+
2109
+
2110
+
2111
+ </td>
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+ <td class="description last">The unique identifier of the playlist to report.</td>
2118
+ </tr>
2119
+
2120
+
2121
+ </tbody>
2122
+ </table>
2123
+
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+ <h5 class="h5-returns">Returns:</h5>
2140
+
2141
+
2142
+
2143
+
2144
+ <dl class="param-type">
2145
+ <dt>
2146
+ Type
2147
+ </dt>
2148
+ <dd>
2149
+
2150
+ <span class="param-type">Promise.&lt;Object></span>
2151
+
2152
+
2153
+
2154
+ </dd>
2155
+ </dl>
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+
2166
+ <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>
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+ <dl class="details">
2174
+
2175
+ <dt class="tag-description">Description:</dt>
2176
+ <dd class="tag-description"><ul class="dummy"><li>Delete Items from playlist</li></ul></dd>
2177
+
2178
+
2179
+
2180
+ <dt class="tag-source">Source:</dt>
2181
+ <dd class="tag-source"><ul class="dummy"><li>
2182
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line238">line 238</a>
2183
+ </li></ul></dd>
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+
2200
+
2201
+
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+
2208
+
2209
+
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+ </dl>
2216
+
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+ <h5 class="h5-examples">Example</h5>
2228
+
2229
+ <pre class="prettyprint"><code>// Delete items 8462221 and 8462222 from playlist 81111
2230
+ try {
2231
+ const response = await deleteItemsFromPlaylist(81111, [8462221, 8462222]);
2232
+ } catch (error) {
2233
+ console.error('Failed to delete playlist items:', error);
2234
+ }</code></pre>
2235
+
2236
+
2237
+
2238
+
2239
+ <h5 class="h5-parameters">Parameters:</h5>
2240
+
2241
+
2242
+ <table class="params">
2243
+ <thead>
2244
+ <tr>
2245
+
2246
+ <th>Name</th>
2247
+
2248
+
2249
+ <th>Type</th>
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+ <th class="last">Description</th>
2256
+ </tr>
2257
+ </thead>
2258
+
2259
+ <tbody>
2260
+
2261
+
2262
+ <tr>
2263
+
2264
+ <td class="name"><code>playlistId</code></td>
2265
+
2266
+
2267
+ <td class="type">
2268
+
2269
+
2270
+ <span class="param-type">string</span>
2271
+ |
2272
+
2273
+ <span class="param-type">number</span>
2274
+
2275
+
2276
+
2277
+
2278
+ </td>
2279
+
2280
+
2281
+
2282
+
2283
+
2284
+ <td class="description last">The unique identifier of the playlist to update.</td>
2285
+ </tr>
2286
+
2287
+
2288
+
2289
+ <tr>
2290
+
2291
+ <td class="name"><code>deleted_items</code></td>
2292
+
2293
+
2294
+ <td class="type">
2295
+
2296
+
2297
+ <span class="param-type">array</span>
2298
+
2299
+
2300
+
2301
+
2302
+ </td>
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+ <td class="description last">list of playlist ids to delete (user_playlist_item_id, not the railcontent_id)</td>
2309
+ </tr>
2310
+
2311
+
2312
+ </tbody>
2313
+ </table>
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+ <h5 class="h5-returns">Returns:</h5>
2331
+
2332
+
2333
+
2334
+
2335
+ <dl class="param-type">
2336
+ <dt>
2337
+ Type
2338
+ </dt>
2339
+ <dd>
2340
+
2341
+ <span class="param-type">Promise.&lt;Object></span>
2342
+
2343
+
2344
+
2345
+ </dd>
2346
+ </dl>
2347
+
2348
+
2349
+
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+
2356
+
2357
+ <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>
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+
2364
+ <dl class="details">
2365
+
2366
+ <dt class="tag-description">Description:</dt>
2367
+ <dd class="tag-description"><ul class="dummy"><li>Unlikes a previously liked playlist.</li></ul></dd>
2368
+
2369
+
2370
+
2371
+ <dt class="tag-source">Source:</dt>
2372
+ <dd class="tag-source"><ul class="dummy"><li>
2373
+ <a href="content-org_playlists.js.html">content-org/playlists.js</a>, <a href="content-org_playlists.js.html#line96">line 96</a>
2374
+ </li></ul></dd>
2375
+
2376
+
2377
+
2378
+
2379
+
2380
+
2381
+
2382
+
2383
+
2384
+
2385
+
2386
+
2387
+
2388
+
2389
+
2390
+
2391
+
2392
+
2393
+
2394
+
2395
+
2396
+
2397
+
2398
+
2399
+
2400
+
2401
+
2402
+
2403
+
2404
+
2405
+
2406
+ </dl>
2407
+
2408
+
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+
2415
+
2416
+
2417
+
2418
+ <h5 class="h5-examples">Example</h5>
2419
+
2420
+ <pre class="prettyprint"><code>// Unlike playlist with ID '123'
2421
+ try {
2422
+ const response = await unlikePlaylist('123');
2423
+ console.log('Playlist unliked successfully:', response);
2424
+ } catch (error) {
2425
+ console.error('Failed to unlike playlist:', error);
2426
+ }</code></pre>
2427
+
2428
+
2429
+
2430
+
2431
+ <h5 class="h5-parameters">Parameters:</h5>
2432
+
2433
+
2434
+ <table class="params">
2435
+ <thead>
2436
+ <tr>
2437
+
2438
+ <th>Name</th>
2439
+
2440
+
2441
+ <th>Type</th>
2442
+
2443
+
2444
+
2445
+
2446
+
2447
+ <th class="last">Description</th>
2448
+ </tr>
2449
+ </thead>
2450
+
2451
+ <tbody>
2452
+
2453
+
2454
+ <tr>
2455
+
2456
+ <td class="name"><code>playlistId</code></td>
2457
+
2458
+
2459
+ <td class="type">
2460
+
2461
+
2462
+ <span class="param-type">string</span>
2463
+ |
2464
+
2465
+ <span class="param-type">number</span>
2466
+
2467
+
2468
+
2469
+
2470
+ </td>
2471
+
2472
+
2473
+
2474
+
2475
+
2476
+ <td class="description last">The unique identifier of the playlist to unlike.</td>
2477
+ </tr>
2478
+
2479
+
2480
+ </tbody>
2481
+ </table>
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+
2492
+
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+ <h5 class="h5-returns">Returns:</h5>
2499
+
2500
+
2501
+
2502
+
2503
+ <dl class="param-type">
2504
+ <dt>
2505
+ Type
2506
+ </dt>
2507
+ <dd>
2508
+
2509
+ <span class="param-type">Promise.&lt;Object></span>
929
2510
 
930
2511
 
931
2512
 
@@ -956,7 +2537,7 @@ Allows optional pagination, sorting, and search parameters to control the result
956
2537
  <br class="clear">
957
2538
 
958
2539
  <footer>
959
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Apr 11 2025 17:26:43 GMT+0300 (Eastern European Summer Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2540
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed May 14 2025 19:23:31 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
960
2541
  </footer>
961
2542
 
962
2543
  <script>prettyPrint();</script>