musora-content-services 1.0.22 → 1.0.23
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 +2 -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 +2 -2
- package/docs/module-Sanity-Services.html +4 -4
- package/docs/railcontent.js.html +2 -2
- package/docs/sanity.js.html +55 -55
- package/package.json +1 -1
- package/src/services/sanity.js +6 -60
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.23](https://github.com/railroadmedia/musora-content-services/compare/v1.0.22...v1.0.23) (2024-08-14)
|
|
6
|
+
|
|
5
7
|
### [1.0.22](https://github.com/railroadmedia/musora-content-services/compare/v1.0.21...v1.0.22) (2024-08-14)
|
|
6
8
|
|
|
7
9
|
### [1.0.21](https://github.com/railroadmedia/musora-content-services/compare/v1.0.19...v1.0.21) (2024-08-14)
|
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></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#.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 Wed Aug 14 2024 03:
|
|
114
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 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></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#.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
|
|
|
@@ -103,7 +103,7 @@ Run the following to execute the tests</p>
|
|
|
103
103
|
<br class="clear">
|
|
104
104
|
|
|
105
105
|
<footer>
|
|
106
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:
|
|
106
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
107
107
|
</footer>
|
|
108
108
|
|
|
109
109
|
<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></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#.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 Wed Aug 14 2024 03:
|
|
659
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 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></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#.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
|
|
|
@@ -738,7 +738,7 @@
|
|
|
738
738
|
<br class="clear">
|
|
739
739
|
|
|
740
740
|
<footer>
|
|
741
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:
|
|
741
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
742
742
|
</footer>
|
|
743
743
|
|
|
744
744
|
<script>prettyPrint();</script>
|
|
@@ -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#line345">line 345</a>
|
|
2227
2227
|
</li></ul></dd>
|
|
2228
2228
|
|
|
2229
2229
|
|
|
@@ -2271,7 +2271,7 @@ ongoing based on the event's duration (`length_in_seconds`).</li></ul></dd>
|
|
|
2271
2271
|
<h5 class="h5-examples">Example</h5>
|
|
2272
2272
|
|
|
2273
2273
|
<pre class="prettyprint"><code>// Example usage:
|
|
2274
|
-
|
|
2274
|
+
fetchLiveEvent('drumeo')
|
|
2275
2275
|
.then(events => console.log(events))
|
|
2276
2276
|
.catch(error => console.error(error));</code></pre>
|
|
2277
2277
|
|
|
@@ -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#line392">line 392</a>
|
|
4555
4555
|
</li></ul></dd>
|
|
4556
4556
|
|
|
4557
4557
|
|
|
@@ -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 Wed Aug 14 2024
|
|
4884
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 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></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#.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
|
|
|
@@ -165,7 +165,7 @@ export async function fetchSongsInProgress(brand) {
|
|
|
165
165
|
<br class="clear">
|
|
166
166
|
|
|
167
167
|
<footer>
|
|
168
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:
|
|
168
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
169
169
|
</footer>
|
|
170
170
|
|
|
171
171
|
<script>prettyPrint();</script>
|
package/docs/sanity.js.html
CHANGED
|
@@ -371,6 +371,60 @@ export async function fetchNewReleases(brand) {
|
|
|
371
371
|
return fetchSanity(query, true);
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
377
|
+
* and are currently ongoing based on their `length_in_seconds`.
|
|
378
|
+
*
|
|
379
|
+
* This function retrieves events that have a `published_on` date within the last 48 hours or are currently
|
|
380
|
+
* ongoing based on the event's duration (`length_in_seconds`).
|
|
381
|
+
*
|
|
382
|
+
* @param {string} brand - The brand for which to fetch upcoming events (e.g., 'drumeo', 'pianote', etc.).
|
|
383
|
+
* @returns {Promise<Array<Object>|null>} - A promise that resolves to an array of event objects or null if no events are found.
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* // Example usage:
|
|
387
|
+
* fetchLiveEvent('drumeo')
|
|
388
|
+
* .then(events => console.log(events))
|
|
389
|
+
* .catch(error => console.error(error));
|
|
390
|
+
*
|
|
391
|
+
*/
|
|
392
|
+
export async function fetchLiveEvent(brand) {
|
|
393
|
+
const baseLiveTypes = ["student-review", "student-reviews", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"];
|
|
394
|
+
const liveTypes = {
|
|
395
|
+
'drumeo': [...baseLiveTypes, "drum-fest-international-2022", "spotlight", "the-history-of-electronic-drums", "backstage-secrets", "quick-tips", "student-collaborations", "live-streams", "podcasts", "solos", "gear-guides", "performances", "in-rhythm", "challenges", "on-the-road", "diy-drum-experiments", "rhythmic-adventures-of-captain-carson", "study-the-greats", "rhythms-from-another-planet", "tama-drums", "paiste-cymbals", "behind-the-scenes", "exploring-beats", "sonor-drums"],
|
|
396
|
+
'pianote': baseLiveTypes,
|
|
397
|
+
'guitareo': [...baseLiveTypes, "archives"],
|
|
398
|
+
'singeo': baseLiveTypes,
|
|
399
|
+
'default': baseLiveTypes
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
const typesString = arrayJoinWithQuotes(liveTypes[brand] ?? liveTypes['default']);
|
|
403
|
+
const now = getSanityDate(new Date());
|
|
404
|
+
const twoDaysAgo = getSanityDate(new Date(Date.now() - 48 * 60 * 60 * 1000)); // 48 hours ago
|
|
405
|
+
|
|
406
|
+
// Adjust the query to filter events based on the calculated time window
|
|
407
|
+
const query = `
|
|
408
|
+
*[_type in [${typesString}] && brand == '${brand}'
|
|
409
|
+
&& published_on > '${twoDaysAgo}'
|
|
410
|
+
|| (published_on <= '${now}' && dateTime(published_on) + length_in_seconds * 1000 > '${now}')
|
|
411
|
+
] {
|
|
412
|
+
"id": railcontent_id,
|
|
413
|
+
title,
|
|
414
|
+
"image": thumbnail.asset->url,
|
|
415
|
+
"artist_name": instructor[0]->name,
|
|
416
|
+
"artists": instructor[]->name,
|
|
417
|
+
difficulty,
|
|
418
|
+
difficulty_string,
|
|
419
|
+
length_in_seconds,
|
|
420
|
+
published_on,
|
|
421
|
+
"type": _type,
|
|
422
|
+
web_url_path,
|
|
423
|
+
} | order(published_on asc)[0]`;
|
|
424
|
+
|
|
425
|
+
return fetchSanity(query, true);
|
|
426
|
+
}
|
|
427
|
+
|
|
374
428
|
/**
|
|
375
429
|
* Fetch upcoming events for a specific brand.
|
|
376
430
|
*
|
|
@@ -410,60 +464,6 @@ export async function fetchUpcomingEvents(brand) {
|
|
|
410
464
|
return fetchSanity(query, true);
|
|
411
465
|
}
|
|
412
466
|
|
|
413
|
-
/**
|
|
414
|
-
* Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
415
|
-
* and are currently ongoing based on their `length_in_seconds`.
|
|
416
|
-
*
|
|
417
|
-
* This function retrieves events that have a `published_on` date within the last 48 hours or are currently
|
|
418
|
-
* ongoing based on the event's duration (`length_in_seconds`).
|
|
419
|
-
*
|
|
420
|
-
* @param {string} brand - The brand for which to fetch upcoming events (e.g., 'drumeo', 'pianote', etc.).
|
|
421
|
-
* @returns {Promise<Array<Object>|null>} - A promise that resolves to an array of event objects or null if no events are found.
|
|
422
|
-
*
|
|
423
|
-
* @example
|
|
424
|
-
* // Example usage:
|
|
425
|
-
* fetchUpcomingEvents('drumeo')
|
|
426
|
-
* .then(events => console.log(events))
|
|
427
|
-
* .catch(error => console.error(error));
|
|
428
|
-
*
|
|
429
|
-
*/
|
|
430
|
-
export async function fetchLiveEvent(brand) {
|
|
431
|
-
const baseLiveTypes = ["student-review", "student-reviews", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"];
|
|
432
|
-
const liveTypes = {
|
|
433
|
-
'drumeo': [...baseLiveTypes, "drum-fest-international-2022", "spotlight", "the-history-of-electronic-drums", "backstage-secrets", "quick-tips", "student-collaborations", "live-streams", "podcasts", "solos", "gear-guides", "performances", "in-rhythm", "challenges", "on-the-road", "diy-drum-experiments", "rhythmic-adventures-of-captain-carson", "study-the-greats", "rhythms-from-another-planet", "tama-drums", "paiste-cymbals", "behind-the-scenes", "exploring-beats", "sonor-drums"],
|
|
434
|
-
'pianote': baseLiveTypes,
|
|
435
|
-
'guitareo': [...baseLiveTypes, "archives"],
|
|
436
|
-
'singeo': baseLiveTypes,
|
|
437
|
-
'default': baseLiveTypes
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
const typesString = arrayJoinWithQuotes(liveTypes[brand] ?? liveTypes['default']);
|
|
441
|
-
const now = getSanityDate(new Date());
|
|
442
|
-
const twoDaysAgo = getSanityDate(new Date(Date.now() - 48 * 60 * 60 * 1000)); // 48 hours ago
|
|
443
|
-
|
|
444
|
-
// Adjust the query to filter events based on the calculated time window
|
|
445
|
-
const query = `
|
|
446
|
-
*[_type in [${typesString}] && brand == '${brand}'
|
|
447
|
-
&& published_on > '${twoDaysAgo}'
|
|
448
|
-
|| (published_on <= '${now}' && dateTime(published_on) + length_in_seconds * 1000 > '${now}')
|
|
449
|
-
] {
|
|
450
|
-
"id": railcontent_id,
|
|
451
|
-
title,
|
|
452
|
-
"image": thumbnail.asset->url,
|
|
453
|
-
"artist_name": instructor[0]->name,
|
|
454
|
-
"artists": instructor[]->name,
|
|
455
|
-
difficulty,
|
|
456
|
-
difficulty_string,
|
|
457
|
-
length_in_seconds,
|
|
458
|
-
published_on,
|
|
459
|
-
"type": _type,
|
|
460
|
-
web_url_path,
|
|
461
|
-
} | order(published_on asc)[0]`;
|
|
462
|
-
|
|
463
|
-
return fetchSanity(query, true);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
|
|
467
467
|
/**
|
|
468
468
|
* Fetch content by a specific Railcontent ID.
|
|
469
469
|
*
|
|
@@ -981,7 +981,7 @@ function checkSanityConfig(config) {
|
|
|
981
981
|
<br class="clear">
|
|
982
982
|
|
|
983
983
|
<footer>
|
|
984
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024
|
|
984
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Aug 14 2024 03:19:48 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
985
985
|
</footer>
|
|
986
986
|
|
|
987
987
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/src/services/sanity.js
CHANGED
|
@@ -351,17 +351,17 @@ export async function fetchLiveEvent(brand) {
|
|
|
351
351
|
'singeo': baseLiveTypes,
|
|
352
352
|
'default': baseLiveTypes
|
|
353
353
|
};
|
|
354
|
-
|
|
354
|
+
|
|
355
355
|
const typesString = arrayJoinWithQuotes(liveTypes[brand] ?? liveTypes['default']);
|
|
356
356
|
const now = getSanityDate(new Date());
|
|
357
357
|
const twoDaysAgo = getSanityDate(new Date(Date.now() - 48 * 60 * 60 * 1000)); // 48 hours ago
|
|
358
|
-
|
|
358
|
+
|
|
359
359
|
// Adjust the query to filter events based on the calculated time window
|
|
360
360
|
const query = `
|
|
361
|
-
|
|
361
|
+
*[_type in [${typesString}] && brand == '${brand}'
|
|
362
362
|
&& published_on > '${twoDaysAgo}'
|
|
363
363
|
|| (published_on <= '${now}' && dateTime(published_on) + length_in_seconds * 1000 > '${now}')
|
|
364
|
-
|
|
364
|
+
] {
|
|
365
365
|
"id": railcontent_id,
|
|
366
366
|
title,
|
|
367
367
|
"image": thumbnail.asset->url,
|
|
@@ -373,8 +373,8 @@ export async function fetchLiveEvent(brand) {
|
|
|
373
373
|
published_on,
|
|
374
374
|
"type": _type,
|
|
375
375
|
web_url_path,
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
} | order(published_on asc)[0]`;
|
|
377
|
+
|
|
378
378
|
return fetchSanity(query, true);
|
|
379
379
|
}
|
|
380
380
|
|
|
@@ -417,60 +417,6 @@ export async function fetchUpcomingEvents(brand) {
|
|
|
417
417
|
return fetchSanity(query, true);
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
/**
|
|
421
|
-
* Fetch upcoming events for a specific brand that are within 48 hours before their `published_on` date
|
|
422
|
-
* and are currently ongoing based on their `length_in_seconds`.
|
|
423
|
-
*
|
|
424
|
-
* This function retrieves events that have a `published_on` date within the last 48 hours or are currently
|
|
425
|
-
* ongoing based on the event's duration (`length_in_seconds`).
|
|
426
|
-
*
|
|
427
|
-
* @param {string} brand - The brand for which to fetch upcoming events (e.g., 'drumeo', 'pianote', etc.).
|
|
428
|
-
* @returns {Promise<Array<Object>|null>} - A promise that resolves to an array of event objects or null if no events are found.
|
|
429
|
-
*
|
|
430
|
-
* @example
|
|
431
|
-
* // Example usage:
|
|
432
|
-
* fetchUpcomingEvents('drumeo')
|
|
433
|
-
* .then(events => console.log(events))
|
|
434
|
-
* .catch(error => console.error(error));
|
|
435
|
-
*
|
|
436
|
-
*/
|
|
437
|
-
export async function fetchLiveEvent(brand) {
|
|
438
|
-
const baseLiveTypes = ["student-review", "student-reviews", "student-focus", "coach-stream", "live", "question-and-answer", "student-review", "boot-camps", "recording", "pack-bundle-lesson"];
|
|
439
|
-
const liveTypes = {
|
|
440
|
-
'drumeo': [...baseLiveTypes, "drum-fest-international-2022", "spotlight", "the-history-of-electronic-drums", "backstage-secrets", "quick-tips", "student-collaborations", "live-streams", "podcasts", "solos", "gear-guides", "performances", "in-rhythm", "challenges", "on-the-road", "diy-drum-experiments", "rhythmic-adventures-of-captain-carson", "study-the-greats", "rhythms-from-another-planet", "tama-drums", "paiste-cymbals", "behind-the-scenes", "exploring-beats", "sonor-drums"],
|
|
441
|
-
'pianote': baseLiveTypes,
|
|
442
|
-
'guitareo': [...baseLiveTypes, "archives"],
|
|
443
|
-
'singeo': baseLiveTypes,
|
|
444
|
-
'default': baseLiveTypes
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
const typesString = arrayJoinWithQuotes(liveTypes[brand] ?? liveTypes['default']);
|
|
448
|
-
const now = getSanityDate(new Date());
|
|
449
|
-
const twoDaysAgo = getSanityDate(new Date(Date.now() - 48 * 60 * 60 * 1000)); // 48 hours ago
|
|
450
|
-
|
|
451
|
-
// Adjust the query to filter events based on the calculated time window
|
|
452
|
-
const query = `
|
|
453
|
-
*[_type in [${typesString}] && brand == '${brand}'
|
|
454
|
-
&& published_on > '${twoDaysAgo}'
|
|
455
|
-
|| (published_on <= '${now}' && dateTime(published_on) + length_in_seconds * 1000 > '${now}')
|
|
456
|
-
] {
|
|
457
|
-
"id": railcontent_id,
|
|
458
|
-
title,
|
|
459
|
-
"image": thumbnail.asset->url,
|
|
460
|
-
"artist_name": instructor[0]->name,
|
|
461
|
-
"artists": instructor[]->name,
|
|
462
|
-
difficulty,
|
|
463
|
-
difficulty_string,
|
|
464
|
-
length_in_seconds,
|
|
465
|
-
published_on,
|
|
466
|
-
"type": _type,
|
|
467
|
-
web_url_path,
|
|
468
|
-
} | order(published_on asc)[0]`;
|
|
469
|
-
|
|
470
|
-
return fetchSanity(query, true);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
420
|
/**
|
|
475
421
|
* Fetch content by a specific Railcontent ID.
|
|
476
422
|
*
|