musora-content-services 1.0.150 → 1.0.152
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.
- package/.github/workflows/node.js.yml +0 -0
- package/CHANGELOG.md +4 -0
- package/README.md +0 -0
- package/babel.config.js +0 -0
- package/docs/config.js.html +2 -2
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +2 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Railcontent-Services.html +567 -13
- package/docs/module-Sanity-Services.html +2 -2
- package/docs/railcontent.js.html +68 -3
- package/docs/sanity.js.html +2 -2
- package/docs/scripts/collapse.js +0 -0
- package/docs/scripts/commonNav.js +0 -0
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/nav.js +0 -0
- package/docs/scripts/polyfill.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/styles/jsdoc.css +0 -0
- package/docs/styles/prettify.css +0 -0
- package/jest.config.js +0 -0
- package/jsdoc.json +0 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +8 -0
- package/src/services/config.js +0 -0
- package/src/services/railcontent.js +163 -6
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/tools/generate-index.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-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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.createPlaylist">createPlaylist</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchPlaylist">fetchPlaylist</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#.fetchUserPlaylists">fetchUserPlaylists</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#.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#.fetchAllSongs">fetchAllSongs</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#.fetchCatalogMetadata">fetchCatalogMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChallengeOverview">fetchChallengeOverview</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchCourseOverview">fetchCourseOverview</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#.fetchLessonContent">fetchLessonContent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchParentByRailContentId">fetchParentByRailContentId</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#.fetchRelatedMethodLessons">fetchRelatedMethodLessons</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.createPlaylist">createPlaylist</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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.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#.fetchUserPlaylists">fetchUserPlaylists</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#.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#.fetchAllSongs">fetchAllSongs</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#.fetchCatalogMetadata">fetchCatalogMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChallengeOverview">fetchChallengeOverview</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchCourseOverview">fetchCourseOverview</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#.fetchLessonContent">fetchLessonContent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchParentByRailContentId">fetchParentByRailContentId</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#.fetchRelatedMethodLessons">fetchRelatedMethodLessons</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -523,6 +523,268 @@ If the user is unauthorized or the playlist does not exist, the promise rejects
|
|
|
523
523
|
|
|
524
524
|
|
|
525
525
|
|
|
526
|
+
<h4 class="name" id=".deletePlaylistItem"><span class="type-signature type-signature-static">(static) </span>deletePlaylistItem<span class="signature">(payload)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
<dl class="details">
|
|
534
|
+
|
|
535
|
+
<dt class="tag-description">Description:</dt>
|
|
536
|
+
<dd class="tag-description"><ul class="dummy"><li>Deletes a playlist item and repositions other items in the playlist if necessary.</li></ul></dd>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
<dt class="tag-source">Source:</dt>
|
|
541
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
542
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line660">line 660</a>
|
|
543
|
+
</li></ul></dd>
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
</dl>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
<h5 class="h5-examples">Example</h5>
|
|
588
|
+
|
|
589
|
+
<pre class="prettyprint"><code>const payload = {
|
|
590
|
+
user_playlist_item_id: 123
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
deletePlaylistItem(payload)
|
|
594
|
+
.then(response => {
|
|
595
|
+
if (response.success) {
|
|
596
|
+
console.log("Playlist item deleted successfully:", response.message);
|
|
597
|
+
} else {
|
|
598
|
+
console.error("Error:", response.error);
|
|
599
|
+
}
|
|
600
|
+
})
|
|
601
|
+
.catch(error => {
|
|
602
|
+
console.error("Error deleting playlist item:", error);
|
|
603
|
+
});</code></pre>
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
<table class="params">
|
|
612
|
+
<thead>
|
|
613
|
+
<tr>
|
|
614
|
+
|
|
615
|
+
<th>Name</th>
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
<th>Type</th>
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
<th class="last">Description</th>
|
|
625
|
+
</tr>
|
|
626
|
+
</thead>
|
|
627
|
+
|
|
628
|
+
<tbody>
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
<tr>
|
|
632
|
+
|
|
633
|
+
<td class="name"><code>payload</code></td>
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
<td class="type">
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
<span class="param-type">Object</span>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
</td>
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
<td class="description last">The data required to delete the playlist item.
|
|
651
|
+
<h6>Properties</h6>
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
<table class="params">
|
|
655
|
+
<thead>
|
|
656
|
+
<tr>
|
|
657
|
+
|
|
658
|
+
<th>Name</th>
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
<th>Type</th>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
<th class="last">Description</th>
|
|
668
|
+
</tr>
|
|
669
|
+
</thead>
|
|
670
|
+
|
|
671
|
+
<tbody>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
<tr>
|
|
675
|
+
|
|
676
|
+
<td class="name"><code>user_playlist_item_id</code></td>
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
<td class="type">
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
<span class="param-type">number</span>
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
</td>
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
<td class="description last">The ID of the playlist item to delete.</td>
|
|
694
|
+
</tr>
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
</tbody>
|
|
698
|
+
</table>
|
|
699
|
+
|
|
700
|
+
</td>
|
|
701
|
+
</tr>
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
</tbody>
|
|
705
|
+
</table>
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
<h5 class="h5-throws">Throws:</h5>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
<dl>
|
|
725
|
+
<dt>
|
|
726
|
+
<div class="param-desc usertext">
|
|
727
|
+
- Throws an error if the request fails.
|
|
728
|
+
</div>
|
|
729
|
+
</dt>
|
|
730
|
+
<dd></dd>
|
|
731
|
+
<dt>
|
|
732
|
+
<dl class="param-type">
|
|
733
|
+
<dt>
|
|
734
|
+
Type
|
|
735
|
+
</dt>
|
|
736
|
+
<dd>
|
|
737
|
+
|
|
738
|
+
<span class="param-type">Error</span>
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
</dd>
|
|
743
|
+
</dl>
|
|
744
|
+
</dt>
|
|
745
|
+
<dd></dd>
|
|
746
|
+
</dl>
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
<div class="param-desc">
|
|
756
|
+
- A promise that resolves to an object containing:
|
|
757
|
+
- `success` (boolean): Indicates if the deletion was successful (`true` for success).
|
|
758
|
+
- `message` (string): A success message if the item is deleted successfully.
|
|
759
|
+
- `error` (string): An error message if the deletion fails.
|
|
760
|
+
|
|
761
|
+
Resolves to `null` if the request fails.
|
|
762
|
+
</div>
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
<dl class="param-type">
|
|
767
|
+
<dt>
|
|
768
|
+
Type
|
|
769
|
+
</dt>
|
|
770
|
+
<dd>
|
|
771
|
+
|
|
772
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
</dd>
|
|
777
|
+
</dl>
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
526
788
|
<h4 class="name" id=".deletePlaylistLike"><span class="type-signature type-signature-static">(static) </span>deletePlaylistLike<span class="signature">(playlistId)</span><span class="type-signature"> → {Promise.<Object>}</span></h4>
|
|
527
789
|
|
|
528
790
|
|
|
@@ -2348,7 +2610,7 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
2348
2610
|
|
|
2349
2611
|
|
|
2350
2612
|
|
|
2351
|
-
<h4 class="name" id=".
|
|
2613
|
+
<h4 class="name" id=".fetchPlaylistItem"><span class="type-signature type-signature-static">(static) </span>fetchPlaylistItem<span class="signature">(payload)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
2352
2614
|
|
|
2353
2615
|
|
|
2354
2616
|
|
|
@@ -2358,16 +2620,13 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
2358
2620
|
<dl class="details">
|
|
2359
2621
|
|
|
2360
2622
|
<dt class="tag-description">Description:</dt>
|
|
2361
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
2362
|
-
|
|
2363
|
-
This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
|
|
2364
|
-
The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
|
|
2623
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches detailed data for a specific playlist item, including associated Sanity and Assignment information if available.</li></ul></dd>
|
|
2365
2624
|
|
|
2366
2625
|
|
|
2367
2626
|
|
|
2368
2627
|
<dt class="tag-source">Source:</dt>
|
|
2369
2628
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2370
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2629
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line690">line 690</a>
|
|
2371
2630
|
</li></ul></dd>
|
|
2372
2631
|
|
|
2373
2632
|
|
|
@@ -2414,9 +2673,269 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
2414
2673
|
|
|
2415
2674
|
<h5 class="h5-examples">Example</h5>
|
|
2416
2675
|
|
|
2417
|
-
<pre class="prettyprint"><code>
|
|
2418
|
-
|
|
2419
|
-
|
|
2676
|
+
<pre class="prettyprint"><code>const payload = { user_playlist_item_id: 123 };
|
|
2677
|
+
|
|
2678
|
+
fetchPlaylistItem(payload)
|
|
2679
|
+
.then(response => {
|
|
2680
|
+
if (response.success) {
|
|
2681
|
+
console.log("Fetched playlist item data:", response.data);
|
|
2682
|
+
}
|
|
2683
|
+
})
|
|
2684
|
+
.catch(error => {
|
|
2685
|
+
console.error("Error fetching playlist item:", error);
|
|
2686
|
+
});</code></pre>
|
|
2687
|
+
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
|
|
2691
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
2692
|
+
|
|
2693
|
+
|
|
2694
|
+
<table class="params">
|
|
2695
|
+
<thead>
|
|
2696
|
+
<tr>
|
|
2697
|
+
|
|
2698
|
+
<th>Name</th>
|
|
2699
|
+
|
|
2700
|
+
|
|
2701
|
+
<th>Type</th>
|
|
2702
|
+
|
|
2703
|
+
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
<th class="last">Description</th>
|
|
2708
|
+
</tr>
|
|
2709
|
+
</thead>
|
|
2710
|
+
|
|
2711
|
+
<tbody>
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
<tr>
|
|
2715
|
+
|
|
2716
|
+
<td class="name"><code>payload</code></td>
|
|
2717
|
+
|
|
2718
|
+
|
|
2719
|
+
<td class="type">
|
|
2720
|
+
|
|
2721
|
+
|
|
2722
|
+
<span class="param-type">Object</span>
|
|
2723
|
+
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
</td>
|
|
2728
|
+
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
<td class="description last">The request payload containing necessary parameters.
|
|
2734
|
+
<h6>Properties</h6>
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
<table class="params">
|
|
2738
|
+
<thead>
|
|
2739
|
+
<tr>
|
|
2740
|
+
|
|
2741
|
+
<th>Name</th>
|
|
2742
|
+
|
|
2743
|
+
|
|
2744
|
+
<th>Type</th>
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
|
|
2750
|
+
<th class="last">Description</th>
|
|
2751
|
+
</tr>
|
|
2752
|
+
</thead>
|
|
2753
|
+
|
|
2754
|
+
<tbody>
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
<tr>
|
|
2758
|
+
|
|
2759
|
+
<td class="name"><code>user_playlist_item_id</code></td>
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
<td class="type">
|
|
2763
|
+
|
|
2764
|
+
|
|
2765
|
+
<span class="param-type">number</span>
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
</td>
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
<td class="description last">The ID of the playlist item to fetch.</td>
|
|
2777
|
+
</tr>
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
</tbody>
|
|
2781
|
+
</table>
|
|
2782
|
+
|
|
2783
|
+
</td>
|
|
2784
|
+
</tr>
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
</tbody>
|
|
2788
|
+
</table>
|
|
2789
|
+
|
|
2790
|
+
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
|
|
2794
|
+
|
|
2795
|
+
|
|
2796
|
+
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
|
|
2803
|
+
<h5 class="h5-throws">Throws:</h5>
|
|
2804
|
+
|
|
2805
|
+
|
|
2806
|
+
|
|
2807
|
+
<dl>
|
|
2808
|
+
<dt>
|
|
2809
|
+
<div class="param-desc usertext">
|
|
2810
|
+
- Throws an error if the request fails.
|
|
2811
|
+
</div>
|
|
2812
|
+
</dt>
|
|
2813
|
+
<dd></dd>
|
|
2814
|
+
<dt>
|
|
2815
|
+
<dl class="param-type">
|
|
2816
|
+
<dt>
|
|
2817
|
+
Type
|
|
2818
|
+
</dt>
|
|
2819
|
+
<dd>
|
|
2820
|
+
|
|
2821
|
+
<span class="param-type">Error</span>
|
|
2822
|
+
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
</dd>
|
|
2826
|
+
</dl>
|
|
2827
|
+
</dt>
|
|
2828
|
+
<dd></dd>
|
|
2829
|
+
</dl>
|
|
2830
|
+
|
|
2831
|
+
|
|
2832
|
+
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2836
|
+
|
|
2837
|
+
|
|
2838
|
+
<div class="param-desc">
|
|
2839
|
+
- A promise that resolves to an object containing the playlist item data, including:
|
|
2840
|
+
- `success` (boolean): Indicates if the retrieval was successful (`true` for success).
|
|
2841
|
+
- `data` (Object): The playlist item data enriched with Sanity and Assignment details.
|
|
2842
|
+
|
|
2843
|
+
Resolves to `null` if the request fails.
|
|
2844
|
+
</div>
|
|
2845
|
+
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
<dl class="param-type">
|
|
2849
|
+
<dt>
|
|
2850
|
+
Type
|
|
2851
|
+
</dt>
|
|
2852
|
+
<dd>
|
|
2853
|
+
|
|
2854
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
</dd>
|
|
2859
|
+
</dl>
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
<h4 class="name" id=".fetchPlaylistItems"><span class="type-signature type-signature-static">(static) </span>fetchPlaylistItems<span class="signature">(playlistId)</span><span class="type-signature"> → {Promise.<Array.<Object>>}</span></h4>
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
<dl class="details">
|
|
2878
|
+
|
|
2879
|
+
<dt class="tag-description">Description:</dt>
|
|
2880
|
+
<dd class="tag-description"><ul class="dummy"><li>Retrieves items within a specified playlist by playlist ID.
|
|
2881
|
+
|
|
2882
|
+
This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
|
|
2883
|
+
The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
<dt class="tag-source">Source:</dt>
|
|
2888
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
2889
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line585">line 585</a>
|
|
2890
|
+
</li></ul></dd>
|
|
2891
|
+
|
|
2892
|
+
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
</dl>
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
<h5 class="h5-examples">Example</h5>
|
|
2935
|
+
|
|
2936
|
+
<pre class="prettyprint"><code>fetchPlaylistItems(12345)
|
|
2937
|
+
.then(items => console.log(items))
|
|
2938
|
+
.catch(error => console.error('Error fetching playlist items:', error));</code></pre>
|
|
2420
2939
|
|
|
2421
2940
|
|
|
2422
2941
|
|
|
@@ -3434,7 +3953,7 @@ If the user is unauthorized or the data validation fails, the promise rejects wi
|
|
|
3434
3953
|
|
|
3435
3954
|
<dt class="tag-source">Source:</dt>
|
|
3436
3955
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3437
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
3956
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line625">line 625</a>
|
|
3438
3957
|
</li></ul></dd>
|
|
3439
3958
|
|
|
3440
3959
|
|
|
@@ -3485,7 +4004,8 @@ If the user is unauthorized or the data validation fails, the promise rejects wi
|
|
|
3485
4004
|
user_playlist_item_id: 123,
|
|
3486
4005
|
start_second: 30,
|
|
3487
4006
|
end_second: 120,
|
|
3488
|
-
playlist_item_name: "Updated Playlist Item Name"
|
|
4007
|
+
playlist_item_name: "Updated Playlist Item Name",
|
|
4008
|
+
position: 2
|
|
3489
4009
|
};
|
|
3490
4010
|
|
|
3491
4011
|
updatePlaylistItem(updatedData)
|
|
@@ -3702,6 +4222,40 @@ updatePlaylistItem(updatedData)
|
|
|
3702
4222
|
</tr>
|
|
3703
4223
|
|
|
3704
4224
|
|
|
4225
|
+
|
|
4226
|
+
<tr>
|
|
4227
|
+
|
|
4228
|
+
<td class="name"><code>position</code></td>
|
|
4229
|
+
|
|
4230
|
+
|
|
4231
|
+
<td class="type">
|
|
4232
|
+
|
|
4233
|
+
|
|
4234
|
+
<span class="param-type">number</span>
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
|
|
4239
|
+
</td>
|
|
4240
|
+
|
|
4241
|
+
|
|
4242
|
+
<td class="attributes">
|
|
4243
|
+
|
|
4244
|
+
<optional><br>
|
|
4245
|
+
|
|
4246
|
+
|
|
4247
|
+
|
|
4248
|
+
|
|
4249
|
+
|
|
4250
|
+
</td>
|
|
4251
|
+
|
|
4252
|
+
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
<td class="description last">(Optional) The new position for the playlist item within the playlist.</td>
|
|
4256
|
+
</tr>
|
|
4257
|
+
|
|
4258
|
+
|
|
3705
4259
|
</tbody>
|
|
3706
4260
|
</table>
|
|
3707
4261
|
|
|
@@ -3807,7 +4361,7 @@ Resolves to `null` if the request fails.
|
|
|
3807
4361
|
<br class="clear">
|
|
3808
4362
|
|
|
3809
4363
|
<footer>
|
|
3810
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
4364
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Nov 01 2024 14:03:54 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
3811
4365
|
</footer>
|
|
3812
4366
|
|
|
3813
4367
|
<script>prettyPrint();</script>
|