musora-content-services 1.0.33 → 1.0.35
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/README.md +14 -0
- package/docs/config.js.html +2 -2
- package/docs/index.html +9 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Railcontent-Services.html +153 -108
- package/docs/module-Sanity-Services.html +27 -27
- package/docs/railcontent.js.html +40 -10
- package/docs/sanity.js.html +20 -13
- package/link_mcs.sh +20 -0
- package/package.json +1 -1
- package/publish.sh +0 -0
- package/src/index.js +4 -2
- package/src/services/railcontent.js +38 -7
- package/src/services/sanity.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.35](https://github.com/railroadmedia/musora-content-services/compare/v1.0.34...v1.0.35) (2024-08-15)
|
|
6
|
+
|
|
7
|
+
### [1.0.34](https://github.com/railroadmedia/musora-content-services/compare/v1.0.32...v1.0.34) (2024-08-15)
|
|
8
|
+
|
|
5
9
|
### [1.0.32](https://github.com/railroadmedia/musora-content-services/compare/v1.0.31...v1.0.32) (2024-08-14)
|
|
6
10
|
|
|
7
11
|
### [1.0.31](https://github.com/railroadmedia/musora-content-services/compare/v1.0.30...v1.0.31) (2024-08-14)
|
package/README.md
CHANGED
|
@@ -26,6 +26,20 @@ To publish a new version to NPM run,
|
|
|
26
26
|
./publish.sh
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
## Symlinking
|
|
30
|
+
|
|
31
|
+
To link this package to the MWP repo for local development run,
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
./link_mcs.sh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If either of these commands fail due to permissions,
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
chmod +x <command>
|
|
41
|
+
```
|
|
42
|
+
|
|
29
43
|
## Publish Documentation
|
|
30
44
|
|
|
31
45
|
This repo uses JSDoc to generate API documention. To update the docs, run:
|
package/docs/config.js.html
CHANGED
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -111,7 +111,7 @@ module.exports = {
|
|
|
111
111
|
<br class="clear">
|
|
112
112
|
|
|
113
113
|
<footer>
|
|
114
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
114
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
115
115
|
</footer>
|
|
116
116
|
|
|
117
117
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -78,6 +78,13 @@
|
|
|
78
78
|
<p>To publish a new version to NPM run,</p>
|
|
79
79
|
<pre class="prettyprint source lang-bash"><code>./publish.sh
|
|
80
80
|
</code></pre>
|
|
81
|
+
<h2>Symlinking</h2>
|
|
82
|
+
<p>To link this package to the MWP repo for local development run,</p>
|
|
83
|
+
<pre class="prettyprint source lang-bash"><code>./link_mcs.sh
|
|
84
|
+
</code></pre>
|
|
85
|
+
<p>If either of these commands fail due to permissions,</p>
|
|
86
|
+
<pre class="prettyprint source"><code>chmod +x <command>
|
|
87
|
+
</code></pre>
|
|
81
88
|
<h2>Publish Documentation</h2>
|
|
82
89
|
<p>This repo uses JSDoc to generate API documention. To update the docs, run:</p>
|
|
83
90
|
<pre class="prettyprint source lang-bash"><code>npm run doc
|
|
@@ -103,7 +110,7 @@ Run the following to execute the tests</p>
|
|
|
103
110
|
<br class="clear">
|
|
104
111
|
|
|
105
112
|
<footer>
|
|
106
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
113
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
107
114
|
</footer>
|
|
108
115
|
|
|
109
116
|
<script>prettyPrint();</script>
|
package/docs/module-Config.html
CHANGED
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -656,7 +656,7 @@ initializeService({
|
|
|
656
656
|
<br class="clear">
|
|
657
657
|
|
|
658
658
|
<footer>
|
|
659
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
659
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
660
660
|
</footer>
|
|
661
661
|
|
|
662
662
|
<script>prettyPrint();</script>
|
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
<h4 class="name" id=".fetchAllCompletedStates"><span class="type-signature type-signature-static">(static) </span>fetchAllCompletedStates<span class="signature">(
|
|
87
|
+
<h4 class="name" id=".fetchAllCompletedStates"><span class="type-signature type-signature-static">(static) </span>fetchAllCompletedStates<span class="signature">(contentIds)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
<dt class="tag-source">Source:</dt>
|
|
102
102
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
103
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line53">line 53</a>
|
|
104
104
|
</li></ul></dd>
|
|
105
105
|
|
|
106
106
|
|
|
@@ -177,30 +177,6 @@
|
|
|
177
177
|
<tbody>
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
<tr>
|
|
181
|
-
|
|
182
|
-
<td class="name"><code>userId</code></td>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<td class="type">
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<span class="param-type">string</span>
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
</td>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
<td class="description last">The ID of the current user.</td>
|
|
200
|
-
</tr>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
180
|
<tr>
|
|
205
181
|
|
|
206
182
|
<td class="name"><code>contentIds</code></td>
|
|
@@ -224,30 +200,6 @@
|
|
|
224
200
|
</tr>
|
|
225
201
|
|
|
226
202
|
|
|
227
|
-
|
|
228
|
-
<tr>
|
|
229
|
-
|
|
230
|
-
<td class="name"><code>token</code></td>
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<td class="type">
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<span class="param-type">string</span>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
</td>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<td class="description last">The CSRF token for authentication.</td>
|
|
248
|
-
</tr>
|
|
249
|
-
|
|
250
|
-
|
|
251
203
|
</tbody>
|
|
252
204
|
</table>
|
|
253
205
|
|
|
@@ -297,7 +249,7 @@
|
|
|
297
249
|
|
|
298
250
|
|
|
299
251
|
|
|
300
|
-
<h4 class="name" id=".
|
|
252
|
+
<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>
|
|
301
253
|
|
|
302
254
|
|
|
303
255
|
|
|
@@ -307,13 +259,13 @@
|
|
|
307
259
|
<dl class="details">
|
|
308
260
|
|
|
309
261
|
<dt class="tag-description">Description:</dt>
|
|
310
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches
|
|
262
|
+
<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>
|
|
311
263
|
|
|
312
264
|
|
|
313
265
|
|
|
314
266
|
<dt class="tag-source">Source:</dt>
|
|
315
267
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
316
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
268
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line119">line 119</a>
|
|
317
269
|
</li></ul></dd>
|
|
318
270
|
|
|
319
271
|
|
|
@@ -360,8 +312,8 @@
|
|
|
360
312
|
|
|
361
313
|
<h5 class="h5-examples">Example</h5>
|
|
362
314
|
|
|
363
|
-
<pre class="prettyprint"><code>
|
|
364
|
-
.then(
|
|
315
|
+
<pre class="prettyprint"><code>fetchContentInProgress('song', 'drumeo')
|
|
316
|
+
.then(songs => console.log(songs))
|
|
365
317
|
.catch(error => console.error(error));</code></pre>
|
|
366
318
|
|
|
367
319
|
|
|
@@ -392,31 +344,7 @@
|
|
|
392
344
|
|
|
393
345
|
<tr>
|
|
394
346
|
|
|
395
|
-
<td class="name"><code>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
<td class="type">
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<span class="param-type">string</span>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
</td>
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
<td class="description last">The ID of the current user.</td>
|
|
413
|
-
</tr>
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
<tr>
|
|
418
|
-
|
|
419
|
-
<td class="name"><code>content_id</code></td>
|
|
347
|
+
<td class="name"><code>type</code></td>
|
|
420
348
|
|
|
421
349
|
|
|
422
350
|
<td class="type">
|
|
@@ -433,14 +361,14 @@
|
|
|
433
361
|
|
|
434
362
|
|
|
435
363
|
|
|
436
|
-
<td class="description last">The
|
|
364
|
+
<td class="description last">The content type associated with the content.</td>
|
|
437
365
|
</tr>
|
|
438
366
|
|
|
439
367
|
|
|
440
368
|
|
|
441
369
|
<tr>
|
|
442
370
|
|
|
443
|
-
<td class="name"><code>
|
|
371
|
+
<td class="name"><code>brand</code></td>
|
|
444
372
|
|
|
445
373
|
|
|
446
374
|
<td class="type">
|
|
@@ -457,7 +385,7 @@
|
|
|
457
385
|
|
|
458
386
|
|
|
459
387
|
|
|
460
|
-
<td class="description last">The
|
|
388
|
+
<td class="description last">The brand associated with the content.</td>
|
|
461
389
|
</tr>
|
|
462
390
|
|
|
463
391
|
|
|
@@ -483,7 +411,7 @@
|
|
|
483
411
|
|
|
484
412
|
|
|
485
413
|
<div class="param-desc">
|
|
486
|
-
- Returns
|
|
414
|
+
- Returns an object containing in-progress content if found, otherwise null.
|
|
487
415
|
</div>
|
|
488
416
|
|
|
489
417
|
|
|
@@ -510,7 +438,7 @@
|
|
|
510
438
|
|
|
511
439
|
|
|
512
440
|
|
|
513
|
-
<h4 class="name" id=".
|
|
441
|
+
<h4 class="name" id=".fetchCurrentSongComplete"><span class="type-signature type-signature-static">(static) </span>fetchCurrentSongComplete<span class="signature">(content_id)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
514
442
|
|
|
515
443
|
|
|
516
444
|
|
|
@@ -520,13 +448,13 @@
|
|
|
520
448
|
<dl class="details">
|
|
521
449
|
|
|
522
450
|
<dt class="tag-description">Description:</dt>
|
|
523
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetches
|
|
451
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetches the completion status of a specific song for the current user.</li></ul></dd>
|
|
524
452
|
|
|
525
453
|
|
|
526
454
|
|
|
527
455
|
<dt class="tag-source">Source:</dt>
|
|
528
456
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
529
|
-
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#
|
|
457
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line17">line 17</a>
|
|
530
458
|
</li></ul></dd>
|
|
531
459
|
|
|
532
460
|
|
|
@@ -573,8 +501,8 @@
|
|
|
573
501
|
|
|
574
502
|
<h5 class="h5-examples">Example</h5>
|
|
575
503
|
|
|
576
|
-
<pre class="prettyprint"><code>
|
|
577
|
-
.then(
|
|
504
|
+
<pre class="prettyprint"><code>fetchCurrentSongComplete('user123', 'song456', 'csrf-token')
|
|
505
|
+
.then(status => console.log(status))
|
|
578
506
|
.catch(error => console.error(error));</code></pre>
|
|
579
507
|
|
|
580
508
|
|
|
@@ -605,7 +533,7 @@
|
|
|
605
533
|
|
|
606
534
|
<tr>
|
|
607
535
|
|
|
608
|
-
<td class="name"><code>
|
|
536
|
+
<td class="name"><code>content_id</code></td>
|
|
609
537
|
|
|
610
538
|
|
|
611
539
|
<td class="type">
|
|
@@ -622,38 +550,155 @@
|
|
|
622
550
|
|
|
623
551
|
|
|
624
552
|
|
|
625
|
-
<td class="description last">The ID of the
|
|
553
|
+
<td class="description last">The ID of the song content to check.</td>
|
|
626
554
|
</tr>
|
|
627
555
|
|
|
628
556
|
|
|
557
|
+
</tbody>
|
|
558
|
+
</table>
|
|
629
559
|
|
|
630
|
-
<tr>
|
|
631
|
-
|
|
632
|
-
<td class="name"><code>brand</code></td>
|
|
633
|
-
|
|
634
560
|
|
|
635
|
-
<td class="type">
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
<span class="param-type">string</span>
|
|
639
561
|
|
|
640
562
|
|
|
641
563
|
|
|
642
|
-
|
|
643
|
-
</td>
|
|
644
564
|
|
|
645
|
-
|
|
646
565
|
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
<div class="param-desc">
|
|
579
|
+
- Returns the completion status object if found, otherwise null.
|
|
580
|
+
</div>
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
<dl class="param-type">
|
|
585
|
+
<dt>
|
|
586
|
+
Type
|
|
587
|
+
</dt>
|
|
588
|
+
<dd>
|
|
589
|
+
|
|
590
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
</dd>
|
|
595
|
+
</dl>
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
647
602
|
|
|
648
603
|
|
|
649
|
-
|
|
650
|
-
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
<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>
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
<dl class="details">
|
|
614
|
+
|
|
615
|
+
<dt class="tag-description">Description:</dt>
|
|
616
|
+
<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>
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
<dt class="tag-source">Source:</dt>
|
|
621
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
622
|
+
<a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line85">line 85</a>
|
|
623
|
+
</li></ul></dd>
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
651
635
|
|
|
652
636
|
|
|
653
637
|
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
</dl>
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
<h5 class="h5-examples">Example</h5>
|
|
668
|
+
|
|
669
|
+
<pre class="prettyprint"><code>fetchSongsInProgress('drumeo')
|
|
670
|
+
.then(songs => console.log(songs))
|
|
671
|
+
.catch(error => console.error(error));</code></pre>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
<table class="params">
|
|
680
|
+
<thead>
|
|
681
|
+
<tr>
|
|
682
|
+
|
|
683
|
+
<th>Name</th>
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
<th>Type</th>
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
<th class="last">Description</th>
|
|
693
|
+
</tr>
|
|
694
|
+
</thead>
|
|
695
|
+
|
|
696
|
+
<tbody>
|
|
697
|
+
|
|
698
|
+
|
|
654
699
|
<tr>
|
|
655
700
|
|
|
656
|
-
<td class="name"><code>
|
|
701
|
+
<td class="name"><code>brand</code></td>
|
|
657
702
|
|
|
658
703
|
|
|
659
704
|
<td class="type">
|
|
@@ -670,7 +715,7 @@
|
|
|
670
715
|
|
|
671
716
|
|
|
672
717
|
|
|
673
|
-
<td class="description last">The
|
|
718
|
+
<td class="description last">The brand associated with the songs.</td>
|
|
674
719
|
</tr>
|
|
675
720
|
|
|
676
721
|
|
|
@@ -738,7 +783,7 @@
|
|
|
738
783
|
<br class="clear">
|
|
739
784
|
|
|
740
785
|
<footer>
|
|
741
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
786
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
742
787
|
</footer>
|
|
743
788
|
|
|
744
789
|
<script>prettyPrint();</script>
|
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
<dt class="tag-source">Source:</dt>
|
|
102
102
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
103
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line465">line 465</a>
|
|
104
104
|
</li></ul></dd>
|
|
105
105
|
|
|
106
106
|
|
|
@@ -593,7 +593,7 @@ The filter options are dynamically generated based on the provided filters, styl
|
|
|
593
593
|
|
|
594
594
|
<dt class="tag-source">Source:</dt>
|
|
595
595
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
596
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
596
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line607">line 607</a>
|
|
597
597
|
</li></ul></dd>
|
|
598
598
|
|
|
599
599
|
|
|
@@ -935,7 +935,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
935
935
|
|
|
936
936
|
<dt class="tag-source">Source:</dt>
|
|
937
937
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
938
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
938
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line180">line 180</a>
|
|
939
939
|
</li></ul></dd>
|
|
940
940
|
|
|
941
941
|
|
|
@@ -1401,7 +1401,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1401
1401
|
|
|
1402
1402
|
<dt class="tag-source">Source:</dt>
|
|
1403
1403
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1404
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1404
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line56">line 56</a>
|
|
1405
1405
|
</li></ul></dd>
|
|
1406
1406
|
|
|
1407
1407
|
|
|
@@ -1566,7 +1566,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1566
1566
|
|
|
1567
1567
|
<dt class="tag-source">Source:</dt>
|
|
1568
1568
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1569
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1569
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line398">line 398</a>
|
|
1570
1570
|
</li></ul></dd>
|
|
1571
1571
|
|
|
1572
1572
|
|
|
@@ -1731,7 +1731,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1731
1731
|
|
|
1732
1732
|
<dt class="tag-source">Source:</dt>
|
|
1733
1733
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1734
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1734
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line424">line 424</a>
|
|
1735
1735
|
</li></ul></dd>
|
|
1736
1736
|
|
|
1737
1737
|
|
|
@@ -1896,7 +1896,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1896
1896
|
|
|
1897
1897
|
<dt class="tag-source">Source:</dt>
|
|
1898
1898
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1899
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1899
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line650">line 650</a>
|
|
1900
1900
|
</li></ul></dd>
|
|
1901
1901
|
|
|
1902
1902
|
|
|
@@ -2054,7 +2054,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2054
2054
|
|
|
2055
2055
|
<dt class="tag-source">Source:</dt>
|
|
2056
2056
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2057
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2057
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line728">line 728</a>
|
|
2058
2058
|
</li></ul></dd>
|
|
2059
2059
|
|
|
2060
2060
|
|
|
@@ -2213,7 +2213,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2213
2213
|
<dl class="details">
|
|
2214
2214
|
|
|
2215
2215
|
<dt class="tag-description">Description:</dt>
|
|
2216
|
-
<dd class="tag-description"><ul class="dummy"><li>Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
2216
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
2217
2217
|
and are currently ongoing based on their `length_in_seconds`.
|
|
2218
2218
|
|
|
2219
2219
|
This function retrieves events that have a `published_on` date within the last 48 hours or are currently
|
|
@@ -2223,7 +2223,7 @@ ongoing based on the event's duration (`length_in_seconds`).</li></ul></dd>
|
|
|
2223
2223
|
|
|
2224
2224
|
<dt class="tag-source">Source:</dt>
|
|
2225
2225
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2226
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2226
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line312">line 312</a>
|
|
2227
2227
|
</li></ul></dd>
|
|
2228
2228
|
|
|
2229
2229
|
|
|
@@ -2389,7 +2389,7 @@ fetchLiveEvent('drumeo')
|
|
|
2389
2389
|
|
|
2390
2390
|
<dt class="tag-source">Source:</dt>
|
|
2391
2391
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2392
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2392
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line692">line 692</a>
|
|
2393
2393
|
</li></ul></dd>
|
|
2394
2394
|
|
|
2395
2395
|
|
|
@@ -2547,7 +2547,7 @@ fetchLiveEvent('drumeo')
|
|
|
2547
2547
|
|
|
2548
2548
|
<dt class="tag-source">Source:</dt>
|
|
2549
2549
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2550
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2550
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line671">line 671</a>
|
|
2551
2551
|
</li></ul></dd>
|
|
2552
2552
|
|
|
2553
2553
|
|
|
@@ -2705,7 +2705,7 @@ fetchLiveEvent('drumeo')
|
|
|
2705
2705
|
|
|
2706
2706
|
<dt class="tag-source">Source:</dt>
|
|
2707
2707
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2708
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2708
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line269">line 269</a>
|
|
2709
2709
|
</li></ul></dd>
|
|
2710
2710
|
|
|
2711
2711
|
|
|
@@ -2863,7 +2863,7 @@ fetchLiveEvent('drumeo')
|
|
|
2863
2863
|
|
|
2864
2864
|
<dt class="tag-source">Source:</dt>
|
|
2865
2865
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2866
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2866
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line702">line 702</a>
|
|
2867
2867
|
</li></ul></dd>
|
|
2868
2868
|
|
|
2869
2869
|
|
|
@@ -3021,7 +3021,7 @@ fetchLiveEvent('drumeo')
|
|
|
3021
3021
|
|
|
3022
3022
|
<dt class="tag-source">Source:</dt>
|
|
3023
3023
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3024
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3024
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line782">line 782</a>
|
|
3025
3025
|
</li></ul></dd>
|
|
3026
3026
|
|
|
3027
3027
|
|
|
@@ -3179,7 +3179,7 @@ fetchLiveEvent('drumeo')
|
|
|
3179
3179
|
|
|
3180
3180
|
<dt class="tag-source">Source:</dt>
|
|
3181
3181
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3182
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3182
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line808">line 808</a>
|
|
3183
3183
|
</li></ul></dd>
|
|
3184
3184
|
|
|
3185
3185
|
|
|
@@ -3344,7 +3344,7 @@ fetchLiveEvent('drumeo')
|
|
|
3344
3344
|
|
|
3345
3345
|
<dt class="tag-source">Source:</dt>
|
|
3346
3346
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3347
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3347
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line761">line 761</a>
|
|
3348
3348
|
</li></ul></dd>
|
|
3349
3349
|
|
|
3350
3350
|
|
|
@@ -3526,7 +3526,7 @@ fetchLiveEvent('drumeo')
|
|
|
3526
3526
|
|
|
3527
3527
|
<dt class="tag-source">Source:</dt>
|
|
3528
3528
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3529
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3529
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line87">line 87</a>
|
|
3530
3530
|
</li></ul></dd>
|
|
3531
3531
|
|
|
3532
3532
|
|
|
@@ -3715,7 +3715,7 @@ fetchLiveEvent('drumeo')
|
|
|
3715
3715
|
|
|
3716
3716
|
<dt class="tag-source">Source:</dt>
|
|
3717
3717
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3718
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3718
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line825">line 825</a>
|
|
3719
3719
|
</li></ul></dd>
|
|
3720
3720
|
|
|
3721
3721
|
|
|
@@ -3905,7 +3905,7 @@ fetchSanity(query, true)
|
|
|
3905
3905
|
|
|
3906
3906
|
<dt class="tag-source">Source:</dt>
|
|
3907
3907
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3908
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3908
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line70">line 70</a>
|
|
3909
3909
|
</li></ul></dd>
|
|
3910
3910
|
|
|
3911
3911
|
|
|
@@ -4063,7 +4063,7 @@ fetchSanity(query, true)
|
|
|
4063
4063
|
|
|
4064
4064
|
<dt class="tag-source">Source:</dt>
|
|
4065
4065
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4066
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4066
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line20">line 20</a>
|
|
4067
4067
|
</li></ul></dd>
|
|
4068
4068
|
|
|
4069
4069
|
|
|
@@ -4228,7 +4228,7 @@ fetchSanity(query, true)
|
|
|
4228
4228
|
|
|
4229
4229
|
<dt class="tag-source">Source:</dt>
|
|
4230
4230
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4231
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4231
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line231">line 231</a>
|
|
4232
4232
|
</li></ul></dd>
|
|
4233
4233
|
|
|
4234
4234
|
|
|
@@ -4386,7 +4386,7 @@ fetchSanity(query, true)
|
|
|
4386
4386
|
|
|
4387
4387
|
<dt class="tag-source">Source:</dt>
|
|
4388
4388
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4389
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4389
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line202">line 202</a>
|
|
4390
4390
|
</li></ul></dd>
|
|
4391
4391
|
|
|
4392
4392
|
|
|
@@ -4551,7 +4551,7 @@ fetchSanity(query, true)
|
|
|
4551
4551
|
|
|
4552
4552
|
<dt class="tag-source">Source:</dt>
|
|
4553
4553
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4554
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4554
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line359">line 359</a>
|
|
4555
4555
|
</li></ul></dd>
|
|
4556
4556
|
|
|
4557
4557
|
|
|
@@ -4717,7 +4717,7 @@ This function retrieves the latest workout content for a given brand, fetching u
|
|
|
4717
4717
|
|
|
4718
4718
|
<dt class="tag-source">Source:</dt>
|
|
4719
4719
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4720
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4720
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line247">line 247</a>
|
|
4721
4721
|
</li></ul></dd>
|
|
4722
4722
|
|
|
4723
4723
|
|
|
@@ -4881,7 +4881,7 @@ This function retrieves the latest workout content for a given brand, fetching u
|
|
|
4881
4881
|
<br class="clear">
|
|
4882
4882
|
|
|
4883
4883
|
<footer>
|
|
4884
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
4884
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
4885
4885
|
</footer>
|
|
4886
4886
|
|
|
4887
4887
|
<script>prettyPrint();</script>
|
package/docs/railcontent.js.html
CHANGED
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -54,9 +54,7 @@ const { globalConfig } = require('./config');
|
|
|
54
54
|
/**
|
|
55
55
|
* Fetches the completion status of a specific song for the current user.
|
|
56
56
|
*
|
|
57
|
-
* @param {string} userId - The ID of the current user.
|
|
58
57
|
* @param {string} content_id - The ID of the song content to check.
|
|
59
|
-
* @param {string} token - The CSRF token for authentication.
|
|
60
58
|
* @returns {Promise<Object|null>} - Returns the completion status object if found, otherwise null.
|
|
61
59
|
* @example
|
|
62
60
|
* fetchCurrentSongComplete('user123', 'song456', 'csrf-token')
|
|
@@ -92,9 +90,7 @@ export async function fetchCurrentSongComplete(content_id) {
|
|
|
92
90
|
/**
|
|
93
91
|
* Fetches the completion status for multiple songs for the current user.
|
|
94
92
|
*
|
|
95
|
-
* @param {string} userId - The ID of the current user.
|
|
96
93
|
* @param {Array<string>} contentIds - An array of content IDs to check.
|
|
97
|
-
* @param {string} token - The CSRF token for authentication.
|
|
98
94
|
* @returns {Promise<Object|null>} - Returns an object containing completion statuses keyed by content ID, or null if an error occurs.
|
|
99
95
|
* @example
|
|
100
96
|
* fetchAllCompletedStates('user123', ['song456', 'song789'], 'csrf-token')
|
|
@@ -126,12 +122,10 @@ export async function fetchAllCompletedStates(contentIds) {
|
|
|
126
122
|
/**
|
|
127
123
|
* Fetches a list of songs that are currently in progress for the current user.
|
|
128
124
|
*
|
|
129
|
-
* @param {string} userId - The ID of the current user.
|
|
130
125
|
* @param {string} brand - The brand associated with the songs.
|
|
131
|
-
* @param {string} token - The CSRF token for authentication.
|
|
132
126
|
* @returns {Promise<Object|null>} - Returns an object containing in-progress songs if found, otherwise null.
|
|
133
127
|
* @example
|
|
134
|
-
* fetchSongsInProgress('
|
|
128
|
+
* fetchSongsInProgress('drumeo')
|
|
135
129
|
* .then(songs => console.log(songs))
|
|
136
130
|
* .catch(error => console.error(error));
|
|
137
131
|
*/
|
|
@@ -157,7 +151,43 @@ export async function fetchSongsInProgress(brand) {
|
|
|
157
151
|
return null;
|
|
158
152
|
}
|
|
159
153
|
}
|
|
160
|
-
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Fetches a list of content that is currently in progress for the current user.
|
|
157
|
+
*
|
|
158
|
+
* @param {string} type - The content type associated with the content.
|
|
159
|
+
* @param {string} brand - The brand associated with the content.
|
|
160
|
+
* @returns {Promise<Object|null>} - Returns an object containing in-progress content if found, otherwise null.
|
|
161
|
+
* @example
|
|
162
|
+
* fetchContentInProgress('song', 'drumeo')
|
|
163
|
+
* .then(songs => console.log(songs))
|
|
164
|
+
* .catch(error => console.error(error));
|
|
165
|
+
*/
|
|
166
|
+
export async function fetchContentInProgress(type="all", brand) {
|
|
167
|
+
let url;
|
|
168
|
+
if(type!=="all") {
|
|
169
|
+
url = `/content/in_progress/${globalConfig.railcontentConfig.userId}?brand=${brand}`;
|
|
170
|
+
} else {
|
|
171
|
+
url = `/content/in_progress/${globalConfig.railcontentConfig.userId}?content_type=${type}&brand=${brand}`;
|
|
172
|
+
}
|
|
173
|
+
const headers = {
|
|
174
|
+
'Content-Type': 'application/json',
|
|
175
|
+
'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
|
|
176
|
+
};
|
|
177
|
+
try {
|
|
178
|
+
const response = await fetch(url, { headers });
|
|
179
|
+
const result = await response.json();
|
|
180
|
+
if(result){
|
|
181
|
+
console.log('contentInProgress', result);
|
|
182
|
+
return result;
|
|
183
|
+
} else {
|
|
184
|
+
console.log('result not json');
|
|
185
|
+
}
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.error('Fetch error:', error);
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
}</code></pre>
|
|
161
191
|
</article>
|
|
162
192
|
</section>
|
|
163
193
|
|
|
@@ -171,7 +201,7 @@ export async function fetchSongsInProgress(brand) {
|
|
|
171
201
|
<br class="clear">
|
|
172
202
|
|
|
173
203
|
<footer>
|
|
174
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
204
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
175
205
|
</footer>
|
|
176
206
|
|
|
177
207
|
<script>prettyPrint();</script>
|
package/docs/sanity.js.html
CHANGED
|
@@ -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#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.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#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchChildren">fetchChildren</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#.fetchLiveEvent">fetchLiveEvent</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#.fetchMethodNextLesson">fetchMethodNextLesson</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#.fetchRelatedLessons">fetchRelatedLessons</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#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -48,11 +48,10 @@
|
|
|
48
48
|
<pre class="prettyprint source linenums"><code>/**
|
|
49
49
|
* @module Sanity-Services
|
|
50
50
|
*/
|
|
51
|
+
import {contentTypeConfig} from "../contentTypeConfig";
|
|
52
|
+
import {globalConfig} from "./config";
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
const { globalConfig } = require('./config');
|
|
54
|
-
|
|
55
|
-
import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent.js';
|
|
54
|
+
import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent.js';
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
57
|
* Fetch a song by its document ID from Sanity.
|
|
@@ -67,6 +66,10 @@ import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent
|
|
|
67
66
|
*/
|
|
68
67
|
export async function fetchSongById(documentId) {
|
|
69
68
|
const fields = [
|
|
69
|
+
'"id": railcontent_id',
|
|
70
|
+
'railcontent_id',
|
|
71
|
+
'"type": _type',
|
|
72
|
+
'description',
|
|
70
73
|
'title',
|
|
71
74
|
'"thumbnail_url": thumbnail.asset->url',
|
|
72
75
|
'"style": genre[0]->name',
|
|
@@ -75,8 +78,9 @@ export async function fetchSongById(documentId) {
|
|
|
75
78
|
'instrumentless',
|
|
76
79
|
'soundslice',
|
|
77
80
|
'"resources": resource[]{resource_url, resource_name}',
|
|
81
|
+
'"url": web_url_path',
|
|
78
82
|
];
|
|
79
|
-
|
|
83
|
+
|
|
80
84
|
const query = `
|
|
81
85
|
*[_type == "song" && railcontent_id == ${documentId}]{
|
|
82
86
|
${fields.join(', ')}
|
|
@@ -191,11 +195,11 @@ export async function fetchRelatedSongs(brand, songId) {
|
|
|
191
195
|
}[0...10])
|
|
192
196
|
])[0...10]
|
|
193
197
|
}`;
|
|
194
|
-
|
|
198
|
+
|
|
195
199
|
// Fetch the related songs data
|
|
196
200
|
return fetchSanity(query, false);
|
|
197
201
|
}
|
|
198
|
-
|
|
202
|
+
|
|
199
203
|
/**
|
|
200
204
|
* Fetch all songs for a specific brand with pagination and search options.
|
|
201
205
|
* @param {string} brand - The brand for which to fetch songs.
|
|
@@ -336,7 +340,7 @@ export async function fetchNewReleases(brand) {
|
|
|
336
340
|
|
|
337
341
|
|
|
338
342
|
/**
|
|
339
|
-
* Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
343
|
+
* Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
340
344
|
* and are currently ongoing based on their `length_in_seconds`.
|
|
341
345
|
*
|
|
342
346
|
* This function retrieves events that have a `published_on` date within the last 48 hours or are currently
|
|
@@ -350,7 +354,7 @@ export async function fetchNewReleases(brand) {
|
|
|
350
354
|
* fetchLiveEvent('drumeo')
|
|
351
355
|
* .then(events => console.log(events))
|
|
352
356
|
* .catch(error => console.error(error));
|
|
353
|
-
*
|
|
357
|
+
*
|
|
354
358
|
*/
|
|
355
359
|
export async function fetchLiveEvent(brand) {
|
|
356
360
|
const baseLiveTypes = ["student-review", "student-reviews", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"];
|
|
@@ -512,7 +516,7 @@ export async function fetchAll(brand, type, {
|
|
|
512
516
|
sort = "-published_on",
|
|
513
517
|
includedFields = [],
|
|
514
518
|
groupBy = ""
|
|
515
|
-
}) {
|
|
519
|
+
} = {}) {
|
|
516
520
|
let config = contentTypeConfig[type] ?? {};
|
|
517
521
|
let additionalFields = config?.fields ?? [];
|
|
518
522
|
let isGroupByOneToOne = (groupBy ? config?.relationships[groupBy]?.isOneToOne : false) ?? false;
|
|
@@ -558,7 +562,10 @@ export async function fetchAll(brand, type, {
|
|
|
558
562
|
break;
|
|
559
563
|
}
|
|
560
564
|
|
|
561
|
-
let defaultFields = [
|
|
565
|
+
let defaultFields = [
|
|
566
|
+
'"id": railcontent_id',
|
|
567
|
+
'railcontent_id',
|
|
568
|
+
'"type": _type',
|
|
562
569
|
'title',
|
|
563
570
|
'"image": thumbnail.asset->url',
|
|
564
571
|
'difficulty',
|
|
@@ -944,7 +951,7 @@ function checkSanityConfig(config) {
|
|
|
944
951
|
<br class="clear">
|
|
945
952
|
|
|
946
953
|
<footer>
|
|
947
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
954
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Aug 15 2024 22:11:38 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
948
955
|
</footer>
|
|
949
956
|
|
|
950
957
|
<script>prettyPrint();</script>
|
package/link_mcs.sh
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Define the paths (edit these paths according to your directory structure)
|
|
4
|
+
MUSORA_CONTENT_SERVICES_DIR="../musora-content-services"
|
|
5
|
+
MUSORA_WEB_PLATFORM_DIR="../musora-web-platform"
|
|
6
|
+
|
|
7
|
+
# Navigate to the musora-content-services directory and create a symlink
|
|
8
|
+
echo "Linking musora-content-services..."
|
|
9
|
+
cd "$MUSORA_CONTENT_SERVICES_DIR" || { echo "Directory not found: $MUSORA_CONTENT_SERVICES_DIR"; exit 1; }
|
|
10
|
+
npm link
|
|
11
|
+
|
|
12
|
+
# Navigate to the musora-web-platform directory and link the package
|
|
13
|
+
echo "Linking musora-content-services to musora-web-platform..."
|
|
14
|
+
cd "$MUSORA_WEB_PLATFORM_DIR" || { echo "Directory not found: $MUSORA_WEB_PLATFORM_DIR"; exit 1; }
|
|
15
|
+
npm link musora-content-services
|
|
16
|
+
|
|
17
|
+
echo "Symlink created successfully. You can now test your changes locally."
|
|
18
|
+
|
|
19
|
+
# Optional: List the linked packages to verify
|
|
20
|
+
npm ls musora-content-services
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
File without changes
|
package/src/index.js
CHANGED
|
@@ -27,7 +27,8 @@ import {
|
|
|
27
27
|
|
|
28
28
|
import {
|
|
29
29
|
fetchCurrentSongComplete,
|
|
30
|
-
fetchAllCompletedStates
|
|
30
|
+
fetchAllCompletedStates,
|
|
31
|
+
fetchContentInProgress
|
|
31
32
|
} from './services/railcontent.js';
|
|
32
33
|
|
|
33
34
|
|
|
@@ -56,5 +57,6 @@ export {
|
|
|
56
57
|
fetchPackChildren,
|
|
57
58
|
fetchLessonContent,
|
|
58
59
|
fetchCurrentSongComplete,
|
|
59
|
-
fetchAllCompletedStates
|
|
60
|
+
fetchAllCompletedStates,
|
|
61
|
+
fetchContentInProgress
|
|
60
62
|
}
|
|
@@ -7,9 +7,7 @@ const { globalConfig } = require('./config');
|
|
|
7
7
|
/**
|
|
8
8
|
* Fetches the completion status of a specific song for the current user.
|
|
9
9
|
*
|
|
10
|
-
* @param {string} userId - The ID of the current user.
|
|
11
10
|
* @param {string} content_id - The ID of the song content to check.
|
|
12
|
-
* @param {string} token - The CSRF token for authentication.
|
|
13
11
|
* @returns {Promise<Object|null>} - Returns the completion status object if found, otherwise null.
|
|
14
12
|
* @example
|
|
15
13
|
* fetchCurrentSongComplete('user123', 'song456', 'csrf-token')
|
|
@@ -45,9 +43,7 @@ export async function fetchCurrentSongComplete(content_id) {
|
|
|
45
43
|
/**
|
|
46
44
|
* Fetches the completion status for multiple songs for the current user.
|
|
47
45
|
*
|
|
48
|
-
* @param {string} userId - The ID of the current user.
|
|
49
46
|
* @param {Array<string>} contentIds - An array of content IDs to check.
|
|
50
|
-
* @param {string} token - The CSRF token for authentication.
|
|
51
47
|
* @returns {Promise<Object|null>} - Returns an object containing completion statuses keyed by content ID, or null if an error occurs.
|
|
52
48
|
* @example
|
|
53
49
|
* fetchAllCompletedStates('user123', ['song456', 'song789'], 'csrf-token')
|
|
@@ -79,12 +75,10 @@ export async function fetchAllCompletedStates(contentIds) {
|
|
|
79
75
|
/**
|
|
80
76
|
* Fetches a list of songs that are currently in progress for the current user.
|
|
81
77
|
*
|
|
82
|
-
* @param {string} userId - The ID of the current user.
|
|
83
78
|
* @param {string} brand - The brand associated with the songs.
|
|
84
|
-
* @param {string} token - The CSRF token for authentication.
|
|
85
79
|
* @returns {Promise<Object|null>} - Returns an object containing in-progress songs if found, otherwise null.
|
|
86
80
|
* @example
|
|
87
|
-
* fetchSongsInProgress('
|
|
81
|
+
* fetchSongsInProgress('drumeo')
|
|
88
82
|
* .then(songs => console.log(songs))
|
|
89
83
|
* .catch(error => console.error(error));
|
|
90
84
|
*/
|
|
@@ -110,3 +104,40 @@ export async function fetchSongsInProgress(brand) {
|
|
|
110
104
|
return null;
|
|
111
105
|
}
|
|
112
106
|
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Fetches a list of content that is currently in progress for the current user.
|
|
110
|
+
*
|
|
111
|
+
* @param {string} type - The content type associated with the content.
|
|
112
|
+
* @param {string} brand - The brand associated with the content.
|
|
113
|
+
* @returns {Promise<Object|null>} - Returns an object containing in-progress content if found, otherwise null.
|
|
114
|
+
* @example
|
|
115
|
+
* fetchContentInProgress('song', 'drumeo')
|
|
116
|
+
* .then(songs => console.log(songs))
|
|
117
|
+
* .catch(error => console.error(error));
|
|
118
|
+
*/
|
|
119
|
+
export async function fetchContentInProgress(type="all", brand) {
|
|
120
|
+
let url;
|
|
121
|
+
if(type!=="all") {
|
|
122
|
+
url = `/content/in_progress/${globalConfig.railcontentConfig.userId}?brand=${brand}`;
|
|
123
|
+
} else {
|
|
124
|
+
url = `/content/in_progress/${globalConfig.railcontentConfig.userId}?content_type=${type}&brand=${brand}`;
|
|
125
|
+
}
|
|
126
|
+
const headers = {
|
|
127
|
+
'Content-Type': 'application/json',
|
|
128
|
+
'X-CSRF-TOKEN': globalConfig.railcontentConfig.token
|
|
129
|
+
};
|
|
130
|
+
try {
|
|
131
|
+
const response = await fetch(url, { headers });
|
|
132
|
+
const result = await response.json();
|
|
133
|
+
if(result){
|
|
134
|
+
console.log('contentInProgress', result);
|
|
135
|
+
return result;
|
|
136
|
+
} else {
|
|
137
|
+
console.log('result not json');
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
console.error('Fetch error:', error);
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
}
|
package/src/services/sanity.js
CHANGED
|
@@ -469,7 +469,7 @@ export async function fetchAll(brand, type, {
|
|
|
469
469
|
sort = "-published_on",
|
|
470
470
|
includedFields = [],
|
|
471
471
|
groupBy = ""
|
|
472
|
-
}) {
|
|
472
|
+
} = {}) {
|
|
473
473
|
let config = contentTypeConfig[type] ?? {};
|
|
474
474
|
let additionalFields = config?.fields ?? [];
|
|
475
475
|
let isGroupByOneToOne = (groupBy ? config?.relationships[groupBy]?.isOneToOne : false) ?? false;
|