musora-content-services 1.0.206 → 1.0.208
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/CHANGELOG.md +4 -0
- package/docs/config.js.html +2 -2
- package/docs/index.html +2 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Railcontent-Services.html +1703 -866
- package/docs/module-Sanity-Services.html +682 -48
- package/docs/railcontent.js.html +88 -7
- package/docs/sanity.js.html +217 -36
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +1 -2
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/services/contentProgress.js +0 -0
- package/src/services/dataContext.js +0 -0
- package/src/services/railcontent.js +13 -0
- package/src/services/sanity.js +1 -1
- package/test/contentProgress.test.js +0 -0
- package/test/live/contentProgressLive.test.js +0 -0
- package/test/live/railcontentLive.test.js +0 -0
- package/test/sanityQueryService.test.js +7 -6
|
@@ -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#.addItemToPlaylist">addItemToPlaylist</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#.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#.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#.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#.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#.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#.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#.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#.postChallengesCompleteLesson">postChallengesCompleteLesson</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#.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#.postChallengesUnlock">postChallengesUnlock</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#.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#.fetchAssignments">fetchAssignments</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#.fetchCommentModContentData">fetchCommentModContentData</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#.addItemToPlaylist">addItemToPlaylist</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#.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#.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#.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#.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#.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#.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#.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#.postChallengesCompleteLesson">postChallengesCompleteLesson</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#.postChallengesUnlock">postChallengesUnlock</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#.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#.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#.fetchAssignments">fetchAssignments</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#.fetchCommentModContentData">fetchCommentModContentData</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><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
|
|
95
95
|
<dt class="tag-source">Source:</dt>
|
|
96
96
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
97
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
97
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line13">line 13</a>
|
|
98
98
|
</li></ul></dd>
|
|
99
99
|
|
|
100
100
|
|
|
@@ -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="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
185
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line962">line 962</a>
|
|
186
186
|
</li></ul></dd>
|
|
187
187
|
|
|
188
188
|
|
|
@@ -699,7 +699,7 @@ Resolves to `null` if the request fails.
|
|
|
699
699
|
|
|
700
700
|
<dt class="tag-source">Source:</dt>
|
|
701
701
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
702
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
702
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line992">line 992</a>
|
|
703
703
|
</li></ul></dd>
|
|
704
704
|
|
|
705
705
|
|
|
@@ -880,7 +880,7 @@ the new playlist with the authenticated user. The `name` field is required, whil
|
|
|
880
880
|
|
|
881
881
|
<dt class="tag-source">Source:</dt>
|
|
882
882
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
883
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
883
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line696">line 696</a>
|
|
884
884
|
</li></ul></dd>
|
|
885
885
|
|
|
886
886
|
|
|
@@ -1058,7 +1058,7 @@ If the user is authorized, it deletes both the playlist and its associated items
|
|
|
1058
1058
|
|
|
1059
1059
|
<dt class="tag-source">Source:</dt>
|
|
1060
1060
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1061
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
1061
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line631">line 631</a>
|
|
1062
1062
|
</li></ul></dd>
|
|
1063
1063
|
|
|
1064
1064
|
|
|
@@ -1234,7 +1234,7 @@ If the user is unauthorized or the playlist does not exist, the promise rejects
|
|
|
1234
1234
|
|
|
1235
1235
|
<dt class="tag-source">Source:</dt>
|
|
1236
1236
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1237
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
1237
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line874">line 874</a>
|
|
1238
1238
|
</li></ul></dd>
|
|
1239
1239
|
|
|
1240
1240
|
|
|
@@ -1499,7 +1499,7 @@ and checks if a like by the authenticated user already exists for the specified
|
|
|
1499
1499
|
|
|
1500
1500
|
<dt class="tag-source">Source:</dt>
|
|
1501
1501
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1502
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
1502
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line756">line 756</a>
|
|
1503
1503
|
</li></ul></dd>
|
|
1504
1504
|
|
|
1505
1505
|
|
|
@@ -1677,7 +1677,7 @@ to customize the duplicated playlist. If a new name is not provided, the server
|
|
|
1677
1677
|
|
|
1678
1678
|
<dt class="tag-source">Source:</dt>
|
|
1679
1679
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1680
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
1680
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line603">line 603</a>
|
|
1681
1681
|
</li></ul></dd>
|
|
1682
1682
|
|
|
1683
1683
|
|
|
@@ -2060,7 +2060,7 @@ The duplicated playlist contains:
|
|
|
2060
2060
|
|
|
2061
2061
|
<dt class="tag-source">Source:</dt>
|
|
2062
2062
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2063
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2063
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line70">line 70</a>
|
|
2064
2064
|
</li></ul></dd>
|
|
2065
2065
|
|
|
2066
2066
|
|
|
@@ -2209,6 +2209,110 @@ The duplicated playlist contains:
|
|
|
2209
2209
|
|
|
2210
2210
|
|
|
2211
2211
|
|
|
2212
|
+
<h4 class="name" id=".fetchCarouselCardData"><span class="type-signature type-signature-static">(static) </span>fetchCarouselCardData<span class="signature">()</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
<dl class="details">
|
|
2220
|
+
|
|
2221
|
+
<dt class="tag-description">Description:</dt>
|
|
2222
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch All Carousel Card Data</li></ul></dd>
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
<dt class="tag-source">Source:</dt>
|
|
2227
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
2228
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line434">line 434</a>
|
|
2229
|
+
</li></ul></dd>
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
</dl>
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
|
|
2285
|
+
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
<dl class="param-type">
|
|
2295
|
+
<dt>
|
|
2296
|
+
Type
|
|
2297
|
+
</dt>
|
|
2298
|
+
<dd>
|
|
2299
|
+
|
|
2300
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
</dd>
|
|
2305
|
+
</dl>
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
|
|
2315
|
+
|
|
2212
2316
|
<h4 class="name" id=".fetchChallengeIndexMetadata"><span class="type-signature type-signature-static">(static) </span>fetchChallengeIndexMetadata<span class="signature">(contentIds)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
2213
2317
|
|
|
2214
2318
|
|
|
@@ -2226,7 +2330,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2226
2330
|
|
|
2227
2331
|
<dt class="tag-source">Source:</dt>
|
|
2228
2332
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2229
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2333
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line399">line 399</a>
|
|
2230
2334
|
</li></ul></dd>
|
|
2231
2335
|
|
|
2232
2336
|
|
|
@@ -2380,7 +2484,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2380
2484
|
|
|
2381
2485
|
<dt class="tag-source">Source:</dt>
|
|
2382
2486
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2383
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2487
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line335">line 335</a>
|
|
2384
2488
|
</li></ul></dd>
|
|
2385
2489
|
|
|
2386
2490
|
|
|
@@ -2528,7 +2632,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2528
2632
|
|
|
2529
2633
|
<dt class="tag-source">Source:</dt>
|
|
2530
2634
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2531
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2635
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line324">line 324</a>
|
|
2532
2636
|
</li></ul></dd>
|
|
2533
2637
|
|
|
2534
2638
|
|
|
@@ -2676,7 +2780,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2676
2780
|
|
|
2677
2781
|
<dt class="tag-source">Source:</dt>
|
|
2678
2782
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2679
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2783
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line423">line 423</a>
|
|
2680
2784
|
</li></ul></dd>
|
|
2681
2785
|
|
|
2682
2786
|
|
|
@@ -2764,7 +2868,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2764
2868
|
|
|
2765
2869
|
|
|
2766
2870
|
|
|
2767
|
-
<h4 class="name" id=".
|
|
2871
|
+
<h4 class="name" id=".fetchCompletedChallenges"><span class="type-signature type-signature-static">(static) </span>fetchCompletedChallenges<span class="signature">(brand, page, limit)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
2768
2872
|
|
|
2769
2873
|
|
|
2770
2874
|
|
|
@@ -2774,13 +2878,13 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2774
2878
|
<dl class="details">
|
|
2775
2879
|
|
|
2776
2880
|
<dt class="tag-description">Description:</dt>
|
|
2777
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
2881
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch all completed brand challenges for user</li></ul></dd>
|
|
2778
2882
|
|
|
2779
2883
|
|
|
2780
2884
|
|
|
2781
2885
|
<dt class="tag-source">Source:</dt>
|
|
2782
2886
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2783
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
2887
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line362">line 362</a>
|
|
2784
2888
|
</li></ul></dd>
|
|
2785
2889
|
|
|
2786
2890
|
|
|
@@ -2825,13 +2929,6 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2825
2929
|
|
|
2826
2930
|
|
|
2827
2931
|
|
|
2828
|
-
<h5 class="h5-examples">Example</h5>
|
|
2829
|
-
|
|
2830
|
-
<pre class="prettyprint"><code>fetchCompletedContent('song', 'drumeo')
|
|
2831
|
-
.then(songs => console.log(songs))
|
|
2832
|
-
.catch(error => console.error(error));</code></pre>
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
2932
|
|
|
2836
2933
|
|
|
2837
2934
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -2847,12 +2944,8 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2847
2944
|
<th>Type</th>
|
|
2848
2945
|
|
|
2849
2946
|
|
|
2850
|
-
<th>Attributes</th>
|
|
2851
|
-
|
|
2852
2947
|
|
|
2853
2948
|
|
|
2854
|
-
<th>Default</th>
|
|
2855
|
-
|
|
2856
2949
|
|
|
2857
2950
|
<th class="last">Description</th>
|
|
2858
2951
|
</tr>
|
|
@@ -2861,42 +2954,6 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2861
2954
|
<tbody>
|
|
2862
2955
|
|
|
2863
2956
|
|
|
2864
|
-
<tr>
|
|
2865
|
-
|
|
2866
|
-
<td class="name"><code>type</code></td>
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
<td class="type">
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
<span class="param-type">string</span>
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
</td>
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
<td class="attributes">
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
</td>
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
<td class="default">
|
|
2891
|
-
|
|
2892
|
-
</td>
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
<td class="description last">The content type associated with the content.</td>
|
|
2896
|
-
</tr>
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
2957
|
<tr>
|
|
2901
2958
|
|
|
2902
2959
|
<td class="name"><code>brand</code></td>
|
|
@@ -2906,42 +2963,33 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2906
2963
|
|
|
2907
2964
|
|
|
2908
2965
|
<span class="param-type">string</span>
|
|
2966
|
+
|
|
|
2909
2967
|
|
|
2968
|
+
<span class="param-type">null</span>
|
|
2910
2969
|
|
|
2911
2970
|
|
|
2912
|
-
|
|
2913
|
-
</td>
|
|
2914
2971
|
|
|
2915
2972
|
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2973
|
+
</td>
|
|
2920
2974
|
|
|
2921
|
-
|
|
2922
|
-
</td>
|
|
2923
2975
|
|
|
2924
2976
|
|
|
2925
2977
|
|
|
2926
|
-
<td class="default">
|
|
2927
|
-
|
|
2928
|
-
</td>
|
|
2929
|
-
|
|
2930
2978
|
|
|
2931
|
-
<td class="description last">
|
|
2979
|
+
<td class="description last">brand</td>
|
|
2932
2980
|
</tr>
|
|
2933
2981
|
|
|
2934
2982
|
|
|
2935
2983
|
|
|
2936
2984
|
<tr>
|
|
2937
2985
|
|
|
2938
|
-
<td class="name"><code>
|
|
2986
|
+
<td class="name"><code>page</code></td>
|
|
2939
2987
|
|
|
2940
2988
|
|
|
2941
2989
|
<td class="type">
|
|
2942
2990
|
|
|
2943
2991
|
|
|
2944
|
-
<span class="param-type">
|
|
2992
|
+
<span class="param-type">int</span>
|
|
2945
2993
|
|
|
2946
2994
|
|
|
2947
2995
|
|
|
@@ -2949,39 +2997,23 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2949
2997
|
</td>
|
|
2950
2998
|
|
|
2951
2999
|
|
|
2952
|
-
<td class="attributes">
|
|
2953
|
-
|
|
2954
|
-
<optional><br>
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
</td>
|
|
2961
|
-
|
|
2962
3000
|
|
|
2963
3001
|
|
|
2964
|
-
<td class="default">
|
|
2965
|
-
|
|
2966
|
-
<code>20</code>
|
|
2967
|
-
|
|
2968
|
-
</td>
|
|
2969
|
-
|
|
2970
3002
|
|
|
2971
|
-
<td class="description last">
|
|
3003
|
+
<td class="description last">page of data to pull</td>
|
|
2972
3004
|
</tr>
|
|
2973
3005
|
|
|
2974
3006
|
|
|
2975
3007
|
|
|
2976
3008
|
<tr>
|
|
2977
3009
|
|
|
2978
|
-
<td class="name"><code>
|
|
3010
|
+
<td class="name"><code>limit</code></td>
|
|
2979
3011
|
|
|
2980
3012
|
|
|
2981
3013
|
<td class="type">
|
|
2982
3014
|
|
|
2983
3015
|
|
|
2984
|
-
<span class="param-type">
|
|
3016
|
+
<span class="param-type">int</span>
|
|
2985
3017
|
|
|
2986
3018
|
|
|
2987
3019
|
|
|
@@ -2989,26 +3021,10 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
2989
3021
|
</td>
|
|
2990
3022
|
|
|
2991
3023
|
|
|
2992
|
-
<td class="attributes">
|
|
2993
|
-
|
|
2994
|
-
<optional><br>
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
</td>
|
|
3001
|
-
|
|
3002
3024
|
|
|
3003
3025
|
|
|
3004
|
-
<td class="default">
|
|
3005
|
-
|
|
3006
|
-
<code>1</code>
|
|
3007
|
-
|
|
3008
|
-
</td>
|
|
3009
|
-
|
|
3010
3026
|
|
|
3011
|
-
<td class="description last">
|
|
3027
|
+
<td class="description last">number of elements to pull</td>
|
|
3012
3028
|
</tr>
|
|
3013
3029
|
|
|
3014
3030
|
|
|
@@ -3033,10 +3049,6 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3033
3049
|
<h5 class="h5-returns">Returns:</h5>
|
|
3034
3050
|
|
|
3035
3051
|
|
|
3036
|
-
<div class="param-desc">
|
|
3037
|
-
- Returns an object containing in-progress content if found, otherwise null.
|
|
3038
|
-
</div>
|
|
3039
|
-
|
|
3040
3052
|
|
|
3041
3053
|
|
|
3042
3054
|
<dl class="param-type">
|
|
@@ -3045,7 +3057,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3045
3057
|
</dt>
|
|
3046
3058
|
<dd>
|
|
3047
3059
|
|
|
3048
|
-
<span class="param-type">Promise.<(
|
|
3060
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
3049
3061
|
|
|
3050
3062
|
|
|
3051
3063
|
|
|
@@ -3061,7 +3073,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3061
3073
|
|
|
3062
3074
|
|
|
3063
3075
|
|
|
3064
|
-
<h4 class="name" id=".
|
|
3076
|
+
<h4 class="name" id=".fetchCompletedContent"><span class="type-signature type-signature-static">(static) </span>fetchCompletedContent<span class="signature">(type, brand)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
3065
3077
|
|
|
3066
3078
|
|
|
3067
3079
|
|
|
@@ -3071,13 +3083,13 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3071
3083
|
<dl class="details">
|
|
3072
3084
|
|
|
3073
3085
|
<dt class="tag-description">Description:</dt>
|
|
3074
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches
|
|
3086
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches a list of content that has been completed for the current user.</li></ul></dd>
|
|
3075
3087
|
|
|
3076
3088
|
|
|
3077
3089
|
|
|
3078
3090
|
<dt class="tag-source">Source:</dt>
|
|
3079
3091
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3080
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
3092
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line180">line 180</a>
|
|
3081
3093
|
</li></ul></dd>
|
|
3082
3094
|
|
|
3083
3095
|
|
|
@@ -3124,8 +3136,8 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3124
3136
|
|
|
3125
3137
|
<h5 class="h5-examples">Example</h5>
|
|
3126
3138
|
|
|
3127
|
-
<pre class="prettyprint"><code>
|
|
3128
|
-
.then(
|
|
3139
|
+
<pre class="prettyprint"><code>fetchCompletedContent('song', 'drumeo')
|
|
3140
|
+
.then(songs => console.log(songs))
|
|
3129
3141
|
.catch(error => console.error(error));</code></pre>
|
|
3130
3142
|
|
|
3131
3143
|
|
|
@@ -3144,8 +3156,12 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3144
3156
|
<th>Type</th>
|
|
3145
3157
|
|
|
3146
3158
|
|
|
3159
|
+
<th>Attributes</th>
|
|
3160
|
+
|
|
3147
3161
|
|
|
3148
3162
|
|
|
3163
|
+
<th>Default</th>
|
|
3164
|
+
|
|
3149
3165
|
|
|
3150
3166
|
<th class="last">Description</th>
|
|
3151
3167
|
</tr>
|
|
@@ -3156,7 +3172,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3156
3172
|
|
|
3157
3173
|
<tr>
|
|
3158
3174
|
|
|
3159
|
-
<td class="name"><code>
|
|
3175
|
+
<td class="name"><code>type</code></td>
|
|
3160
3176
|
|
|
3161
3177
|
|
|
3162
3178
|
<td class="type">
|
|
@@ -3170,213 +3186,44 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3170
3186
|
</td>
|
|
3171
3187
|
|
|
3172
3188
|
|
|
3189
|
+
<td class="attributes">
|
|
3190
|
+
|
|
3191
|
+
|
|
3192
|
+
|
|
3193
|
+
|
|
3194
|
+
|
|
3195
|
+
</td>
|
|
3196
|
+
|
|
3173
3197
|
|
|
3174
3198
|
|
|
3199
|
+
<td class="default">
|
|
3200
|
+
|
|
3201
|
+
</td>
|
|
3202
|
+
|
|
3175
3203
|
|
|
3176
|
-
<td class="description last">The
|
|
3204
|
+
<td class="description last">The content type associated with the content.</td>
|
|
3177
3205
|
</tr>
|
|
3178
3206
|
|
|
3179
3207
|
|
|
3180
|
-
</tbody>
|
|
3181
|
-
</table>
|
|
3182
3208
|
|
|
3209
|
+
<tr>
|
|
3210
|
+
|
|
3211
|
+
<td class="name"><code>brand</code></td>
|
|
3212
|
+
|
|
3183
3213
|
|
|
3214
|
+
<td class="type">
|
|
3215
|
+
|
|
3216
|
+
|
|
3217
|
+
<span class="param-type">string</span>
|
|
3184
3218
|
|
|
3185
3219
|
|
|
3186
3220
|
|
|
3221
|
+
|
|
3222
|
+
</td>
|
|
3187
3223
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
<h5 class="h5-returns">Returns:</h5>
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
<div class="param-desc">
|
|
3202
|
-
- Returns the completion status object if found, otherwise null.
|
|
3203
|
-
</div>
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
<dl class="param-type">
|
|
3208
|
-
<dt>
|
|
3209
|
-
Type
|
|
3210
|
-
</dt>
|
|
3211
|
-
<dd>
|
|
3212
|
-
|
|
3213
|
-
<span class="param-type">Promise.<(Object|null)></span>
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
</dd>
|
|
3218
|
-
</dl>
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
<h4 class="name" id=".fetchContentInProgress"><span class="type-signature type-signature-static">(static) </span>fetchContentInProgress<span class="signature">(type, brand)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
<dl class="details">
|
|
3237
|
-
|
|
3238
|
-
<dt class="tag-description">Description:</dt>
|
|
3239
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches a list of content that is currently in progress for the current user.</li></ul></dd>
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
<dt class="tag-source">Source:</dt>
|
|
3244
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
3245
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line136">line 136</a>
|
|
3246
|
-
</li></ul></dd>
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
</dl>
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
<h5 class="h5-examples">Example</h5>
|
|
3291
|
-
|
|
3292
|
-
<pre class="prettyprint"><code>fetchContentInProgress('song', 'drumeo')
|
|
3293
|
-
.then(songs => console.log(songs))
|
|
3294
|
-
.catch(error => console.error(error));</code></pre>
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
<h5 class="h5-parameters">Parameters:</h5>
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
<table class="params">
|
|
3303
|
-
<thead>
|
|
3304
|
-
<tr>
|
|
3305
|
-
|
|
3306
|
-
<th>Name</th>
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
<th>Type</th>
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
<th>Attributes</th>
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
<th>Default</th>
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
<th class="last">Description</th>
|
|
3320
|
-
</tr>
|
|
3321
|
-
</thead>
|
|
3322
|
-
|
|
3323
|
-
<tbody>
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
<tr>
|
|
3327
|
-
|
|
3328
|
-
<td class="name"><code>type</code></td>
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
<td class="type">
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
<span class="param-type">string</span>
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
</td>
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
<td class="attributes">
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
</td>
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
<td class="default">
|
|
3353
|
-
|
|
3354
|
-
</td>
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
<td class="description last">The content type associated with the content.</td>
|
|
3358
|
-
</tr>
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
<tr>
|
|
3363
|
-
|
|
3364
|
-
<td class="name"><code>brand</code></td>
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
<td class="type">
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
<span class="param-type">string</span>
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
</td>
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
<td class="attributes">
|
|
3379
|
-
|
|
3224
|
+
|
|
3225
|
+
<td class="attributes">
|
|
3226
|
+
|
|
3380
3227
|
|
|
3381
3228
|
|
|
3382
3229
|
|
|
@@ -3523,7 +3370,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3523
3370
|
|
|
3524
3371
|
|
|
3525
3372
|
|
|
3526
|
-
<h4 class="name" id=".
|
|
3373
|
+
<h4 class="name" id=".fetchCompletedState"><span class="type-signature type-signature-static">(static) </span>fetchCompletedState<span class="signature">(content_id)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
3527
3374
|
|
|
3528
3375
|
|
|
3529
3376
|
|
|
@@ -3533,13 +3380,13 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3533
3380
|
<dl class="details">
|
|
3534
3381
|
|
|
3535
3382
|
<dt class="tag-description">Description:</dt>
|
|
3536
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches
|
|
3383
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches the completion status of a specific lesson for the current user.</li></ul></dd>
|
|
3537
3384
|
|
|
3538
3385
|
|
|
3539
3386
|
|
|
3540
3387
|
<dt class="tag-source">Source:</dt>
|
|
3541
3388
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3542
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
3389
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line36">line 36</a>
|
|
3543
3390
|
</li></ul></dd>
|
|
3544
3391
|
|
|
3545
3392
|
|
|
@@ -3586,8 +3433,8 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3586
3433
|
|
|
3587
3434
|
<h5 class="h5-examples">Example</h5>
|
|
3588
3435
|
|
|
3589
|
-
<pre class="prettyprint"><code>
|
|
3590
|
-
.then(
|
|
3436
|
+
<pre class="prettyprint"><code>fetchCurrentSongComplete('user123', 'lesson456', 'csrf-token')
|
|
3437
|
+
.then(status => console.log(status))
|
|
3591
3438
|
.catch(error => console.error(error));</code></pre>
|
|
3592
3439
|
|
|
3593
3440
|
|
|
@@ -3618,13 +3465,13 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3618
3465
|
|
|
3619
3466
|
<tr>
|
|
3620
3467
|
|
|
3621
|
-
<td class="name"><code>
|
|
3468
|
+
<td class="name"><code>content_id</code></td>
|
|
3622
3469
|
|
|
3623
3470
|
|
|
3624
3471
|
<td class="type">
|
|
3625
3472
|
|
|
3626
3473
|
|
|
3627
|
-
<span class="param-type">
|
|
3474
|
+
<span class="param-type">string</span>
|
|
3628
3475
|
|
|
3629
3476
|
|
|
3630
3477
|
|
|
@@ -3635,7 +3482,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3635
3482
|
|
|
3636
3483
|
|
|
3637
3484
|
|
|
3638
|
-
<td class="description last">The content
|
|
3485
|
+
<td class="description last">The ID of the lesson content to check.</td>
|
|
3639
3486
|
</tr>
|
|
3640
3487
|
|
|
3641
3488
|
|
|
@@ -3661,7 +3508,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3661
3508
|
|
|
3662
3509
|
|
|
3663
3510
|
<div class="param-desc">
|
|
3664
|
-
- Returns
|
|
3511
|
+
- Returns the completion status object if found, otherwise null.
|
|
3665
3512
|
</div>
|
|
3666
3513
|
|
|
3667
3514
|
|
|
@@ -3688,7 +3535,7 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3688
3535
|
|
|
3689
3536
|
|
|
3690
3537
|
|
|
3691
|
-
<h4 class="name" id=".
|
|
3538
|
+
<h4 class="name" id=".fetchContentInProgress"><span class="type-signature type-signature-static">(static) </span>fetchContentInProgress<span class="signature">(type, brand)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
3692
3539
|
|
|
3693
3540
|
|
|
3694
3541
|
|
|
@@ -3698,13 +3545,13 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3698
3545
|
<dl class="details">
|
|
3699
3546
|
|
|
3700
3547
|
<dt class="tag-description">Description:</dt>
|
|
3701
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches
|
|
3548
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches a list of content that is currently in progress for the current user.</li></ul></dd>
|
|
3702
3549
|
|
|
3703
3550
|
|
|
3704
3551
|
|
|
3705
3552
|
<dt class="tag-source">Source:</dt>
|
|
3706
3553
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3707
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
3554
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line138">line 138</a>
|
|
3708
3555
|
</li></ul></dd>
|
|
3709
3556
|
|
|
3710
3557
|
|
|
@@ -3751,19 +3598,9 @@ Intended to be used on the index page for challenges</li></ul></dd>
|
|
|
3751
3598
|
|
|
3752
3599
|
<h5 class="h5-examples">Example</h5>
|
|
3753
3600
|
|
|
3754
|
-
<pre class="prettyprint"><code>
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
.then(response => {
|
|
3758
|
-
if (response.success) {
|
|
3759
|
-
console.log("Pinned playlists:", response.data);
|
|
3760
|
-
} else {
|
|
3761
|
-
console.error("Error:", response.error);
|
|
3762
|
-
}
|
|
3763
|
-
})
|
|
3764
|
-
.catch(error => {
|
|
3765
|
-
console.error("Error fetching pinned playlists:", error);
|
|
3766
|
-
});</code></pre>
|
|
3601
|
+
<pre class="prettyprint"><code>fetchContentInProgress('song', 'drumeo')
|
|
3602
|
+
.then(songs => console.log(songs))
|
|
3603
|
+
.catch(error => console.error(error));</code></pre>
|
|
3767
3604
|
|
|
3768
3605
|
|
|
3769
3606
|
|
|
@@ -3781,8 +3618,12 @@ fetchPinnedPlaylists(brand)
|
|
|
3781
3618
|
<th>Type</th>
|
|
3782
3619
|
|
|
3783
3620
|
|
|
3621
|
+
<th>Attributes</th>
|
|
3622
|
+
|
|
3784
3623
|
|
|
3785
3624
|
|
|
3625
|
+
<th>Default</th>
|
|
3626
|
+
|
|
3786
3627
|
|
|
3787
3628
|
<th class="last">Description</th>
|
|
3788
3629
|
</tr>
|
|
@@ -3793,7 +3634,7 @@ fetchPinnedPlaylists(brand)
|
|
|
3793
3634
|
|
|
3794
3635
|
<tr>
|
|
3795
3636
|
|
|
3796
|
-
<td class="name"><code>
|
|
3637
|
+
<td class="name"><code>type</code></td>
|
|
3797
3638
|
|
|
3798
3639
|
|
|
3799
3640
|
<td class="type">
|
|
@@ -3807,71 +3648,164 @@ fetchPinnedPlaylists(brand)
|
|
|
3807
3648
|
</td>
|
|
3808
3649
|
|
|
3809
3650
|
|
|
3651
|
+
<td class="attributes">
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
|
|
3810
3655
|
|
|
3656
|
+
|
|
3657
|
+
</td>
|
|
3811
3658
|
|
|
3812
3659
|
|
|
3813
|
-
|
|
3660
|
+
|
|
3661
|
+
<td class="default">
|
|
3662
|
+
|
|
3663
|
+
</td>
|
|
3664
|
+
|
|
3665
|
+
|
|
3666
|
+
<td class="description last">The content type associated with the content.</td>
|
|
3814
3667
|
</tr>
|
|
3815
3668
|
|
|
3816
3669
|
|
|
3817
|
-
</tbody>
|
|
3818
|
-
</table>
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
3670
|
|
|
3671
|
+
<tr>
|
|
3672
|
+
|
|
3673
|
+
<td class="name"><code>brand</code></td>
|
|
3674
|
+
|
|
3823
3675
|
|
|
3676
|
+
<td class="type">
|
|
3677
|
+
|
|
3678
|
+
|
|
3679
|
+
<span class="param-type">string</span>
|
|
3824
3680
|
|
|
3825
3681
|
|
|
3826
3682
|
|
|
3683
|
+
|
|
3684
|
+
</td>
|
|
3827
3685
|
|
|
3686
|
+
|
|
3687
|
+
<td class="attributes">
|
|
3688
|
+
|
|
3828
3689
|
|
|
3690
|
+
|
|
3829
3691
|
|
|
3692
|
+
|
|
3693
|
+
</td>
|
|
3694
|
+
|
|
3830
3695
|
|
|
3696
|
+
|
|
3697
|
+
<td class="default">
|
|
3698
|
+
|
|
3699
|
+
</td>
|
|
3700
|
+
|
|
3831
3701
|
|
|
3702
|
+
<td class="description last">The brand associated with the content.</td>
|
|
3703
|
+
</tr>
|
|
3832
3704
|
|
|
3833
|
-
|
|
3705
|
+
|
|
3834
3706
|
|
|
3835
|
-
|
|
3707
|
+
<tr>
|
|
3708
|
+
|
|
3709
|
+
<td class="name"><code>params.limit</code></td>
|
|
3710
|
+
|
|
3836
3711
|
|
|
3837
|
-
<
|
|
3838
|
-
|
|
3839
|
-
<div class="param-desc usertext">
|
|
3840
|
-
- Throws an error if the request fails.
|
|
3841
|
-
</div>
|
|
3842
|
-
</dt>
|
|
3843
|
-
<dd></dd>
|
|
3844
|
-
<dt>
|
|
3845
|
-
<dl class="param-type">
|
|
3846
|
-
<dt>
|
|
3847
|
-
Type
|
|
3848
|
-
</dt>
|
|
3849
|
-
<dd>
|
|
3712
|
+
<td class="type">
|
|
3713
|
+
|
|
3850
3714
|
|
|
3851
|
-
<span class="param-type">
|
|
3715
|
+
<span class="param-type">number</span>
|
|
3852
3716
|
|
|
3853
3717
|
|
|
3854
3718
|
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3719
|
+
|
|
3720
|
+
</td>
|
|
3721
|
+
|
|
3722
|
+
|
|
3723
|
+
<td class="attributes">
|
|
3724
|
+
|
|
3725
|
+
<optional><br>
|
|
3726
|
+
|
|
3727
|
+
|
|
3728
|
+
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
</td>
|
|
3732
|
+
|
|
3733
|
+
|
|
3734
|
+
|
|
3735
|
+
<td class="default">
|
|
3736
|
+
|
|
3737
|
+
<code>20</code>
|
|
3738
|
+
|
|
3739
|
+
</td>
|
|
3740
|
+
|
|
3741
|
+
|
|
3742
|
+
<td class="description last">The limit of results per page.</td>
|
|
3743
|
+
</tr>
|
|
3744
|
+
|
|
3745
|
+
|
|
3746
|
+
|
|
3747
|
+
<tr>
|
|
3748
|
+
|
|
3749
|
+
<td class="name"><code>params.page</code></td>
|
|
3750
|
+
|
|
3751
|
+
|
|
3752
|
+
<td class="type">
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
<span class="param-type">number</span>
|
|
3756
|
+
|
|
3757
|
+
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
</td>
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
<td class="attributes">
|
|
3764
|
+
|
|
3765
|
+
<optional><br>
|
|
3766
|
+
|
|
3767
|
+
|
|
3768
|
+
|
|
3769
|
+
|
|
3770
|
+
|
|
3771
|
+
</td>
|
|
3772
|
+
|
|
3773
|
+
|
|
3774
|
+
|
|
3775
|
+
<td class="default">
|
|
3776
|
+
|
|
3777
|
+
<code>1</code>
|
|
3778
|
+
|
|
3779
|
+
</td>
|
|
3780
|
+
|
|
3860
3781
|
|
|
3782
|
+
<td class="description last">The page number for pagination.</td>
|
|
3783
|
+
</tr>
|
|
3861
3784
|
|
|
3862
3785
|
|
|
3786
|
+
</tbody>
|
|
3787
|
+
</table>
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
|
|
3791
|
+
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
|
|
3801
|
+
|
|
3863
3802
|
|
|
3864
3803
|
|
|
3865
3804
|
<h5 class="h5-returns">Returns:</h5>
|
|
3866
3805
|
|
|
3867
3806
|
|
|
3868
3807
|
<div class="param-desc">
|
|
3869
|
-
-
|
|
3870
|
-
- `success` (boolean): Indicates if the fetching operation was successful (`true` for success).
|
|
3871
|
-
- `data` (Array): An array of pinned playlists.
|
|
3872
|
-
- `error` (string): An error message if the fetching operation fails.
|
|
3873
|
-
|
|
3874
|
-
Resolves to an error message if the request fails.
|
|
3808
|
+
- Returns an object containing in-progress content if found, otherwise null.
|
|
3875
3809
|
</div>
|
|
3876
3810
|
|
|
3877
3811
|
|
|
@@ -3882,7 +3816,7 @@ Resolves to an error message if the request fails.
|
|
|
3882
3816
|
</dt>
|
|
3883
3817
|
<dd>
|
|
3884
3818
|
|
|
3885
|
-
<span class="param-type">Promise.<Object></span>
|
|
3819
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
3886
3820
|
|
|
3887
3821
|
|
|
3888
3822
|
|
|
@@ -3898,7 +3832,7 @@ Resolves to an error message if the request fails.
|
|
|
3898
3832
|
|
|
3899
3833
|
|
|
3900
3834
|
|
|
3901
|
-
<h4 class="name" id=".
|
|
3835
|
+
<h4 class="name" id=".fetchContentPageUserData"><span class="type-signature type-signature-static">(static) </span>fetchContentPageUserData<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
3902
3836
|
|
|
3903
3837
|
|
|
3904
3838
|
|
|
@@ -3908,16 +3842,13 @@ Resolves to an error message if the request fails.
|
|
|
3908
3842
|
<dl class="details">
|
|
3909
3843
|
|
|
3910
3844
|
<dt class="tag-description">Description:</dt>
|
|
3911
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
3912
|
-
|
|
3913
|
-
This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
|
|
3914
|
-
The server validates the user's access to the playlist and returns playlist details if the user is authorized.</li></ul></dd>
|
|
3845
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches user context data for a specific piece of content.</li></ul></dd>
|
|
3915
3846
|
|
|
3916
3847
|
|
|
3917
3848
|
|
|
3918
3849
|
<dt class="tag-source">Source:</dt>
|
|
3919
3850
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3920
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
3851
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line220">line 220</a>
|
|
3921
3852
|
</li></ul></dd>
|
|
3922
3853
|
|
|
3923
3854
|
|
|
@@ -3964,9 +3895,9 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
3964
3895
|
|
|
3965
3896
|
<h5 class="h5-examples">Example</h5>
|
|
3966
3897
|
|
|
3967
|
-
<pre class="prettyprint"><code>
|
|
3968
|
-
.then(
|
|
3969
|
-
.catch(error => console.error(
|
|
3898
|
+
<pre class="prettyprint"><code>fetchContentPageUserData(406548)
|
|
3899
|
+
.then(data => console.log(data))
|
|
3900
|
+
.catch(error => console.error(error));</code></pre>
|
|
3970
3901
|
|
|
3971
3902
|
|
|
3972
3903
|
|
|
@@ -3996,16 +3927,13 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
3996
3927
|
|
|
3997
3928
|
<tr>
|
|
3998
3929
|
|
|
3999
|
-
<td class="name"><code>
|
|
3930
|
+
<td class="name"><code>contentId</code></td>
|
|
4000
3931
|
|
|
4001
3932
|
|
|
4002
3933
|
<td class="type">
|
|
4003
3934
|
|
|
4004
3935
|
|
|
4005
|
-
<span class="param-type">
|
|
4006
|
-
|
|
|
4007
|
-
|
|
4008
|
-
<span class="param-type">number</span>
|
|
3936
|
+
<span class="param-type">int</span>
|
|
4009
3937
|
|
|
4010
3938
|
|
|
4011
3939
|
|
|
@@ -4016,7 +3944,7 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4016
3944
|
|
|
4017
3945
|
|
|
4018
3946
|
|
|
4019
|
-
<td class="description last">The
|
|
3947
|
+
<td class="description last">The content id.</td>
|
|
4020
3948
|
</tr>
|
|
4021
3949
|
|
|
4022
3950
|
|
|
@@ -4042,8 +3970,7 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4042
3970
|
|
|
4043
3971
|
|
|
4044
3972
|
<div class="param-desc">
|
|
4045
|
-
-
|
|
4046
|
-
- `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
|
|
3973
|
+
- Returns an object containing user context data if found, otherwise null.
|
|
4047
3974
|
</div>
|
|
4048
3975
|
|
|
4049
3976
|
|
|
@@ -4054,7 +3981,7 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4054
3981
|
</dt>
|
|
4055
3982
|
<dd>
|
|
4056
3983
|
|
|
4057
|
-
<span class="param-type">Promise.<Object></span>
|
|
3984
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
4058
3985
|
|
|
4059
3986
|
|
|
4060
3987
|
|
|
@@ -4070,7 +3997,7 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4070
3997
|
|
|
4071
3998
|
|
|
4072
3999
|
|
|
4073
|
-
<h4 class="name" id=".
|
|
4000
|
+
<h4 class="name" id=".fetchOwnedChallenges"><span class="type-signature type-signature-static">(static) </span>fetchOwnedChallenges<span class="signature">(brand, page, limit)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
4074
4001
|
|
|
4075
4002
|
|
|
4076
4003
|
|
|
@@ -4080,13 +4007,13 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4080
4007
|
<dl class="details">
|
|
4081
4008
|
|
|
4082
4009
|
<dt class="tag-description">Description:</dt>
|
|
4083
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
4010
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch all owned brand challenges for user</li></ul></dd>
|
|
4084
4011
|
|
|
4085
4012
|
|
|
4086
4013
|
|
|
4087
4014
|
<dt class="tag-source">Source:</dt>
|
|
4088
4015
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4089
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
4016
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line348">line 348</a>
|
|
4090
4017
|
</li></ul></dd>
|
|
4091
4018
|
|
|
4092
4019
|
|
|
@@ -4131,23 +4058,6 @@ The server validates the user's access to the playlist and returns playlist deta
|
|
|
4131
4058
|
|
|
4132
4059
|
|
|
4133
4060
|
|
|
4134
|
-
<h5 class="h5-examples">Example</h5>
|
|
4135
|
-
|
|
4136
|
-
<pre class="prettyprint"><code>const payload = { user_playlist_item_id: 123 };
|
|
4137
|
-
|
|
4138
|
-
fetchPlaylistItem(payload)
|
|
4139
|
-
.then(response => {
|
|
4140
|
-
if (response?.success) {
|
|
4141
|
-
console.log("Fetched playlist item data:", response.data);
|
|
4142
|
-
} else {
|
|
4143
|
-
console.log("Failed to fetch playlist item data.");
|
|
4144
|
-
}
|
|
4145
|
-
})
|
|
4146
|
-
.catch(error => {
|
|
4147
|
-
console.error("Error fetching playlist item:", error);
|
|
4148
|
-
});</code></pre>
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
4061
|
|
|
4152
4062
|
|
|
4153
4063
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -4175,13 +4085,16 @@ fetchPlaylistItem(payload)
|
|
|
4175
4085
|
|
|
4176
4086
|
<tr>
|
|
4177
4087
|
|
|
4178
|
-
<td class="name"><code>
|
|
4088
|
+
<td class="name"><code>brand</code></td>
|
|
4179
4089
|
|
|
4180
4090
|
|
|
4181
4091
|
<td class="type">
|
|
4182
4092
|
|
|
4183
4093
|
|
|
4184
|
-
<span class="param-type">
|
|
4094
|
+
<span class="param-type">string</span>
|
|
4095
|
+
|
|
|
4096
|
+
|
|
4097
|
+
<span class="param-type">null</span>
|
|
4185
4098
|
|
|
4186
4099
|
|
|
4187
4100
|
|
|
@@ -4192,39 +4105,44 @@ fetchPlaylistItem(payload)
|
|
|
4192
4105
|
|
|
4193
4106
|
|
|
4194
4107
|
|
|
4195
|
-
<td class="description last">
|
|
4196
|
-
|
|
4108
|
+
<td class="description last">brand</td>
|
|
4109
|
+
</tr>
|
|
4110
|
+
|
|
4111
|
+
|
|
4112
|
+
|
|
4113
|
+
<tr>
|
|
4114
|
+
|
|
4115
|
+
<td class="name"><code>page</code></td>
|
|
4116
|
+
|
|
4117
|
+
|
|
4118
|
+
<td class="type">
|
|
4119
|
+
|
|
4197
4120
|
|
|
4121
|
+
<span class="param-type">int</span>
|
|
4198
4122
|
|
|
4199
|
-
<table class="params">
|
|
4200
|
-
<thead>
|
|
4201
|
-
<tr>
|
|
4202
|
-
|
|
4203
|
-
<th>Name</th>
|
|
4204
|
-
|
|
4205
4123
|
|
|
4206
|
-
<th>Type</th>
|
|
4207
4124
|
|
|
4208
|
-
|
|
4125
|
+
|
|
4126
|
+
</td>
|
|
4209
4127
|
|
|
4210
|
-
|
|
4128
|
+
|
|
4211
4129
|
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4130
|
+
|
|
4131
|
+
|
|
4132
|
+
<td class="description last">page of data to pull</td>
|
|
4133
|
+
</tr>
|
|
4215
4134
|
|
|
4216
|
-
<tbody>
|
|
4217
4135
|
|
|
4218
4136
|
|
|
4219
4137
|
<tr>
|
|
4220
4138
|
|
|
4221
|
-
<td class="name"><code>
|
|
4139
|
+
<td class="name"><code>limit</code></td>
|
|
4222
4140
|
|
|
4223
4141
|
|
|
4224
4142
|
<td class="type">
|
|
4225
4143
|
|
|
4226
4144
|
|
|
4227
|
-
<span class="param-type">
|
|
4145
|
+
<span class="param-type">int</span>
|
|
4228
4146
|
|
|
4229
4147
|
|
|
4230
4148
|
|
|
@@ -4235,19 +4153,14 @@ fetchPlaylistItem(payload)
|
|
|
4235
4153
|
|
|
4236
4154
|
|
|
4237
4155
|
|
|
4238
|
-
<td class="description last">
|
|
4156
|
+
<td class="description last">number of elements to pull</td>
|
|
4239
4157
|
</tr>
|
|
4240
4158
|
|
|
4241
4159
|
|
|
4242
4160
|
</tbody>
|
|
4243
4161
|
</table>
|
|
4244
4162
|
|
|
4245
|
-
</td>
|
|
4246
|
-
</tr>
|
|
4247
4163
|
|
|
4248
|
-
|
|
4249
|
-
</tbody>
|
|
4250
|
-
</table>
|
|
4251
4164
|
|
|
4252
4165
|
|
|
4253
4166
|
|
|
@@ -4262,58 +4175,18 @@ fetchPlaylistItem(payload)
|
|
|
4262
4175
|
|
|
4263
4176
|
|
|
4264
4177
|
|
|
4265
|
-
<h5 class="h5-
|
|
4178
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
4266
4179
|
|
|
4267
4180
|
|
|
4268
4181
|
|
|
4269
|
-
|
|
4182
|
+
|
|
4183
|
+
<dl class="param-type">
|
|
4270
4184
|
<dt>
|
|
4271
|
-
|
|
4272
|
-
- Throws an error if the request encounters issues during retrieval.
|
|
4273
|
-
</div>
|
|
4185
|
+
Type
|
|
4274
4186
|
</dt>
|
|
4275
|
-
<dd
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
<dt>
|
|
4279
|
-
Type
|
|
4280
|
-
</dt>
|
|
4281
|
-
<dd>
|
|
4282
|
-
|
|
4283
|
-
<span class="param-type">Error</span>
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
</dd>
|
|
4288
|
-
</dl>
|
|
4289
|
-
</dt>
|
|
4290
|
-
<dd></dd>
|
|
4291
|
-
</dl>
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
<h5 class="h5-returns">Returns:</h5>
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
<div class="param-desc">
|
|
4301
|
-
- A promise that resolves to an object with the fetched playlist item data, including:
|
|
4302
|
-
- `success` (boolean): Indicates if the data retrieval was successful (`true` on success).
|
|
4303
|
-
- `data` (Object): Contains the detailed playlist item data enriched with Sanity and Assignment details, if available.
|
|
4304
|
-
|
|
4305
|
-
Resolves to `null` if the request fails.
|
|
4306
|
-
</div>
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
<dl class="param-type">
|
|
4311
|
-
<dt>
|
|
4312
|
-
Type
|
|
4313
|
-
</dt>
|
|
4314
|
-
<dd>
|
|
4315
|
-
|
|
4316
|
-
<span class="param-type">Promise.<(Object|null)></span>
|
|
4187
|
+
<dd>
|
|
4188
|
+
|
|
4189
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
4317
4190
|
|
|
4318
4191
|
|
|
4319
4192
|
|
|
@@ -4329,7 +4202,7 @@ Resolves to `null` if the request fails.
|
|
|
4329
4202
|
|
|
4330
4203
|
|
|
4331
4204
|
|
|
4332
|
-
<h4 class="name" id=".
|
|
4205
|
+
<h4 class="name" id=".fetchPinnedPlaylists"><span class="type-signature type-signature-static">(static) </span>fetchPinnedPlaylists<span class="signature">(brand)</span><span class="type-signature"> → {Promise.<Object>}</span></h4>
|
|
4333
4206
|
|
|
4334
4207
|
|
|
4335
4208
|
|
|
@@ -4339,16 +4212,13 @@ Resolves to `null` if the request fails.
|
|
|
4339
4212
|
<dl class="details">
|
|
4340
4213
|
|
|
4341
4214
|
<dt class="tag-description">Description:</dt>
|
|
4342
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
4343
|
-
|
|
4344
|
-
This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
|
|
4345
|
-
The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
|
|
4215
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches the list of pinned playlists for the authenticated user.</li></ul></dd>
|
|
4346
4216
|
|
|
4347
4217
|
|
|
4348
4218
|
|
|
4349
4219
|
<dt class="tag-source">Source:</dt>
|
|
4350
4220
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4351
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
4221
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line1088">line 1088</a>
|
|
4352
4222
|
</li></ul></dd>
|
|
4353
4223
|
|
|
4354
4224
|
|
|
@@ -4395,9 +4265,19 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4395
4265
|
|
|
4396
4266
|
<h5 class="h5-examples">Example</h5>
|
|
4397
4267
|
|
|
4398
|
-
<pre class="prettyprint"><code>
|
|
4399
|
-
|
|
4400
|
-
|
|
4268
|
+
<pre class="prettyprint"><code>const brand = "drumeo";
|
|
4269
|
+
|
|
4270
|
+
fetchPinnedPlaylists(brand)
|
|
4271
|
+
.then(response => {
|
|
4272
|
+
if (response.success) {
|
|
4273
|
+
console.log("Pinned playlists:", response.data);
|
|
4274
|
+
} else {
|
|
4275
|
+
console.error("Error:", response.error);
|
|
4276
|
+
}
|
|
4277
|
+
})
|
|
4278
|
+
.catch(error => {
|
|
4279
|
+
console.error("Error fetching pinned playlists:", error);
|
|
4280
|
+
});</code></pre>
|
|
4401
4281
|
|
|
4402
4282
|
|
|
4403
4283
|
|
|
@@ -4427,16 +4307,13 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4427
4307
|
|
|
4428
4308
|
<tr>
|
|
4429
4309
|
|
|
4430
|
-
<td class="name"><code>
|
|
4310
|
+
<td class="name"><code>brand</code></td>
|
|
4431
4311
|
|
|
4432
4312
|
|
|
4433
4313
|
<td class="type">
|
|
4434
4314
|
|
|
4435
4315
|
|
|
4436
4316
|
<span class="param-type">string</span>
|
|
4437
|
-
|
|
|
4438
|
-
|
|
4439
|
-
<span class="param-type">number</span>
|
|
4440
4317
|
|
|
4441
4318
|
|
|
4442
4319
|
|
|
@@ -4447,7 +4324,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4447
4324
|
|
|
4448
4325
|
|
|
4449
4326
|
|
|
4450
|
-
<td class="description last">The
|
|
4327
|
+
<td class="description last">The brand associated with the playlists to fetch.</td>
|
|
4451
4328
|
</tr>
|
|
4452
4329
|
|
|
4453
4330
|
|
|
@@ -4467,13 +4344,48 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4467
4344
|
|
|
4468
4345
|
|
|
4469
4346
|
|
|
4347
|
+
<h5 class="h5-throws">Throws:</h5>
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
|
+
|
|
4351
|
+
<dl>
|
|
4352
|
+
<dt>
|
|
4353
|
+
<div class="param-desc usertext">
|
|
4354
|
+
- Throws an error if the request fails.
|
|
4355
|
+
</div>
|
|
4356
|
+
</dt>
|
|
4357
|
+
<dd></dd>
|
|
4358
|
+
<dt>
|
|
4359
|
+
<dl class="param-type">
|
|
4360
|
+
<dt>
|
|
4361
|
+
Type
|
|
4362
|
+
</dt>
|
|
4363
|
+
<dd>
|
|
4364
|
+
|
|
4365
|
+
<span class="param-type">Error</span>
|
|
4366
|
+
|
|
4367
|
+
|
|
4368
|
+
|
|
4369
|
+
</dd>
|
|
4370
|
+
</dl>
|
|
4371
|
+
</dt>
|
|
4372
|
+
<dd></dd>
|
|
4373
|
+
</dl>
|
|
4374
|
+
|
|
4375
|
+
|
|
4376
|
+
|
|
4470
4377
|
|
|
4471
4378
|
|
|
4472
4379
|
<h5 class="h5-returns">Returns:</h5>
|
|
4473
4380
|
|
|
4474
4381
|
|
|
4475
4382
|
<div class="param-desc">
|
|
4476
|
-
- A promise that resolves to an
|
|
4383
|
+
- A promise that resolves to an object containing:
|
|
4384
|
+
- `success` (boolean): Indicates if the fetching operation was successful (`true` for success).
|
|
4385
|
+
- `data` (Array): An array of pinned playlists.
|
|
4386
|
+
- `error` (string): An error message if the fetching operation fails.
|
|
4387
|
+
|
|
4388
|
+
Resolves to an error message if the request fails.
|
|
4477
4389
|
</div>
|
|
4478
4390
|
|
|
4479
4391
|
|
|
@@ -4484,7 +4396,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4484
4396
|
</dt>
|
|
4485
4397
|
<dd>
|
|
4486
4398
|
|
|
4487
|
-
<span class="param-type">Promise.<
|
|
4399
|
+
<span class="param-type">Promise.<Object></span>
|
|
4488
4400
|
|
|
4489
4401
|
|
|
4490
4402
|
|
|
@@ -4500,7 +4412,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4500
4412
|
|
|
4501
4413
|
|
|
4502
4414
|
|
|
4503
|
-
<h4 class="name" id=".
|
|
4415
|
+
<h4 class="name" id=".fetchPlaylist"><span class="type-signature type-signature-static">(static) </span>fetchPlaylist<span class="signature">(playlistId)</span><span class="type-signature"> → {Promise.<Object>}</span></h4>
|
|
4504
4416
|
|
|
4505
4417
|
|
|
4506
4418
|
|
|
@@ -4510,13 +4422,16 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4510
4422
|
<dl class="details">
|
|
4511
4423
|
|
|
4512
4424
|
<dt class="tag-description">Description:</dt>
|
|
4513
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
4425
|
+
<dd class="tag-description"><ul class="dummy"><li>Retrieves details of a specific playlist by its ID.
|
|
4426
|
+
|
|
4427
|
+
This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
|
|
4428
|
+
The server validates the user's access to the playlist and returns playlist details if the user is authorized.</li></ul></dd>
|
|
4514
4429
|
|
|
4515
4430
|
|
|
4516
4431
|
|
|
4517
4432
|
<dt class="tag-source">Source:</dt>
|
|
4518
4433
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4519
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
4434
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line778">line 778</a>
|
|
4520
4435
|
</li></ul></dd>
|
|
4521
4436
|
|
|
4522
4437
|
|
|
@@ -4563,9 +4478,9 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4563
4478
|
|
|
4564
4479
|
<h5 class="h5-examples">Example</h5>
|
|
4565
4480
|
|
|
4566
|
-
<pre class="prettyprint"><code>
|
|
4567
|
-
.then(
|
|
4568
|
-
.catch(error => console.error(error));</code></pre>
|
|
4481
|
+
<pre class="prettyprint"><code>fetchPlaylist(12345)
|
|
4482
|
+
.then(response => console.log(response.data))
|
|
4483
|
+
.catch(error => console.error('Error fetching playlist:', error));</code></pre>
|
|
4569
4484
|
|
|
4570
4485
|
|
|
4571
4486
|
|
|
@@ -4595,13 +4510,16 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4595
4510
|
|
|
4596
4511
|
<tr>
|
|
4597
4512
|
|
|
4598
|
-
<td class="name"><code>
|
|
4513
|
+
<td class="name"><code>playlistId</code></td>
|
|
4599
4514
|
|
|
4600
4515
|
|
|
4601
4516
|
<td class="type">
|
|
4602
4517
|
|
|
4603
4518
|
|
|
4604
4519
|
<span class="param-type">string</span>
|
|
4520
|
+
|
|
|
4521
|
+
|
|
4522
|
+
<span class="param-type">number</span>
|
|
4605
4523
|
|
|
4606
4524
|
|
|
4607
4525
|
|
|
@@ -4612,7 +4530,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4612
4530
|
|
|
4613
4531
|
|
|
4614
4532
|
|
|
4615
|
-
<td class="description last">The
|
|
4533
|
+
<td class="description last">The unique identifier of the playlist to retrieve.</td>
|
|
4616
4534
|
</tr>
|
|
4617
4535
|
|
|
4618
4536
|
|
|
@@ -4638,7 +4556,8 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4638
4556
|
|
|
4639
4557
|
|
|
4640
4558
|
<div class="param-desc">
|
|
4641
|
-
-
|
|
4559
|
+
- A promise that resolves to the response from the API, containing:
|
|
4560
|
+
- `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
|
|
4642
4561
|
</div>
|
|
4643
4562
|
|
|
4644
4563
|
|
|
@@ -4649,7 +4568,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4649
4568
|
</dt>
|
|
4650
4569
|
<dd>
|
|
4651
4570
|
|
|
4652
|
-
<span class="param-type">Promise.<
|
|
4571
|
+
<span class="param-type">Promise.<Object></span>
|
|
4653
4572
|
|
|
4654
4573
|
|
|
4655
4574
|
|
|
@@ -4665,7 +4584,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4665
4584
|
|
|
4666
4585
|
|
|
4667
4586
|
|
|
4668
|
-
<h4 class="name" id=".
|
|
4587
|
+
<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>
|
|
4669
4588
|
|
|
4670
4589
|
|
|
4671
4590
|
|
|
@@ -4675,13 +4594,13 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4675
4594
|
<dl class="details">
|
|
4676
4595
|
|
|
4677
4596
|
<dt class="tag-description">Description:</dt>
|
|
4678
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
4597
|
+
<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>
|
|
4679
4598
|
|
|
4680
4599
|
|
|
4681
4600
|
|
|
4682
4601
|
<dt class="tag-source">Source:</dt>
|
|
4683
4602
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4684
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
4603
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line906">line 906</a>
|
|
4685
4604
|
</li></ul></dd>
|
|
4686
4605
|
|
|
4687
4606
|
|
|
@@ -4726,6 +4645,23 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4726
4645
|
|
|
4727
4646
|
|
|
4728
4647
|
|
|
4648
|
+
<h5 class="h5-examples">Example</h5>
|
|
4649
|
+
|
|
4650
|
+
<pre class="prettyprint"><code>const payload = { user_playlist_item_id: 123 };
|
|
4651
|
+
|
|
4652
|
+
fetchPlaylistItem(payload)
|
|
4653
|
+
.then(response => {
|
|
4654
|
+
if (response?.success) {
|
|
4655
|
+
console.log("Fetched playlist item data:", response.data);
|
|
4656
|
+
} else {
|
|
4657
|
+
console.log("Failed to fetch playlist item data.");
|
|
4658
|
+
}
|
|
4659
|
+
})
|
|
4660
|
+
.catch(error => {
|
|
4661
|
+
console.error("Error fetching playlist item:", error);
|
|
4662
|
+
});</code></pre>
|
|
4663
|
+
|
|
4664
|
+
|
|
4729
4665
|
|
|
4730
4666
|
|
|
4731
4667
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -4753,18 +4689,74 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4753
4689
|
|
|
4754
4690
|
<tr>
|
|
4755
4691
|
|
|
4756
|
-
<td class="name"><code>
|
|
4692
|
+
<td class="name"><code>payload</code></td>
|
|
4757
4693
|
|
|
4758
4694
|
|
|
4759
4695
|
<td class="type">
|
|
4760
4696
|
|
|
4697
|
+
|
|
4698
|
+
<span class="param-type">Object</span>
|
|
4699
|
+
|
|
4700
|
+
|
|
4701
|
+
|
|
4702
|
+
|
|
4761
4703
|
</td>
|
|
4762
4704
|
|
|
4763
4705
|
|
|
4764
4706
|
|
|
4765
4707
|
|
|
4766
4708
|
|
|
4767
|
-
<td class="description last">
|
|
4709
|
+
<td class="description last">The request payload containing necessary parameters.
|
|
4710
|
+
<h6>Properties</h6>
|
|
4711
|
+
|
|
4712
|
+
|
|
4713
|
+
<table class="params">
|
|
4714
|
+
<thead>
|
|
4715
|
+
<tr>
|
|
4716
|
+
|
|
4717
|
+
<th>Name</th>
|
|
4718
|
+
|
|
4719
|
+
|
|
4720
|
+
<th>Type</th>
|
|
4721
|
+
|
|
4722
|
+
|
|
4723
|
+
|
|
4724
|
+
|
|
4725
|
+
|
|
4726
|
+
<th class="last">Description</th>
|
|
4727
|
+
</tr>
|
|
4728
|
+
</thead>
|
|
4729
|
+
|
|
4730
|
+
<tbody>
|
|
4731
|
+
|
|
4732
|
+
|
|
4733
|
+
<tr>
|
|
4734
|
+
|
|
4735
|
+
<td class="name"><code>user_playlist_item_id</code></td>
|
|
4736
|
+
|
|
4737
|
+
|
|
4738
|
+
<td class="type">
|
|
4739
|
+
|
|
4740
|
+
|
|
4741
|
+
<span class="param-type">number</span>
|
|
4742
|
+
|
|
4743
|
+
|
|
4744
|
+
|
|
4745
|
+
|
|
4746
|
+
</td>
|
|
4747
|
+
|
|
4748
|
+
|
|
4749
|
+
|
|
4750
|
+
|
|
4751
|
+
|
|
4752
|
+
<td class="description last">The unique ID of the playlist item to fetch.</td>
|
|
4753
|
+
</tr>
|
|
4754
|
+
|
|
4755
|
+
|
|
4756
|
+
</tbody>
|
|
4757
|
+
</table>
|
|
4758
|
+
|
|
4759
|
+
</td>
|
|
4768
4760
|
</tr>
|
|
4769
4761
|
|
|
4770
4762
|
|
|
@@ -4784,13 +4776,47 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4784
4776
|
|
|
4785
4777
|
|
|
4786
4778
|
|
|
4779
|
+
<h5 class="h5-throws">Throws:</h5>
|
|
4780
|
+
|
|
4781
|
+
|
|
4782
|
+
|
|
4783
|
+
<dl>
|
|
4784
|
+
<dt>
|
|
4785
|
+
<div class="param-desc usertext">
|
|
4786
|
+
- Throws an error if the request encounters issues during retrieval.
|
|
4787
|
+
</div>
|
|
4788
|
+
</dt>
|
|
4789
|
+
<dd></dd>
|
|
4790
|
+
<dt>
|
|
4791
|
+
<dl class="param-type">
|
|
4792
|
+
<dt>
|
|
4793
|
+
Type
|
|
4794
|
+
</dt>
|
|
4795
|
+
<dd>
|
|
4796
|
+
|
|
4797
|
+
<span class="param-type">Error</span>
|
|
4798
|
+
|
|
4799
|
+
|
|
4800
|
+
|
|
4801
|
+
</dd>
|
|
4802
|
+
</dl>
|
|
4803
|
+
</dt>
|
|
4804
|
+
<dd></dd>
|
|
4805
|
+
</dl>
|
|
4806
|
+
|
|
4807
|
+
|
|
4808
|
+
|
|
4787
4809
|
|
|
4788
4810
|
|
|
4789
4811
|
<h5 class="h5-returns">Returns:</h5>
|
|
4790
4812
|
|
|
4791
4813
|
|
|
4792
4814
|
<div class="param-desc">
|
|
4793
|
-
-
|
|
4815
|
+
- A promise that resolves to an object with the fetched playlist item data, including:
|
|
4816
|
+
- `success` (boolean): Indicates if the data retrieval was successful (`true` on success).
|
|
4817
|
+
- `data` (Object): Contains the detailed playlist item data enriched with Sanity and Assignment details, if available.
|
|
4818
|
+
|
|
4819
|
+
Resolves to `null` if the request fails.
|
|
4794
4820
|
</div>
|
|
4795
4821
|
|
|
4796
4822
|
|
|
@@ -4801,7 +4827,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4801
4827
|
</dt>
|
|
4802
4828
|
<dd>
|
|
4803
4829
|
|
|
4804
|
-
<span class="param-type">Promise.<(
|
|
4830
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
4805
4831
|
|
|
4806
4832
|
|
|
4807
4833
|
|
|
@@ -4817,7 +4843,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4817
4843
|
|
|
4818
4844
|
|
|
4819
4845
|
|
|
4820
|
-
<h4 class="name" id=".
|
|
4846
|
+
<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>
|
|
4821
4847
|
|
|
4822
4848
|
|
|
4823
4849
|
|
|
@@ -4827,13 +4853,16 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4827
4853
|
<dl class="details">
|
|
4828
4854
|
|
|
4829
4855
|
<dt class="tag-description">Description:</dt>
|
|
4830
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
4856
|
+
<dd class="tag-description"><ul class="dummy"><li>Retrieves items within a specified playlist by playlist ID.
|
|
4857
|
+
|
|
4858
|
+
This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
|
|
4859
|
+
The server combines data from the playlist and additional metadata from Sanity to enhance item details.</li></ul></dd>
|
|
4831
4860
|
|
|
4832
4861
|
|
|
4833
4862
|
|
|
4834
4863
|
<dt class="tag-source">Source:</dt>
|
|
4835
4864
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4836
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
4865
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line798">line 798</a>
|
|
4837
4866
|
</li></ul></dd>
|
|
4838
4867
|
|
|
4839
4868
|
|
|
@@ -4878,9 +4907,16 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4878
4907
|
|
|
4879
4908
|
|
|
4880
4909
|
|
|
4910
|
+
<h5 class="h5-examples">Example</h5>
|
|
4911
|
+
|
|
4912
|
+
<pre class="prettyprint"><code>fetchPlaylistItems(12345)
|
|
4913
|
+
.then(items => console.log(items))
|
|
4914
|
+
.catch(error => console.error('Error fetching playlist items:', error));</code></pre>
|
|
4881
4915
|
|
|
4882
4916
|
|
|
4883
|
-
|
|
4917
|
+
|
|
4918
|
+
|
|
4919
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
4884
4920
|
|
|
4885
4921
|
|
|
4886
4922
|
<table class="params">
|
|
@@ -4905,7 +4941,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4905
4941
|
|
|
4906
4942
|
<tr>
|
|
4907
4943
|
|
|
4908
|
-
<td class="name"><code>
|
|
4944
|
+
<td class="name"><code>playlistId</code></td>
|
|
4909
4945
|
|
|
4910
4946
|
|
|
4911
4947
|
<td class="type">
|
|
@@ -4914,7 +4950,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4914
4950
|
<span class="param-type">string</span>
|
|
4915
4951
|
|
|
|
4916
4952
|
|
|
4917
|
-
<span class="param-type">
|
|
4953
|
+
<span class="param-type">number</span>
|
|
4918
4954
|
|
|
4919
4955
|
|
|
4920
4956
|
|
|
@@ -4925,7 +4961,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4925
4961
|
|
|
4926
4962
|
|
|
4927
4963
|
|
|
4928
|
-
<td class="description last"
|
|
4964
|
+
<td class="description last">The unique identifier of the playlist whose items are to be fetched.</td>
|
|
4929
4965
|
</tr>
|
|
4930
4966
|
|
|
4931
4967
|
|
|
@@ -4950,6 +4986,10 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4950
4986
|
<h5 class="h5-returns">Returns:</h5>
|
|
4951
4987
|
|
|
4952
4988
|
|
|
4989
|
+
<div class="param-desc">
|
|
4990
|
+
- A promise that resolves to an array of playlist items
|
|
4991
|
+
</div>
|
|
4992
|
+
|
|
4953
4993
|
|
|
4954
4994
|
|
|
4955
4995
|
<dl class="param-type">
|
|
@@ -4958,7 +4998,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4958
4998
|
</dt>
|
|
4959
4999
|
<dd>
|
|
4960
5000
|
|
|
4961
|
-
<span class="param-type">Promise.<
|
|
5001
|
+
<span class="param-type">Promise.<Array.<Object>></span>
|
|
4962
5002
|
|
|
4963
5003
|
|
|
4964
5004
|
|
|
@@ -4974,7 +5014,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4974
5014
|
|
|
4975
5015
|
|
|
4976
5016
|
|
|
4977
|
-
<h4 class="name" id=".
|
|
5017
|
+
<h4 class="name" id=".fetchSongsInProgress"><span class="type-signature type-signature-static">(static) </span>fetchSongsInProgress<span class="signature">(brand)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
4978
5018
|
|
|
4979
5019
|
|
|
4980
5020
|
|
|
@@ -4984,13 +5024,13 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
4984
5024
|
<dl class="details">
|
|
4985
5025
|
|
|
4986
5026
|
<dt class="tag-description">Description:</dt>
|
|
4987
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
5027
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches a list of songs that are currently in progress for the current user.</li></ul></dd>
|
|
4988
5028
|
|
|
4989
5029
|
|
|
4990
5030
|
|
|
4991
5031
|
<dt class="tag-source">Source:</dt>
|
|
4992
5032
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4993
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
5033
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line102">line 102</a>
|
|
4994
5034
|
</li></ul></dd>
|
|
4995
5035
|
|
|
4996
5036
|
|
|
@@ -5035,6 +5075,13 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5035
5075
|
|
|
5036
5076
|
|
|
5037
5077
|
|
|
5078
|
+
<h5 class="h5-examples">Example</h5>
|
|
5079
|
+
|
|
5080
|
+
<pre class="prettyprint"><code>fetchSongsInProgress('drumeo')
|
|
5081
|
+
.then(songs => console.log(songs))
|
|
5082
|
+
.catch(error => console.error(error));</code></pre>
|
|
5083
|
+
|
|
5084
|
+
|
|
5038
5085
|
|
|
5039
5086
|
|
|
5040
5087
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -5062,18 +5109,24 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5062
5109
|
|
|
5063
5110
|
<tr>
|
|
5064
5111
|
|
|
5065
|
-
<td class="name"><code>
|
|
5112
|
+
<td class="name"><code>brand</code></td>
|
|
5066
5113
|
|
|
5067
5114
|
|
|
5068
5115
|
<td class="type">
|
|
5069
5116
|
|
|
5117
|
+
|
|
5118
|
+
<span class="param-type">string</span>
|
|
5119
|
+
|
|
5120
|
+
|
|
5121
|
+
|
|
5122
|
+
|
|
5070
5123
|
</td>
|
|
5071
5124
|
|
|
5072
5125
|
|
|
5073
5126
|
|
|
5074
5127
|
|
|
5075
5128
|
|
|
5076
|
-
<td class="description last">
|
|
5129
|
+
<td class="description last">The brand associated with the songs.</td>
|
|
5077
5130
|
</tr>
|
|
5078
5131
|
|
|
5079
5132
|
|
|
@@ -5098,6 +5151,10 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5098
5151
|
<h5 class="h5-returns">Returns:</h5>
|
|
5099
5152
|
|
|
5100
5153
|
|
|
5154
|
+
<div class="param-desc">
|
|
5155
|
+
- Returns an object containing in-progress songs if found, otherwise null.
|
|
5156
|
+
</div>
|
|
5157
|
+
|
|
5101
5158
|
|
|
5102
5159
|
|
|
5103
5160
|
<dl class="param-type">
|
|
@@ -5106,7 +5163,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5106
5163
|
</dt>
|
|
5107
5164
|
<dd>
|
|
5108
5165
|
|
|
5109
|
-
<span class="param-type">Promise.<(
|
|
5166
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
5110
5167
|
|
|
5111
5168
|
|
|
5112
5169
|
|
|
@@ -5122,7 +5179,7 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5122
5179
|
|
|
5123
5180
|
|
|
5124
5181
|
|
|
5125
|
-
<h4 class="name" id=".
|
|
5182
|
+
<h4 class="name" id=".fetchUserAward"><span class="type-signature type-signature-static">(static) </span>fetchUserAward<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5126
5183
|
|
|
5127
5184
|
|
|
5128
5185
|
|
|
@@ -5132,15 +5189,13 @@ The server combines data from the playlist and additional metadata from Sanity t
|
|
|
5132
5189
|
<dl class="details">
|
|
5133
5190
|
|
|
5134
5191
|
<dt class="tag-description">Description:</dt>
|
|
5135
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
5136
|
-
|
|
5137
|
-
Allows optional pagination, sorting, and search parameters to control the result set.</li></ul></dd>
|
|
5192
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch the user's best award for this challenge</li></ul></dd>
|
|
5138
5193
|
|
|
5139
5194
|
|
|
5140
5195
|
|
|
5141
5196
|
<dt class="tag-source">Source:</dt>
|
|
5142
5197
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
5143
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
5198
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line387">line 387</a>
|
|
5144
5199
|
</li></ul></dd>
|
|
5145
5200
|
|
|
5146
5201
|
|
|
@@ -5185,13 +5240,6 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5185
5240
|
|
|
5186
5241
|
|
|
5187
5242
|
|
|
5188
|
-
<h5 class="h5-examples">Example</h5>
|
|
5189
|
-
|
|
5190
|
-
<pre class="prettyprint"><code>fetchUserPlaylists('drumeo', { page: 1, sort: 'name', searchTerm: 'rock' })
|
|
5191
|
-
.then(playlists => console.log(playlists))
|
|
5192
|
-
.catch(error => console.error(error));</code></pre>
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
5243
|
|
|
5196
5244
|
|
|
5197
5245
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -5207,12 +5255,8 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5207
5255
|
<th>Type</th>
|
|
5208
5256
|
|
|
5209
5257
|
|
|
5210
|
-
<th>Attributes</th>
|
|
5211
|
-
|
|
5212
5258
|
|
|
5213
5259
|
|
|
5214
|
-
<th>Default</th>
|
|
5215
|
-
|
|
5216
5260
|
|
|
5217
5261
|
<th class="last">Description</th>
|
|
5218
5262
|
</tr>
|
|
@@ -5223,235 +5267,1064 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5223
5267
|
|
|
5224
5268
|
<tr>
|
|
5225
5269
|
|
|
5226
|
-
<td class="name"><code>
|
|
5270
|
+
<td class="name"><code>contentId</code></td>
|
|
5227
5271
|
|
|
5228
5272
|
|
|
5229
5273
|
<td class="type">
|
|
5230
5274
|
|
|
5231
|
-
|
|
5232
|
-
<span class="param-type">string</span>
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
5275
|
</td>
|
|
5238
5276
|
|
|
5239
5277
|
|
|
5240
|
-
<td class="attributes">
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
</td>
|
|
5247
|
-
|
|
5248
5278
|
|
|
5249
5279
|
|
|
5250
|
-
<td class="default">
|
|
5251
|
-
|
|
5252
|
-
</td>
|
|
5253
|
-
|
|
5254
5280
|
|
|
5255
|
-
<td class="description last">
|
|
5281
|
+
<td class="description last">railcontent id of the challenge</td>
|
|
5256
5282
|
</tr>
|
|
5257
5283
|
|
|
5258
5284
|
|
|
5285
|
+
</tbody>
|
|
5286
|
+
</table>
|
|
5259
5287
|
|
|
5260
|
-
<tr>
|
|
5261
|
-
|
|
5262
|
-
<td class="name"><code>params.limit</code></td>
|
|
5263
|
-
|
|
5264
5288
|
|
|
5265
|
-
<td class="type">
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
<span class="param-type">number</span>
|
|
5269
5289
|
|
|
5270
5290
|
|
|
5271
5291
|
|
|
5272
|
-
|
|
5273
|
-
</td>
|
|
5274
5292
|
|
|
5275
|
-
|
|
5276
|
-
<td class="attributes">
|
|
5277
|
-
|
|
5278
|
-
<optional><br>
|
|
5279
|
-
|
|
5280
5293
|
|
|
5281
|
-
|
|
5282
5294
|
|
|
5283
|
-
|
|
5284
|
-
</td>
|
|
5285
|
-
|
|
5286
5295
|
|
|
5287
|
-
|
|
5288
|
-
<td class="default">
|
|
5289
|
-
|
|
5290
|
-
<code>10</code>
|
|
5291
|
-
|
|
5292
|
-
</td>
|
|
5293
|
-
|
|
5294
5296
|
|
|
5295
|
-
<td class="description last">The maximum number of playlists to return per page (default is 10).</td>
|
|
5296
|
-
</tr>
|
|
5297
5297
|
|
|
5298
|
-
|
|
5299
5298
|
|
|
5300
|
-
<tr>
|
|
5301
|
-
|
|
5302
|
-
<td class="name"><code>params.page</code></td>
|
|
5303
|
-
|
|
5304
5299
|
|
|
5305
|
-
<td class="type">
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
<span class="param-type">number</span>
|
|
5309
5300
|
|
|
5310
5301
|
|
|
5311
5302
|
|
|
5312
|
-
|
|
5313
|
-
</td>
|
|
5303
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
5314
5304
|
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5305
|
+
|
|
5306
|
+
<div class="param-desc">
|
|
5307
|
+
- streamed PDF
|
|
5308
|
+
</div>
|
|
5320
5309
|
|
|
5321
|
-
|
|
5322
5310
|
|
|
5323
|
-
|
|
5324
|
-
</td>
|
|
5325
|
-
|
|
5326
5311
|
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5312
|
+
<dl class="param-type">
|
|
5313
|
+
<dt>
|
|
5314
|
+
Type
|
|
5315
|
+
</dt>
|
|
5316
|
+
<dd>
|
|
5317
|
+
|
|
5318
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
5334
5319
|
|
|
5335
|
-
|
|
5336
|
-
|
|
5320
|
+
|
|
5321
|
+
|
|
5322
|
+
</dd>
|
|
5323
|
+
</dl>
|
|
5337
5324
|
|
|
5338
5325
|
|
|
5339
5326
|
|
|
5340
|
-
<tr>
|
|
5341
|
-
|
|
5342
|
-
<td class="name"><code>params.sort</code></td>
|
|
5343
|
-
|
|
5344
5327
|
|
|
5345
|
-
|
|
5328
|
+
|
|
5329
|
+
|
|
5346
5330
|
|
|
5347
|
-
|
|
5348
|
-
<span class="param-type">string</span>
|
|
5349
5331
|
|
|
5332
|
+
|
|
5350
5333
|
|
|
5334
|
+
<h4 class="name" id=".fetchUserBadges"><span class="type-signature type-signature-static">(static) </span>fetchUserBadges<span class="signature">(brand)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5351
5335
|
|
|
5352
|
-
|
|
5353
|
-
</td>
|
|
5336
|
+
|
|
5354
5337
|
|
|
5355
|
-
|
|
5356
|
-
<td class="attributes">
|
|
5357
|
-
|
|
5358
|
-
<optional><br>
|
|
5359
|
-
|
|
5360
5338
|
|
|
5361
|
-
|
|
5362
5339
|
|
|
5363
|
-
|
|
5364
|
-
</td>
|
|
5365
|
-
|
|
5366
5340
|
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
</td>
|
|
5373
|
-
|
|
5341
|
+
<dl class="details">
|
|
5342
|
+
|
|
5343
|
+
<dt class="tag-description">Description:</dt>
|
|
5344
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch all completed badges for the user ordered by completion date descending</li></ul></dd>
|
|
5345
|
+
|
|
5374
5346
|
|
|
5375
|
-
|
|
5376
|
-
|
|
5347
|
+
|
|
5348
|
+
<dt class="tag-source">Source:</dt>
|
|
5349
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
5350
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line445">line 445</a>
|
|
5351
|
+
</li></ul></dd>
|
|
5352
|
+
|
|
5377
5353
|
|
|
5378
5354
|
|
|
5379
5355
|
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
<td class="name"><code>params.searchTerm</code></td>
|
|
5383
|
-
|
|
5356
|
+
|
|
5384
5357
|
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
<span class="param-type">string</span>
|
|
5358
|
+
|
|
5389
5359
|
|
|
5360
|
+
|
|
5390
5361
|
|
|
5362
|
+
|
|
5391
5363
|
|
|
5392
|
-
|
|
5393
|
-
</td>
|
|
5364
|
+
|
|
5394
5365
|
|
|
5395
|
-
|
|
5396
|
-
<td class="attributes">
|
|
5397
|
-
|
|
5398
|
-
<optional><br>
|
|
5399
|
-
|
|
5366
|
+
|
|
5400
5367
|
|
|
5401
|
-
|
|
5368
|
+
|
|
5402
5369
|
|
|
5403
|
-
|
|
5404
|
-
</td>
|
|
5405
|
-
|
|
5370
|
+
|
|
5406
5371
|
|
|
5407
|
-
|
|
5408
|
-
<td class="default">
|
|
5409
|
-
|
|
5410
|
-
</td>
|
|
5411
|
-
|
|
5372
|
+
|
|
5412
5373
|
|
|
5413
|
-
|
|
5414
|
-
</tr>
|
|
5374
|
+
|
|
5415
5375
|
|
|
5416
5376
|
|
|
5417
5377
|
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
<td class="name"><code>params.content_id</code></td>
|
|
5421
|
-
|
|
5378
|
+
|
|
5422
5379
|
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
<span class="param-type">int</span>
|
|
5427
|
-
|
|
|
5380
|
+
|
|
5428
5381
|
|
|
5429
|
-
|
|
5382
|
+
|
|
5383
|
+
</dl>
|
|
5430
5384
|
|
|
5431
5385
|
|
|
5432
5386
|
|
|
5433
|
-
|
|
5434
|
-
</td>
|
|
5435
5387
|
|
|
5436
|
-
|
|
5437
|
-
<td class="attributes">
|
|
5438
|
-
|
|
5439
|
-
<optional><br>
|
|
5440
|
-
|
|
5441
5388
|
|
|
5442
|
-
|
|
5443
5389
|
|
|
5390
|
+
|
|
5391
|
+
|
|
5392
|
+
|
|
5393
|
+
|
|
5394
|
+
|
|
5395
|
+
|
|
5396
|
+
|
|
5397
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
5398
|
+
|
|
5399
|
+
|
|
5400
|
+
<table class="params">
|
|
5401
|
+
<thead>
|
|
5402
|
+
<tr>
|
|
5403
|
+
|
|
5404
|
+
<th>Name</th>
|
|
5405
|
+
|
|
5406
|
+
|
|
5407
|
+
<th>Type</th>
|
|
5408
|
+
|
|
5409
|
+
|
|
5410
|
+
|
|
5411
|
+
|
|
5412
|
+
|
|
5413
|
+
<th class="last">Description</th>
|
|
5414
|
+
</tr>
|
|
5415
|
+
</thead>
|
|
5416
|
+
|
|
5417
|
+
<tbody>
|
|
5418
|
+
|
|
5419
|
+
|
|
5420
|
+
<tr>
|
|
5421
|
+
|
|
5422
|
+
<td class="name"><code>brand</code></td>
|
|
5423
|
+
|
|
5424
|
+
|
|
5425
|
+
<td class="type">
|
|
5426
|
+
|
|
5427
|
+
|
|
5428
|
+
<span class="param-type">string</span>
|
|
5429
|
+
|
|
|
5430
|
+
|
|
5431
|
+
<span class="param-type">null</span>
|
|
5432
|
+
|
|
5433
|
+
|
|
5434
|
+
|
|
5435
|
+
|
|
5436
|
+
</td>
|
|
5437
|
+
|
|
5438
|
+
|
|
5439
|
+
|
|
5440
|
+
|
|
5441
|
+
|
|
5442
|
+
<td class="description last">-</td>
|
|
5443
|
+
</tr>
|
|
5444
|
+
|
|
5445
|
+
|
|
5446
|
+
</tbody>
|
|
5447
|
+
</table>
|
|
5448
|
+
|
|
5449
|
+
|
|
5450
|
+
|
|
5451
|
+
|
|
5452
|
+
|
|
5453
|
+
|
|
5454
|
+
|
|
5455
|
+
|
|
5456
|
+
|
|
5457
|
+
|
|
5458
|
+
|
|
5459
|
+
|
|
5460
|
+
|
|
5461
|
+
|
|
5462
|
+
|
|
5463
|
+
|
|
5464
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
5465
|
+
|
|
5466
|
+
|
|
5467
|
+
|
|
5468
|
+
|
|
5469
|
+
<dl class="param-type">
|
|
5470
|
+
<dt>
|
|
5471
|
+
Type
|
|
5472
|
+
</dt>
|
|
5473
|
+
<dd>
|
|
5474
|
+
|
|
5475
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
5476
|
+
|
|
5477
|
+
|
|
5478
|
+
|
|
5479
|
+
</dd>
|
|
5480
|
+
</dl>
|
|
5481
|
+
|
|
5482
|
+
|
|
5483
|
+
|
|
5484
|
+
|
|
5485
|
+
|
|
5486
|
+
|
|
5487
|
+
|
|
5488
|
+
|
|
5489
|
+
|
|
5490
|
+
|
|
5491
|
+
<h4 class="name" id=".fetchUserChallengeProgress"><span class="type-signature type-signature-static">(static) </span>fetchUserChallengeProgress<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5492
|
+
|
|
5493
|
+
|
|
5494
|
+
|
|
5495
|
+
|
|
5496
|
+
|
|
5497
|
+
|
|
5498
|
+
<dl class="details">
|
|
5499
|
+
|
|
5500
|
+
<dt class="tag-description">Description:</dt>
|
|
5501
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch challenge, lesson, and user metadata for a given challenge</li></ul></dd>
|
|
5502
|
+
|
|
5503
|
+
|
|
5504
|
+
|
|
5505
|
+
<dt class="tag-source">Source:</dt>
|
|
5506
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
5507
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line376">line 376</a>
|
|
5508
|
+
</li></ul></dd>
|
|
5509
|
+
|
|
5510
|
+
|
|
5511
|
+
|
|
5512
|
+
|
|
5513
|
+
|
|
5514
|
+
|
|
5515
|
+
|
|
5516
|
+
|
|
5517
|
+
|
|
5518
|
+
|
|
5519
|
+
|
|
5520
|
+
|
|
5521
|
+
|
|
5522
|
+
|
|
5523
|
+
|
|
5524
|
+
|
|
5525
|
+
|
|
5526
|
+
|
|
5527
|
+
|
|
5528
|
+
|
|
5529
|
+
|
|
5530
|
+
|
|
5531
|
+
|
|
5532
|
+
|
|
5533
|
+
|
|
5534
|
+
|
|
5535
|
+
|
|
5536
|
+
|
|
5537
|
+
|
|
5538
|
+
|
|
5539
|
+
|
|
5540
|
+
</dl>
|
|
5541
|
+
|
|
5542
|
+
|
|
5543
|
+
|
|
5544
|
+
|
|
5545
|
+
|
|
5546
|
+
|
|
5547
|
+
|
|
5548
|
+
|
|
5549
|
+
|
|
5550
|
+
|
|
5551
|
+
|
|
5552
|
+
|
|
5553
|
+
|
|
5554
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
5555
|
+
|
|
5556
|
+
|
|
5557
|
+
<table class="params">
|
|
5558
|
+
<thead>
|
|
5559
|
+
<tr>
|
|
5560
|
+
|
|
5561
|
+
<th>Name</th>
|
|
5562
|
+
|
|
5563
|
+
|
|
5564
|
+
<th>Type</th>
|
|
5565
|
+
|
|
5566
|
+
|
|
5567
|
+
|
|
5568
|
+
|
|
5569
|
+
|
|
5570
|
+
<th class="last">Description</th>
|
|
5571
|
+
</tr>
|
|
5572
|
+
</thead>
|
|
5573
|
+
|
|
5574
|
+
<tbody>
|
|
5575
|
+
|
|
5576
|
+
|
|
5577
|
+
<tr>
|
|
5578
|
+
|
|
5579
|
+
<td class="name"><code>contentId</code></td>
|
|
5580
|
+
|
|
5581
|
+
|
|
5582
|
+
<td class="type">
|
|
5583
|
+
|
|
5584
|
+
</td>
|
|
5585
|
+
|
|
5586
|
+
|
|
5587
|
+
|
|
5588
|
+
|
|
5589
|
+
|
|
5590
|
+
<td class="description last">railcontent id of the challenge</td>
|
|
5591
|
+
</tr>
|
|
5592
|
+
|
|
5593
|
+
|
|
5594
|
+
</tbody>
|
|
5595
|
+
</table>
|
|
5596
|
+
|
|
5597
|
+
|
|
5598
|
+
|
|
5599
|
+
|
|
5600
|
+
|
|
5601
|
+
|
|
5602
|
+
|
|
5603
|
+
|
|
5604
|
+
|
|
5605
|
+
|
|
5606
|
+
|
|
5607
|
+
|
|
5608
|
+
|
|
5609
|
+
|
|
5610
|
+
|
|
5611
|
+
|
|
5612
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
5613
|
+
|
|
5614
|
+
|
|
5615
|
+
|
|
5616
|
+
|
|
5617
|
+
<dl class="param-type">
|
|
5618
|
+
<dt>
|
|
5619
|
+
Type
|
|
5620
|
+
</dt>
|
|
5621
|
+
<dd>
|
|
5622
|
+
|
|
5623
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
5624
|
+
|
|
5625
|
+
|
|
5626
|
+
|
|
5627
|
+
</dd>
|
|
5628
|
+
</dl>
|
|
5629
|
+
|
|
5630
|
+
|
|
5631
|
+
|
|
5632
|
+
|
|
5633
|
+
|
|
5634
|
+
|
|
5635
|
+
|
|
5636
|
+
|
|
5637
|
+
|
|
5638
|
+
|
|
5639
|
+
<h4 class="name" id=".fetchUserPlaylists"><span class="type-signature type-signature-static">(static) </span>fetchUserPlaylists<span class="signature">(brand)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
5640
|
+
|
|
5641
|
+
|
|
5642
|
+
|
|
5643
|
+
|
|
5644
|
+
|
|
5645
|
+
|
|
5646
|
+
<dl class="details">
|
|
5647
|
+
|
|
5648
|
+
<dt class="tag-description">Description:</dt>
|
|
5649
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches user playlists for a specific brand.
|
|
5650
|
+
|
|
5651
|
+
Allows optional pagination, sorting, and search parameters to control the result set.</li></ul></dd>
|
|
5652
|
+
|
|
5653
|
+
|
|
5654
|
+
|
|
5655
|
+
<dt class="tag-source">Source:</dt>
|
|
5656
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
5657
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line564">line 564</a>
|
|
5658
|
+
</li></ul></dd>
|
|
5659
|
+
|
|
5660
|
+
|
|
5661
|
+
|
|
5662
|
+
|
|
5663
|
+
|
|
5664
|
+
|
|
5665
|
+
|
|
5666
|
+
|
|
5667
|
+
|
|
5668
|
+
|
|
5669
|
+
|
|
5670
|
+
|
|
5671
|
+
|
|
5672
|
+
|
|
5673
|
+
|
|
5674
|
+
|
|
5675
|
+
|
|
5676
|
+
|
|
5677
|
+
|
|
5678
|
+
|
|
5679
|
+
|
|
5680
|
+
|
|
5681
|
+
|
|
5682
|
+
|
|
5683
|
+
|
|
5684
|
+
|
|
5685
|
+
|
|
5686
|
+
|
|
5687
|
+
|
|
5688
|
+
|
|
5689
|
+
|
|
5690
|
+
</dl>
|
|
5691
|
+
|
|
5692
|
+
|
|
5693
|
+
|
|
5694
|
+
|
|
5695
|
+
|
|
5696
|
+
|
|
5697
|
+
|
|
5698
|
+
|
|
5699
|
+
|
|
5700
|
+
|
|
5701
|
+
|
|
5702
|
+
<h5 class="h5-examples">Example</h5>
|
|
5703
|
+
|
|
5704
|
+
<pre class="prettyprint"><code>fetchUserPlaylists('drumeo', { page: 1, sort: 'name', searchTerm: 'rock' })
|
|
5705
|
+
.then(playlists => console.log(playlists))
|
|
5706
|
+
.catch(error => console.error(error));</code></pre>
|
|
5707
|
+
|
|
5708
|
+
|
|
5709
|
+
|
|
5710
|
+
|
|
5711
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
5712
|
+
|
|
5713
|
+
|
|
5714
|
+
<table class="params">
|
|
5715
|
+
<thead>
|
|
5716
|
+
<tr>
|
|
5717
|
+
|
|
5718
|
+
<th>Name</th>
|
|
5719
|
+
|
|
5720
|
+
|
|
5721
|
+
<th>Type</th>
|
|
5722
|
+
|
|
5723
|
+
|
|
5724
|
+
<th>Attributes</th>
|
|
5725
|
+
|
|
5726
|
+
|
|
5727
|
+
|
|
5728
|
+
<th>Default</th>
|
|
5729
|
+
|
|
5730
|
+
|
|
5731
|
+
<th class="last">Description</th>
|
|
5732
|
+
</tr>
|
|
5733
|
+
</thead>
|
|
5734
|
+
|
|
5735
|
+
<tbody>
|
|
5736
|
+
|
|
5737
|
+
|
|
5738
|
+
<tr>
|
|
5739
|
+
|
|
5740
|
+
<td class="name"><code>brand</code></td>
|
|
5741
|
+
|
|
5742
|
+
|
|
5743
|
+
<td class="type">
|
|
5744
|
+
|
|
5745
|
+
|
|
5746
|
+
<span class="param-type">string</span>
|
|
5747
|
+
|
|
5748
|
+
|
|
5749
|
+
|
|
5750
|
+
|
|
5751
|
+
</td>
|
|
5752
|
+
|
|
5753
|
+
|
|
5754
|
+
<td class="attributes">
|
|
5755
|
+
|
|
5756
|
+
|
|
5757
|
+
|
|
5758
|
+
|
|
5759
|
+
|
|
5760
|
+
</td>
|
|
5761
|
+
|
|
5762
|
+
|
|
5763
|
+
|
|
5764
|
+
<td class="default">
|
|
5765
|
+
|
|
5766
|
+
</td>
|
|
5767
|
+
|
|
5768
|
+
|
|
5769
|
+
<td class="description last">The brand identifier for which playlists are being fetched.</td>
|
|
5770
|
+
</tr>
|
|
5771
|
+
|
|
5772
|
+
|
|
5773
|
+
|
|
5774
|
+
<tr>
|
|
5775
|
+
|
|
5776
|
+
<td class="name"><code>params.limit</code></td>
|
|
5777
|
+
|
|
5778
|
+
|
|
5779
|
+
<td class="type">
|
|
5780
|
+
|
|
5781
|
+
|
|
5782
|
+
<span class="param-type">number</span>
|
|
5783
|
+
|
|
5784
|
+
|
|
5785
|
+
|
|
5786
|
+
|
|
5787
|
+
</td>
|
|
5788
|
+
|
|
5789
|
+
|
|
5790
|
+
<td class="attributes">
|
|
5791
|
+
|
|
5792
|
+
<optional><br>
|
|
5793
|
+
|
|
5794
|
+
|
|
5795
|
+
|
|
5796
|
+
|
|
5797
|
+
|
|
5798
|
+
</td>
|
|
5799
|
+
|
|
5800
|
+
|
|
5801
|
+
|
|
5802
|
+
<td class="default">
|
|
5803
|
+
|
|
5804
|
+
<code>10</code>
|
|
5805
|
+
|
|
5806
|
+
</td>
|
|
5807
|
+
|
|
5808
|
+
|
|
5809
|
+
<td class="description last">The maximum number of playlists to return per page (default is 10).</td>
|
|
5810
|
+
</tr>
|
|
5811
|
+
|
|
5812
|
+
|
|
5813
|
+
|
|
5814
|
+
<tr>
|
|
5815
|
+
|
|
5816
|
+
<td class="name"><code>params.page</code></td>
|
|
5817
|
+
|
|
5818
|
+
|
|
5819
|
+
<td class="type">
|
|
5820
|
+
|
|
5821
|
+
|
|
5822
|
+
<span class="param-type">number</span>
|
|
5823
|
+
|
|
5824
|
+
|
|
5825
|
+
|
|
5826
|
+
|
|
5827
|
+
</td>
|
|
5828
|
+
|
|
5829
|
+
|
|
5830
|
+
<td class="attributes">
|
|
5831
|
+
|
|
5832
|
+
<optional><br>
|
|
5833
|
+
|
|
5834
|
+
|
|
5835
|
+
|
|
5836
|
+
|
|
5837
|
+
|
|
5838
|
+
</td>
|
|
5839
|
+
|
|
5840
|
+
|
|
5841
|
+
|
|
5842
|
+
<td class="default">
|
|
5843
|
+
|
|
5844
|
+
<code>1</code>
|
|
5845
|
+
|
|
5846
|
+
</td>
|
|
5847
|
+
|
|
5848
|
+
|
|
5849
|
+
<td class="description last">The page number for pagination.</td>
|
|
5850
|
+
</tr>
|
|
5851
|
+
|
|
5852
|
+
|
|
5853
|
+
|
|
5854
|
+
<tr>
|
|
5855
|
+
|
|
5856
|
+
<td class="name"><code>params.sort</code></td>
|
|
5857
|
+
|
|
5858
|
+
|
|
5859
|
+
<td class="type">
|
|
5860
|
+
|
|
5861
|
+
|
|
5862
|
+
<span class="param-type">string</span>
|
|
5863
|
+
|
|
5864
|
+
|
|
5865
|
+
|
|
5866
|
+
|
|
5867
|
+
</td>
|
|
5868
|
+
|
|
5869
|
+
|
|
5870
|
+
<td class="attributes">
|
|
5871
|
+
|
|
5872
|
+
<optional><br>
|
|
5873
|
+
|
|
5874
|
+
|
|
5875
|
+
|
|
5876
|
+
|
|
5877
|
+
|
|
5878
|
+
</td>
|
|
5879
|
+
|
|
5880
|
+
|
|
5881
|
+
|
|
5882
|
+
<td class="default">
|
|
5883
|
+
|
|
5884
|
+
<code>'-created_at'</code>
|
|
5885
|
+
|
|
5886
|
+
</td>
|
|
5887
|
+
|
|
5888
|
+
|
|
5889
|
+
<td class="description last">The sorting order for the playlists (default is by created_at in descending order).</td>
|
|
5890
|
+
</tr>
|
|
5891
|
+
|
|
5892
|
+
|
|
5893
|
+
|
|
5894
|
+
<tr>
|
|
5895
|
+
|
|
5896
|
+
<td class="name"><code>params.searchTerm</code></td>
|
|
5897
|
+
|
|
5898
|
+
|
|
5899
|
+
<td class="type">
|
|
5900
|
+
|
|
5901
|
+
|
|
5902
|
+
<span class="param-type">string</span>
|
|
5903
|
+
|
|
5904
|
+
|
|
5905
|
+
|
|
5906
|
+
|
|
5907
|
+
</td>
|
|
5908
|
+
|
|
5909
|
+
|
|
5910
|
+
<td class="attributes">
|
|
5911
|
+
|
|
5912
|
+
<optional><br>
|
|
5913
|
+
|
|
5914
|
+
|
|
5915
|
+
|
|
5916
|
+
|
|
5917
|
+
|
|
5918
|
+
</td>
|
|
5919
|
+
|
|
5920
|
+
|
|
5921
|
+
|
|
5922
|
+
<td class="default">
|
|
5923
|
+
|
|
5924
|
+
</td>
|
|
5925
|
+
|
|
5926
|
+
|
|
5927
|
+
<td class="description last">A search term to filter playlists by name.</td>
|
|
5928
|
+
</tr>
|
|
5929
|
+
|
|
5930
|
+
|
|
5931
|
+
|
|
5932
|
+
<tr>
|
|
5933
|
+
|
|
5934
|
+
<td class="name"><code>params.content_id</code></td>
|
|
5935
|
+
|
|
5936
|
+
|
|
5937
|
+
<td class="type">
|
|
5938
|
+
|
|
5939
|
+
|
|
5940
|
+
<span class="param-type">int</span>
|
|
5941
|
+
|
|
|
5942
|
+
|
|
5943
|
+
<span class="param-type">string</span>
|
|
5944
|
+
|
|
5945
|
+
|
|
5946
|
+
|
|
5947
|
+
|
|
5948
|
+
</td>
|
|
5949
|
+
|
|
5950
|
+
|
|
5951
|
+
<td class="attributes">
|
|
5952
|
+
|
|
5953
|
+
<optional><br>
|
|
5954
|
+
|
|
5955
|
+
|
|
5956
|
+
|
|
5957
|
+
|
|
5958
|
+
|
|
5959
|
+
</td>
|
|
5960
|
+
|
|
5961
|
+
|
|
5962
|
+
|
|
5963
|
+
<td class="default">
|
|
5964
|
+
|
|
5965
|
+
</td>
|
|
5966
|
+
|
|
5967
|
+
|
|
5968
|
+
<td class="description last">If content_id exists, the endpoint checks in each playlist if we have the content in the items.</td>
|
|
5969
|
+
</tr>
|
|
5970
|
+
|
|
5971
|
+
|
|
5972
|
+
</tbody>
|
|
5973
|
+
</table>
|
|
5974
|
+
|
|
5975
|
+
|
|
5976
|
+
|
|
5977
|
+
|
|
5978
|
+
|
|
5979
|
+
|
|
5980
|
+
|
|
5981
|
+
|
|
5982
|
+
|
|
5983
|
+
|
|
5984
|
+
|
|
5985
|
+
|
|
5986
|
+
|
|
5987
|
+
|
|
5988
|
+
|
|
5989
|
+
|
|
5990
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
5991
|
+
|
|
5992
|
+
|
|
5993
|
+
<div class="param-desc">
|
|
5994
|
+
- A promise that resolves to the response from the API, containing the user playlists data.
|
|
5995
|
+
</div>
|
|
5996
|
+
|
|
5997
|
+
|
|
5998
|
+
|
|
5999
|
+
<dl class="param-type">
|
|
6000
|
+
<dt>
|
|
6001
|
+
Type
|
|
6002
|
+
</dt>
|
|
6003
|
+
<dd>
|
|
6004
|
+
|
|
6005
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
6006
|
+
|
|
6007
|
+
|
|
6008
|
+
|
|
6009
|
+
</dd>
|
|
6010
|
+
</dl>
|
|
6011
|
+
|
|
6012
|
+
|
|
6013
|
+
|
|
6014
|
+
|
|
6015
|
+
|
|
6016
|
+
|
|
6017
|
+
|
|
6018
|
+
|
|
6019
|
+
|
|
6020
|
+
|
|
6021
|
+
<h4 class="name" id=".likePlaylist"><span class="type-signature type-signature-static">(static) </span>likePlaylist<span class="signature">(playlistId)</span><span class="type-signature"> → {Promise.<Object>}</span></h4>
|
|
6022
|
+
|
|
6023
|
+
|
|
6024
|
+
|
|
6025
|
+
|
|
6026
|
+
|
|
6027
|
+
|
|
6028
|
+
<dl class="details">
|
|
6029
|
+
|
|
6030
|
+
<dt class="tag-description">Description:</dt>
|
|
6031
|
+
<dd class="tag-description"><ul class="dummy"><li>Sends a request to "like" a playlist on behalf of the authenticated user.
|
|
6032
|
+
|
|
6033
|
+
This function calls the `/playlists/playlist/like` endpoint, where the server validates the `playlist_id` and checks
|
|
6034
|
+
if the authenticated user has already liked the playlist. If not, it creates a new "like" entry associated with the playlist.</li></ul></dd>
|
|
6035
|
+
|
|
6036
|
+
|
|
6037
|
+
|
|
6038
|
+
<dt class="tag-source">Source:</dt>
|
|
6039
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
6040
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line729">line 729</a>
|
|
6041
|
+
</li></ul></dd>
|
|
6042
|
+
|
|
6043
|
+
|
|
6044
|
+
|
|
6045
|
+
|
|
6046
|
+
|
|
6047
|
+
|
|
6048
|
+
|
|
6049
|
+
|
|
6050
|
+
|
|
6051
|
+
|
|
6052
|
+
|
|
6053
|
+
|
|
6054
|
+
|
|
6055
|
+
|
|
6056
|
+
|
|
6057
|
+
|
|
6058
|
+
|
|
6059
|
+
|
|
6060
|
+
|
|
6061
|
+
|
|
6062
|
+
|
|
6063
|
+
|
|
6064
|
+
|
|
6065
|
+
|
|
6066
|
+
|
|
6067
|
+
|
|
6068
|
+
|
|
6069
|
+
|
|
6070
|
+
|
|
6071
|
+
|
|
6072
|
+
|
|
6073
|
+
</dl>
|
|
6074
|
+
|
|
6075
|
+
|
|
6076
|
+
|
|
6077
|
+
|
|
6078
|
+
|
|
6079
|
+
|
|
6080
|
+
|
|
6081
|
+
|
|
6082
|
+
|
|
6083
|
+
|
|
6084
|
+
|
|
6085
|
+
<h5 class="h5-examples">Example</h5>
|
|
6086
|
+
|
|
6087
|
+
<pre class="prettyprint"><code>likePlaylist(12345)
|
|
6088
|
+
.then(response => {
|
|
6089
|
+
if (response.success) {
|
|
6090
|
+
console.log(response.message);
|
|
6091
|
+
}
|
|
6092
|
+
})
|
|
6093
|
+
.catch(error => console.error('Error liking playlist:', error));</code></pre>
|
|
6094
|
+
|
|
6095
|
+
|
|
6096
|
+
|
|
6097
|
+
|
|
6098
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
6099
|
+
|
|
6100
|
+
|
|
6101
|
+
<table class="params">
|
|
6102
|
+
<thead>
|
|
6103
|
+
<tr>
|
|
6104
|
+
|
|
6105
|
+
<th>Name</th>
|
|
6106
|
+
|
|
6107
|
+
|
|
6108
|
+
<th>Type</th>
|
|
6109
|
+
|
|
6110
|
+
|
|
6111
|
+
|
|
6112
|
+
|
|
6113
|
+
|
|
6114
|
+
<th class="last">Description</th>
|
|
6115
|
+
</tr>
|
|
6116
|
+
</thead>
|
|
6117
|
+
|
|
6118
|
+
<tbody>
|
|
6119
|
+
|
|
6120
|
+
|
|
6121
|
+
<tr>
|
|
6122
|
+
|
|
6123
|
+
<td class="name"><code>playlistId</code></td>
|
|
6124
|
+
|
|
6125
|
+
|
|
6126
|
+
<td class="type">
|
|
6127
|
+
|
|
5444
6128
|
|
|
5445
|
-
|
|
6129
|
+
<span class="param-type">string</span>
|
|
6130
|
+
|
|
|
6131
|
+
|
|
6132
|
+
<span class="param-type">number</span>
|
|
6133
|
+
|
|
6134
|
+
|
|
6135
|
+
|
|
5446
6136
|
|
|
6137
|
+
</td>
|
|
5447
6138
|
|
|
5448
6139
|
|
|
5449
|
-
|
|
6140
|
+
|
|
6141
|
+
|
|
6142
|
+
|
|
6143
|
+
<td class="description last">The unique identifier of the playlist to be liked.</td>
|
|
6144
|
+
</tr>
|
|
6145
|
+
|
|
6146
|
+
|
|
6147
|
+
</tbody>
|
|
6148
|
+
</table>
|
|
6149
|
+
|
|
6150
|
+
|
|
6151
|
+
|
|
6152
|
+
|
|
6153
|
+
|
|
6154
|
+
|
|
6155
|
+
|
|
6156
|
+
|
|
6157
|
+
|
|
6158
|
+
|
|
6159
|
+
|
|
6160
|
+
|
|
6161
|
+
|
|
6162
|
+
|
|
6163
|
+
|
|
6164
|
+
|
|
6165
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
6166
|
+
|
|
6167
|
+
|
|
6168
|
+
<div class="param-desc">
|
|
6169
|
+
- A promise that resolves with the response from the API. The response contains:
|
|
6170
|
+
- `success` (boolean): Indicates if the like action was successful (`true` for success).
|
|
6171
|
+
- `message` (string): A success message if the playlist is liked successfully, or a notification if it was already liked.
|
|
6172
|
+
- `like` (Object|null): Details of the created "like" entry if the playlist is newly liked, or null if it was already liked.
|
|
6173
|
+
|
|
6174
|
+
The `like` object in the response includes:
|
|
6175
|
+
- `playlist_id`: The ID of the liked playlist.
|
|
6176
|
+
- `user_id`: The ID of the user who liked the playlist.
|
|
6177
|
+
- `brand`: The brand associated with the like.
|
|
6178
|
+
- `created_at`: Timestamp of when the like was created.
|
|
6179
|
+
</div>
|
|
6180
|
+
|
|
6181
|
+
|
|
6182
|
+
|
|
6183
|
+
<dl class="param-type">
|
|
6184
|
+
<dt>
|
|
6185
|
+
Type
|
|
6186
|
+
</dt>
|
|
6187
|
+
<dd>
|
|
6188
|
+
|
|
6189
|
+
<span class="param-type">Promise.<Object></span>
|
|
6190
|
+
|
|
6191
|
+
|
|
6192
|
+
|
|
6193
|
+
</dd>
|
|
6194
|
+
</dl>
|
|
6195
|
+
|
|
6196
|
+
|
|
6197
|
+
|
|
6198
|
+
|
|
6199
|
+
|
|
6200
|
+
|
|
6201
|
+
|
|
6202
|
+
|
|
6203
|
+
|
|
6204
|
+
|
|
6205
|
+
<h4 class="name" id=".pinPlaylist"><span class="type-signature type-signature-static">(static) </span>pinPlaylist<span class="signature">(playlistId)</span><span class="type-signature"> → {Promise.<Object>}</span></h4>
|
|
6206
|
+
|
|
6207
|
+
|
|
6208
|
+
|
|
6209
|
+
|
|
6210
|
+
|
|
6211
|
+
|
|
6212
|
+
<dl class="details">
|
|
6213
|
+
|
|
6214
|
+
<dt class="tag-description">Description:</dt>
|
|
6215
|
+
<dd class="tag-description"><ul class="dummy"><li>Pins a playlist to the user's playlist menu.</li></ul></dd>
|
|
6216
|
+
|
|
6217
|
+
|
|
6218
|
+
|
|
6219
|
+
<dt class="tag-source">Source:</dt>
|
|
6220
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
6221
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line1024">line 1024</a>
|
|
6222
|
+
</li></ul></dd>
|
|
6223
|
+
|
|
6224
|
+
|
|
6225
|
+
|
|
6226
|
+
|
|
6227
|
+
|
|
6228
|
+
|
|
6229
|
+
|
|
6230
|
+
|
|
6231
|
+
|
|
6232
|
+
|
|
6233
|
+
|
|
6234
|
+
|
|
6235
|
+
|
|
6236
|
+
|
|
6237
|
+
|
|
6238
|
+
|
|
6239
|
+
|
|
6240
|
+
|
|
6241
|
+
|
|
6242
|
+
|
|
6243
|
+
|
|
6244
|
+
|
|
6245
|
+
|
|
6246
|
+
|
|
6247
|
+
|
|
6248
|
+
|
|
6249
|
+
|
|
6250
|
+
|
|
6251
|
+
|
|
6252
|
+
|
|
6253
|
+
|
|
6254
|
+
</dl>
|
|
6255
|
+
|
|
6256
|
+
|
|
6257
|
+
|
|
6258
|
+
|
|
6259
|
+
|
|
6260
|
+
|
|
6261
|
+
|
|
6262
|
+
|
|
6263
|
+
|
|
6264
|
+
|
|
6265
|
+
|
|
6266
|
+
<h5 class="h5-examples">Example</h5>
|
|
6267
|
+
|
|
6268
|
+
<pre class="prettyprint"><code>const playlistId = 123;
|
|
6269
|
+
|
|
6270
|
+
pinPlaylist(playlistId)
|
|
6271
|
+
.then(response => {
|
|
6272
|
+
if (response.success) {
|
|
6273
|
+
console.log("Playlist pinned successfully:", response.message);
|
|
6274
|
+
} else {
|
|
6275
|
+
console.error("Error:", response.error);
|
|
6276
|
+
}
|
|
6277
|
+
})
|
|
6278
|
+
.catch(error => {
|
|
6279
|
+
console.error("Error pinning playlist:", error);
|
|
6280
|
+
});</code></pre>
|
|
6281
|
+
|
|
6282
|
+
|
|
6283
|
+
|
|
6284
|
+
|
|
6285
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
6286
|
+
|
|
6287
|
+
|
|
6288
|
+
<table class="params">
|
|
6289
|
+
<thead>
|
|
6290
|
+
<tr>
|
|
6291
|
+
|
|
6292
|
+
<th>Name</th>
|
|
6293
|
+
|
|
6294
|
+
|
|
6295
|
+
<th>Type</th>
|
|
6296
|
+
|
|
6297
|
+
|
|
6298
|
+
|
|
6299
|
+
|
|
6300
|
+
|
|
6301
|
+
<th class="last">Description</th>
|
|
6302
|
+
</tr>
|
|
6303
|
+
</thead>
|
|
6304
|
+
|
|
6305
|
+
<tbody>
|
|
6306
|
+
|
|
6307
|
+
|
|
6308
|
+
<tr>
|
|
6309
|
+
|
|
6310
|
+
<td class="name"><code>playlistId</code></td>
|
|
6311
|
+
|
|
6312
|
+
|
|
6313
|
+
<td class="type">
|
|
6314
|
+
|
|
5450
6315
|
|
|
5451
|
-
|
|
6316
|
+
<span class="param-type">number</span>
|
|
6317
|
+
|
|
6318
|
+
|
|
6319
|
+
|
|
6320
|
+
|
|
6321
|
+
</td>
|
|
6322
|
+
|
|
5452
6323
|
|
|
5453
6324
|
|
|
5454
|
-
|
|
6325
|
+
|
|
6326
|
+
|
|
6327
|
+
<td class="description last">The ID of the playlist to pin.</td>
|
|
5455
6328
|
</tr>
|
|
5456
6329
|
|
|
5457
6330
|
|
|
@@ -5471,13 +6344,48 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5471
6344
|
|
|
5472
6345
|
|
|
5473
6346
|
|
|
6347
|
+
<h5 class="h5-throws">Throws:</h5>
|
|
6348
|
+
|
|
6349
|
+
|
|
6350
|
+
|
|
6351
|
+
<dl>
|
|
6352
|
+
<dt>
|
|
6353
|
+
<div class="param-desc usertext">
|
|
6354
|
+
- Throws an error if the request fails.
|
|
6355
|
+
</div>
|
|
6356
|
+
</dt>
|
|
6357
|
+
<dd></dd>
|
|
6358
|
+
<dt>
|
|
6359
|
+
<dl class="param-type">
|
|
6360
|
+
<dt>
|
|
6361
|
+
Type
|
|
6362
|
+
</dt>
|
|
6363
|
+
<dd>
|
|
6364
|
+
|
|
6365
|
+
<span class="param-type">Error</span>
|
|
6366
|
+
|
|
6367
|
+
|
|
6368
|
+
|
|
6369
|
+
</dd>
|
|
6370
|
+
</dl>
|
|
6371
|
+
</dt>
|
|
6372
|
+
<dd></dd>
|
|
6373
|
+
</dl>
|
|
6374
|
+
|
|
6375
|
+
|
|
6376
|
+
|
|
5474
6377
|
|
|
5475
6378
|
|
|
5476
6379
|
<h5 class="h5-returns">Returns:</h5>
|
|
5477
6380
|
|
|
5478
6381
|
|
|
5479
6382
|
<div class="param-desc">
|
|
5480
|
-
- A promise that resolves to
|
|
6383
|
+
- A promise that resolves to an object containing:
|
|
6384
|
+
- `success` (boolean): Indicates if the pinning operation was successful (`true` for success).
|
|
6385
|
+
- `message` (string): A success message if the playlist was pinned successfully.
|
|
6386
|
+
- `error` (string): An error message if the pinning operation fails.
|
|
6387
|
+
|
|
6388
|
+
Resolves to an error message if the request fails.
|
|
5481
6389
|
</div>
|
|
5482
6390
|
|
|
5483
6391
|
|
|
@@ -5488,7 +6396,7 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5488
6396
|
</dt>
|
|
5489
6397
|
<dd>
|
|
5490
6398
|
|
|
5491
|
-
<span class="param-type">Promise.<
|
|
6399
|
+
<span class="param-type">Promise.<Object></span>
|
|
5492
6400
|
|
|
5493
6401
|
|
|
5494
6402
|
|
|
@@ -5504,7 +6412,7 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5504
6412
|
|
|
5505
6413
|
|
|
5506
6414
|
|
|
5507
|
-
<h4 class="name" id=".
|
|
6415
|
+
<h4 class="name" id=".postChallengesCommunityNotification"><span class="type-signature type-signature-static">(static) </span>postChallengesCommunityNotification<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5508
6416
|
|
|
5509
6417
|
|
|
5510
6418
|
|
|
@@ -5514,16 +6422,13 @@ Allows optional pagination, sorting, and search parameters to control the result
|
|
|
5514
6422
|
<dl class="details">
|
|
5515
6423
|
|
|
5516
6424
|
<dt class="tag-description">Description:</dt>
|
|
5517
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
5518
|
-
|
|
5519
|
-
This function calls the `/playlists/playlist/like` endpoint, where the server validates the `playlist_id` and checks
|
|
5520
|
-
if the authenticated user has already liked the playlist. If not, it creates a new "like" entry associated with the playlist.</li></ul></dd>
|
|
6425
|
+
<dd class="tag-description"><ul class="dummy"><li>Enable community notifications for the provided challenge</li></ul></dd>
|
|
5521
6426
|
|
|
5522
6427
|
|
|
5523
6428
|
|
|
5524
6429
|
<dt class="tag-source">Source:</dt>
|
|
5525
6430
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
5526
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
6431
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line517">line 517</a>
|
|
5527
6432
|
</li></ul></dd>
|
|
5528
6433
|
|
|
5529
6434
|
|
|
@@ -5568,17 +6473,6 @@ if the authenticated user has already liked the playlist. If not, it creates a n
|
|
|
5568
6473
|
|
|
5569
6474
|
|
|
5570
6475
|
|
|
5571
|
-
<h5 class="h5-examples">Example</h5>
|
|
5572
|
-
|
|
5573
|
-
<pre class="prettyprint"><code>likePlaylist(12345)
|
|
5574
|
-
.then(response => {
|
|
5575
|
-
if (response.success) {
|
|
5576
|
-
console.log(response.message);
|
|
5577
|
-
}
|
|
5578
|
-
})
|
|
5579
|
-
.catch(error => console.error('Error liking playlist:', error));</code></pre>
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
6476
|
|
|
5583
6477
|
|
|
5584
6478
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -5606,16 +6500,16 @@ if the authenticated user has already liked the playlist. If not, it creates a n
|
|
|
5606
6500
|
|
|
5607
6501
|
<tr>
|
|
5608
6502
|
|
|
5609
|
-
<td class="name"><code>
|
|
6503
|
+
<td class="name"><code>contentId</code></td>
|
|
5610
6504
|
|
|
5611
6505
|
|
|
5612
6506
|
<td class="type">
|
|
5613
6507
|
|
|
5614
6508
|
|
|
5615
|
-
<span class="param-type">
|
|
6509
|
+
<span class="param-type">int</span>
|
|
5616
6510
|
|
|
|
5617
6511
|
|
|
5618
|
-
<span class="param-type">
|
|
6512
|
+
<span class="param-type">string</span>
|
|
5619
6513
|
|
|
5620
6514
|
|
|
5621
6515
|
|
|
@@ -5626,7 +6520,7 @@ if the authenticated user has already liked the playlist. If not, it creates a n
|
|
|
5626
6520
|
|
|
5627
6521
|
|
|
5628
6522
|
|
|
5629
|
-
<td class="description last">
|
|
6523
|
+
<td class="description last">railcontent id of the challenge</td>
|
|
5630
6524
|
</tr>
|
|
5631
6525
|
|
|
5632
6526
|
|
|
@@ -5651,19 +6545,6 @@ if the authenticated user has already liked the playlist. If not, it creates a n
|
|
|
5651
6545
|
<h5 class="h5-returns">Returns:</h5>
|
|
5652
6546
|
|
|
5653
6547
|
|
|
5654
|
-
<div class="param-desc">
|
|
5655
|
-
- A promise that resolves with the response from the API. The response contains:
|
|
5656
|
-
- `success` (boolean): Indicates if the like action was successful (`true` for success).
|
|
5657
|
-
- `message` (string): A success message if the playlist is liked successfully, or a notification if it was already liked.
|
|
5658
|
-
- `like` (Object|null): Details of the created "like" entry if the playlist is newly liked, or null if it was already liked.
|
|
5659
|
-
|
|
5660
|
-
The `like` object in the response includes:
|
|
5661
|
-
- `playlist_id`: The ID of the liked playlist.
|
|
5662
|
-
- `user_id`: The ID of the user who liked the playlist.
|
|
5663
|
-
- `brand`: The brand associated with the like.
|
|
5664
|
-
- `created_at`: Timestamp of when the like was created.
|
|
5665
|
-
</div>
|
|
5666
|
-
|
|
5667
6548
|
|
|
5668
6549
|
|
|
5669
6550
|
<dl class="param-type">
|
|
@@ -5672,7 +6553,7 @@ The `like` object in the response includes:
|
|
|
5672
6553
|
</dt>
|
|
5673
6554
|
<dd>
|
|
5674
6555
|
|
|
5675
|
-
<span class="param-type">Promise.<
|
|
6556
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
5676
6557
|
|
|
5677
6558
|
|
|
5678
6559
|
|
|
@@ -5688,7 +6569,7 @@ The `like` object in the response includes:
|
|
|
5688
6569
|
|
|
5689
6570
|
|
|
5690
6571
|
|
|
5691
|
-
<h4 class="name" id=".
|
|
6572
|
+
<h4 class="name" id=".postChallengesCompleteLesson"><span class="type-signature type-signature-static">(static) </span>postChallengesCompleteLesson<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5692
6573
|
|
|
5693
6574
|
|
|
5694
6575
|
|
|
@@ -5698,13 +6579,13 @@ The `like` object in the response includes:
|
|
|
5698
6579
|
<dl class="details">
|
|
5699
6580
|
|
|
5700
6581
|
<dt class="tag-description">Description:</dt>
|
|
5701
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6582
|
+
<dd class="tag-description"><ul class="dummy"><li>Complete the challenge lesson and update challenge progress</li></ul></dd>
|
|
5702
6583
|
|
|
5703
6584
|
|
|
5704
6585
|
|
|
5705
6586
|
<dt class="tag-source">Source:</dt>
|
|
5706
6587
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
5707
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
6588
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line528">line 528</a>
|
|
5708
6589
|
</li></ul></dd>
|
|
5709
6590
|
|
|
5710
6591
|
|
|
@@ -5749,23 +6630,6 @@ The `like` object in the response includes:
|
|
|
5749
6630
|
|
|
5750
6631
|
|
|
5751
6632
|
|
|
5752
|
-
<h5 class="h5-examples">Example</h5>
|
|
5753
|
-
|
|
5754
|
-
<pre class="prettyprint"><code>const playlistId = 123;
|
|
5755
|
-
|
|
5756
|
-
pinPlaylist(playlistId)
|
|
5757
|
-
.then(response => {
|
|
5758
|
-
if (response.success) {
|
|
5759
|
-
console.log("Playlist pinned successfully:", response.message);
|
|
5760
|
-
} else {
|
|
5761
|
-
console.error("Error:", response.error);
|
|
5762
|
-
}
|
|
5763
|
-
})
|
|
5764
|
-
.catch(error => {
|
|
5765
|
-
console.error("Error pinning playlist:", error);
|
|
5766
|
-
});</code></pre>
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
6633
|
|
|
5770
6634
|
|
|
5771
6635
|
<h5 class="h5-parameters">Parameters:</h5>
|
|
@@ -5793,13 +6657,16 @@ pinPlaylist(playlistId)
|
|
|
5793
6657
|
|
|
5794
6658
|
<tr>
|
|
5795
6659
|
|
|
5796
|
-
<td class="name"><code>
|
|
6660
|
+
<td class="name"><code>contentId</code></td>
|
|
5797
6661
|
|
|
5798
6662
|
|
|
5799
6663
|
<td class="type">
|
|
5800
6664
|
|
|
5801
6665
|
|
|
5802
|
-
<span class="param-type">
|
|
6666
|
+
<span class="param-type">int</span>
|
|
6667
|
+
|
|
|
6668
|
+
|
|
6669
|
+
<span class="param-type">string</span>
|
|
5803
6670
|
|
|
5804
6671
|
|
|
5805
6672
|
|
|
@@ -5810,7 +6677,7 @@ pinPlaylist(playlistId)
|
|
|
5810
6677
|
|
|
5811
6678
|
|
|
5812
6679
|
|
|
5813
|
-
<td class="description last">
|
|
6680
|
+
<td class="description last">railcontent id of the challenge</td>
|
|
5814
6681
|
</tr>
|
|
5815
6682
|
|
|
5816
6683
|
|
|
@@ -5830,48 +6697,13 @@ pinPlaylist(playlistId)
|
|
|
5830
6697
|
|
|
5831
6698
|
|
|
5832
6699
|
|
|
5833
|
-
<h5 class="h5-throws">Throws:</h5>
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
<dl>
|
|
5838
|
-
<dt>
|
|
5839
|
-
<div class="param-desc usertext">
|
|
5840
|
-
- Throws an error if the request fails.
|
|
5841
|
-
</div>
|
|
5842
|
-
</dt>
|
|
5843
|
-
<dd></dd>
|
|
5844
|
-
<dt>
|
|
5845
|
-
<dl class="param-type">
|
|
5846
|
-
<dt>
|
|
5847
|
-
Type
|
|
5848
|
-
</dt>
|
|
5849
|
-
<dd>
|
|
5850
|
-
|
|
5851
|
-
<span class="param-type">Error</span>
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
</dd>
|
|
5856
|
-
</dl>
|
|
5857
|
-
</dt>
|
|
5858
|
-
<dd></dd>
|
|
5859
|
-
</dl>
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
6700
|
|
|
5864
6701
|
|
|
5865
6702
|
<h5 class="h5-returns">Returns:</h5>
|
|
5866
6703
|
|
|
5867
6704
|
|
|
5868
6705
|
<div class="param-desc">
|
|
5869
|
-
-
|
|
5870
|
-
- `success` (boolean): Indicates if the pinning operation was successful (`true` for success).
|
|
5871
|
-
- `message` (string): A success message if the playlist was pinned successfully.
|
|
5872
|
-
- `error` (string): An error message if the pinning operation fails.
|
|
5873
|
-
|
|
5874
|
-
Resolves to an error message if the request fails.
|
|
6706
|
+
- Modal data to display
|
|
5875
6707
|
</div>
|
|
5876
6708
|
|
|
5877
6709
|
|
|
@@ -5882,7 +6714,7 @@ Resolves to an error message if the request fails.
|
|
|
5882
6714
|
</dt>
|
|
5883
6715
|
<dd>
|
|
5884
6716
|
|
|
5885
|
-
<span class="param-type">Promise.<
|
|
6717
|
+
<span class="param-type">Promise.<(any|null)></span>
|
|
5886
6718
|
|
|
5887
6719
|
|
|
5888
6720
|
|
|
@@ -5898,7 +6730,7 @@ Resolves to an error message if the request fails.
|
|
|
5898
6730
|
|
|
5899
6731
|
|
|
5900
6732
|
|
|
5901
|
-
<h4 class="name" id=".
|
|
6733
|
+
<h4 class="name" id=".postChallengesEnroll"><span class="type-signature type-signature-static">(static) </span>postChallengesEnroll<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
5902
6734
|
|
|
5903
6735
|
|
|
5904
6736
|
|
|
@@ -5908,13 +6740,14 @@ Resolves to an error message if the request fails.
|
|
|
5908
6740
|
<dl class="details">
|
|
5909
6741
|
|
|
5910
6742
|
<dt class="tag-description">Description:</dt>
|
|
5911
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6743
|
+
<dd class="tag-description"><ul class="dummy"><li>Enroll the user in the given challenge on the challenge published_on date
|
|
6744
|
+
Clears any current progress data for this challenge</li></ul></dd>
|
|
5912
6745
|
|
|
5913
6746
|
|
|
5914
6747
|
|
|
5915
6748
|
<dt class="tag-source">Source:</dt>
|
|
5916
6749
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
5917
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
6750
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line483">line 483</a>
|
|
5918
6751
|
</li></ul></dd>
|
|
5919
6752
|
|
|
5920
6753
|
|
|
@@ -6055,7 +6888,7 @@ Resolves to an error message if the request fails.
|
|
|
6055
6888
|
|
|
6056
6889
|
|
|
6057
6890
|
|
|
6058
|
-
<h4 class="name" id=".
|
|
6891
|
+
<h4 class="name" id=".postChallengesEnrollmentNotification"><span class="type-signature type-signature-static">(static) </span>postChallengesEnrollmentNotification<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6059
6892
|
|
|
6060
6893
|
|
|
6061
6894
|
|
|
@@ -6065,13 +6898,13 @@ Resolves to an error message if the request fails.
|
|
|
6065
6898
|
<dl class="details">
|
|
6066
6899
|
|
|
6067
6900
|
<dt class="tag-description">Description:</dt>
|
|
6068
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6901
|
+
<dd class="tag-description"><ul class="dummy"><li>Enable enrollment notifications for the provided challenge</li></ul></dd>
|
|
6069
6902
|
|
|
6070
6903
|
|
|
6071
6904
|
|
|
6072
6905
|
<dt class="tag-source">Source:</dt>
|
|
6073
6906
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6074
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
6907
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line506">line 506</a>
|
|
6075
6908
|
</li></ul></dd>
|
|
6076
6909
|
|
|
6077
6910
|
|
|
@@ -6188,10 +7021,6 @@ Resolves to an error message if the request fails.
|
|
|
6188
7021
|
<h5 class="h5-returns">Returns:</h5>
|
|
6189
7022
|
|
|
6190
7023
|
|
|
6191
|
-
<div class="param-desc">
|
|
6192
|
-
- Modal data to display
|
|
6193
|
-
</div>
|
|
6194
|
-
|
|
6195
7024
|
|
|
6196
7025
|
|
|
6197
7026
|
<dl class="param-type">
|
|
@@ -6216,7 +7045,7 @@ Resolves to an error message if the request fails.
|
|
|
6216
7045
|
|
|
6217
7046
|
|
|
6218
7047
|
|
|
6219
|
-
<h4 class="name" id=".
|
|
7048
|
+
<h4 class="name" id=".postChallengesHideCompletedBanner"><span class="type-signature type-signature-static">(static) </span>postChallengesHideCompletedBanner<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6220
7049
|
|
|
6221
7050
|
|
|
6222
7051
|
|
|
@@ -6226,14 +7055,13 @@ Resolves to an error message if the request fails.
|
|
|
6226
7055
|
<dl class="details">
|
|
6227
7056
|
|
|
6228
7057
|
<dt class="tag-description">Description:</dt>
|
|
6229
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6230
|
-
Clears any current progress data for this challenge</li></ul></dd>
|
|
7058
|
+
<dd class="tag-description"><ul class="dummy"><li>Hide challenge completed award bannare</li></ul></dd>
|
|
6231
7059
|
|
|
6232
7060
|
|
|
6233
7061
|
|
|
6234
7062
|
<dt class="tag-source">Source:</dt>
|
|
6235
7063
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6236
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7064
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line540">line 540</a>
|
|
6237
7065
|
</li></ul></dd>
|
|
6238
7066
|
|
|
6239
7067
|
|
|
@@ -6374,7 +7202,7 @@ Resolves to an error message if the request fails.
|
|
|
6374
7202
|
|
|
6375
7203
|
|
|
6376
7204
|
|
|
6377
|
-
<h4 class="name" id=".
|
|
7205
|
+
<h4 class="name" id=".postChallengesLeave"><span class="type-signature type-signature-static">(static) </span>postChallengesLeave<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6378
7206
|
|
|
6379
7207
|
|
|
6380
7208
|
|
|
@@ -6384,13 +7212,14 @@ Resolves to an error message if the request fails.
|
|
|
6384
7212
|
<dl class="details">
|
|
6385
7213
|
|
|
6386
7214
|
<dt class="tag-description">Description:</dt>
|
|
6387
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
7215
|
+
<dd class="tag-description"><ul class="dummy"><li>Remove the user from the provided challenge
|
|
7216
|
+
Clears any current progress data for this challenge</li></ul></dd>
|
|
6388
7217
|
|
|
6389
7218
|
|
|
6390
7219
|
|
|
6391
7220
|
<dt class="tag-source">Source:</dt>
|
|
6392
7221
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6393
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7222
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line495">line 495</a>
|
|
6394
7223
|
</li></ul></dd>
|
|
6395
7224
|
|
|
6396
7225
|
|
|
@@ -6531,7 +7360,7 @@ Resolves to an error message if the request fails.
|
|
|
6531
7360
|
|
|
6532
7361
|
|
|
6533
7362
|
|
|
6534
|
-
<h4 class="name" id=".
|
|
7363
|
+
<h4 class="name" id=".postChallengesSetStartDate"><span class="type-signature type-signature-static">(static) </span>postChallengesSetStartDate<span class="signature">(contentId, startDate)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6535
7364
|
|
|
6536
7365
|
|
|
6537
7366
|
|
|
@@ -6541,14 +7370,14 @@ Resolves to an error message if the request fails.
|
|
|
6541
7370
|
<dl class="details">
|
|
6542
7371
|
|
|
6543
7372
|
<dt class="tag-description">Description:</dt>
|
|
6544
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6545
|
-
Clears any
|
|
7373
|
+
<dd class="tag-description"><ul class="dummy"><li>Enroll a user in a challenge and set the start date of the challenge to the provided day.
|
|
7374
|
+
Clears any existing progress data for this challenge</li></ul></dd>
|
|
6546
7375
|
|
|
6547
7376
|
|
|
6548
7377
|
|
|
6549
7378
|
<dt class="tag-source">Source:</dt>
|
|
6550
7379
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6551
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7380
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line459">line 459</a>
|
|
6552
7381
|
</li></ul></dd>
|
|
6553
7382
|
|
|
6554
7383
|
|
|
@@ -6644,6 +7473,30 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
6644
7473
|
</tr>
|
|
6645
7474
|
|
|
6646
7475
|
|
|
7476
|
+
|
|
7477
|
+
<tr>
|
|
7478
|
+
|
|
7479
|
+
<td class="name"><code>startDate</code></td>
|
|
7480
|
+
|
|
7481
|
+
|
|
7482
|
+
<td class="type">
|
|
7483
|
+
|
|
7484
|
+
|
|
7485
|
+
<span class="param-type">string</span>
|
|
7486
|
+
|
|
7487
|
+
|
|
7488
|
+
|
|
7489
|
+
|
|
7490
|
+
</td>
|
|
7491
|
+
|
|
7492
|
+
|
|
7493
|
+
|
|
7494
|
+
|
|
7495
|
+
|
|
7496
|
+
<td class="description last">prefered format YYYYMMDD, but any Carbon parsable string will do.</td>
|
|
7497
|
+
</tr>
|
|
7498
|
+
|
|
7499
|
+
|
|
6647
7500
|
</tbody>
|
|
6648
7501
|
</table>
|
|
6649
7502
|
|
|
@@ -6689,7 +7542,7 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
6689
7542
|
|
|
6690
7543
|
|
|
6691
7544
|
|
|
6692
|
-
<h4 class="name" id=".
|
|
7545
|
+
<h4 class="name" id=".postChallengesUnlock"><span class="type-signature type-signature-static">(static) </span>postChallengesUnlock<span class="signature">(contentId)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6693
7546
|
|
|
6694
7547
|
|
|
6695
7548
|
|
|
@@ -6699,14 +7552,14 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
6699
7552
|
<dl class="details">
|
|
6700
7553
|
|
|
6701
7554
|
<dt class="tag-description">Description:</dt>
|
|
6702
|
-
<dd class="tag-description"><ul class="dummy"><li>Enroll
|
|
6703
|
-
Clears any
|
|
7555
|
+
<dd class="tag-description"><ul class="dummy"><li>Enroll the user in the provided challenge and set to unlocked
|
|
7556
|
+
Clears any current progress data for this challenge</li></ul></dd>
|
|
6704
7557
|
|
|
6705
7558
|
|
|
6706
7559
|
|
|
6707
7560
|
<dt class="tag-source">Source:</dt>
|
|
6708
7561
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6709
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7562
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line471">line 471</a>
|
|
6710
7563
|
</li></ul></dd>
|
|
6711
7564
|
|
|
6712
7565
|
|
|
@@ -6802,30 +7655,6 @@ Clears any existing progress data for this challenge</li></ul></dd>
|
|
|
6802
7655
|
</tr>
|
|
6803
7656
|
|
|
6804
7657
|
|
|
6805
|
-
|
|
6806
|
-
<tr>
|
|
6807
|
-
|
|
6808
|
-
<td class="name"><code>startDate</code></td>
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
<td class="type">
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
<span class="param-type">string</span>
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
</td>
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
<td class="description last">prefered format YYYYMMDD, but any Carbon parsable string will do.</td>
|
|
6826
|
-
</tr>
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
7658
|
</tbody>
|
|
6830
7659
|
</table>
|
|
6831
7660
|
|
|
@@ -6871,7 +7700,7 @@ Clears any existing progress data for this challenge</li></ul></dd>
|
|
|
6871
7700
|
|
|
6872
7701
|
|
|
6873
7702
|
|
|
6874
|
-
<h4 class="name" id=".
|
|
7703
|
+
<h4 class="name" id=".reportPlaylist"><span class="type-signature type-signature-static">(static) </span>reportPlaylist<span class="signature">(playlistId, issue)</span><span class="type-signature"> → {Promise.<(any|null)>}</span></h4>
|
|
6875
7704
|
|
|
6876
7705
|
|
|
6877
7706
|
|
|
@@ -6881,14 +7710,13 @@ Clears any existing progress data for this challenge</li></ul></dd>
|
|
|
6881
7710
|
<dl class="details">
|
|
6882
7711
|
|
|
6883
7712
|
<dt class="tag-description">Description:</dt>
|
|
6884
|
-
<dd class="tag-description"><ul class="dummy"><li>
|
|
6885
|
-
Clears any current progress data for this challenge</li></ul></dd>
|
|
7713
|
+
<dd class="tag-description"><ul class="dummy"><li>Report playlist endpoint</li></ul></dd>
|
|
6886
7714
|
|
|
6887
7715
|
|
|
6888
7716
|
|
|
6889
7717
|
<dt class="tag-source">Source:</dt>
|
|
6890
7718
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
6891
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7719
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line1100">line 1100</a>
|
|
6892
7720
|
</li></ul></dd>
|
|
6893
7721
|
|
|
6894
7722
|
|
|
@@ -6960,19 +7788,28 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
6960
7788
|
|
|
6961
7789
|
<tr>
|
|
6962
7790
|
|
|
6963
|
-
<td class="name"><code>
|
|
7791
|
+
<td class="name"><code>playlistId</code></td>
|
|
6964
7792
|
|
|
6965
7793
|
|
|
6966
7794
|
<td class="type">
|
|
6967
7795
|
|
|
6968
|
-
|
|
6969
|
-
<span class="param-type">int</span>
|
|
6970
|
-
|
|
|
7796
|
+
</td>
|
|
6971
7797
|
|
|
6972
|
-
|
|
7798
|
+
|
|
7799
|
+
|
|
7800
|
+
|
|
6973
7801
|
|
|
7802
|
+
<td class="description last"></td>
|
|
7803
|
+
</tr>
|
|
7804
|
+
|
|
7805
|
+
|
|
6974
7806
|
|
|
7807
|
+
<tr>
|
|
7808
|
+
|
|
7809
|
+
<td class="name"><code>issue</code></td>
|
|
7810
|
+
|
|
6975
7811
|
|
|
7812
|
+
<td class="type">
|
|
6976
7813
|
|
|
6977
7814
|
</td>
|
|
6978
7815
|
|
|
@@ -6980,7 +7817,7 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
6980
7817
|
|
|
6981
7818
|
|
|
6982
7819
|
|
|
6983
|
-
<td class="description last"
|
|
7820
|
+
<td class="description last"></td>
|
|
6984
7821
|
</tr>
|
|
6985
7822
|
|
|
6986
7823
|
|
|
@@ -7045,7 +7882,7 @@ Clears any current progress data for this challenge</li></ul></dd>
|
|
|
7045
7882
|
|
|
7046
7883
|
<dt class="tag-source">Source:</dt>
|
|
7047
7884
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
7048
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
7885
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line1056">line 1056</a>
|
|
7049
7886
|
</li></ul></dd>
|
|
7050
7887
|
|
|
7051
7888
|
|
|
@@ -7258,7 +8095,7 @@ and verifies that the authenticated user is the playlist owner. If authorized, i
|
|
|
7258
8095
|
|
|
7259
8096
|
<dt class="tag-source">Source:</dt>
|
|
7260
8097
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
7261
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
8098
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line666">line 666</a>
|
|
7262
8099
|
</li></ul></dd>
|
|
7263
8100
|
|
|
7264
8101
|
|
|
@@ -7464,7 +8301,7 @@ If the user is unauthorized or the data validation fails, the promise rejects wi
|
|
|
7464
8301
|
|
|
7465
8302
|
<dt class="tag-source">Source:</dt>
|
|
7466
8303
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
7467
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
8304
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line839">line 839</a>
|
|
7468
8305
|
</li></ul></dd>
|
|
7469
8306
|
|
|
7470
8307
|
|
|
@@ -7872,7 +8709,7 @@ Resolves to `null` if the request fails.
|
|
|
7872
8709
|
<br class="clear">
|
|
7873
8710
|
|
|
7874
8711
|
<footer>
|
|
7875
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
8712
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Dec 02 2024 10:19:36 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
7876
8713
|
</footer>
|
|
7877
8714
|
|
|
7878
8715
|
<script>prettyPrint();</script>
|