musora-content-services 2.3.12 → 2.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.coderabbit.yaml +0 -0
  2. package/.editorconfig +0 -0
  3. package/.github/workflows/node.js.yml +0 -0
  4. package/.prettierignore +0 -0
  5. package/.prettierrc +0 -0
  6. package/CHANGELOG.md +2 -0
  7. package/README.md +0 -0
  8. package/babel.config.cjs +0 -0
  9. package/docs/Content-Organization.html +0 -0
  10. package/docs/UserManagement.html +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  18. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  28. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  29. package/docs/global.html#User +0 -0
  30. package/docs/module-Session-Management.html +0 -0
  31. package/docs/module-User-Management.html +0 -0
  32. package/docs/module-User-Permissions.html +0 -0
  33. package/docs/scripts/collapse.js +0 -0
  34. package/docs/scripts/commonNav.js +0 -0
  35. package/docs/scripts/linenumber.js +0 -0
  36. package/docs/scripts/nav.js +0 -0
  37. package/docs/scripts/polyfill.js +0 -0
  38. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  39. package/docs/scripts/prettify/lang-css.js +0 -0
  40. package/docs/scripts/prettify/prettify.js +0 -0
  41. package/docs/scripts/search.js +0 -0
  42. package/docs/styles/jsdoc.css +0 -0
  43. package/docs/styles/prettify.css +0 -0
  44. package/docs/types.js.html +0 -0
  45. package/docs/user_user-management.js.html +0 -0
  46. package/jest.config.js +0 -0
  47. package/link_mcs.sh +0 -0
  48. package/package.json +1 -1
  49. package/src/contentMetaData.js +0 -0
  50. package/src/filterBuilder.js +0 -0
  51. package/src/lib/httpHelper.js +0 -0
  52. package/src/lib/lastUpdated.js +0 -0
  53. package/src/services/api/types.js +0 -0
  54. package/src/services/config.js +0 -0
  55. package/src/services/content-org/content-org.js +0 -0
  56. package/src/services/content-org/playlists-types.js +0 -0
  57. package/src/services/content-org/playlists.js +0 -0
  58. package/src/services/content.js +0 -0
  59. package/src/services/contentProgress.js +0 -0
  60. package/src/services/dataContext.js +0 -0
  61. package/src/services/dateUtils.js +0 -0
  62. package/src/services/forum.js +0 -0
  63. package/src/services/gamification/awards.js +0 -0
  64. package/src/services/gamification/gamification.js +0 -0
  65. package/src/services/gamification/types.js +0 -0
  66. package/src/services/imageSRCBuilder.js +0 -0
  67. package/src/services/imageSRCVerify.js +0 -0
  68. package/src/services/recommendations.js +9 -7
  69. package/src/services/types.js +0 -0
  70. package/src/services/user/management.js +0 -0
  71. package/src/services/user/permissions.js +0 -0
  72. package/src/services/user/sessions.js +0 -0
  73. package/src/services/user/types.js +0 -0
  74. package/src/services/user/user-management-system.js +0 -0
  75. package/test/content.test.js +0 -0
  76. package/test/contentLikes.test.js +0 -0
  77. package/test/contentProgress.test.js +0 -0
  78. package/test/dataContext.test.js +0 -0
  79. package/test/forum.test.js +0 -0
  80. package/test/imageSRCBuilder.test.js +0 -0
  81. package/test/imageSRCVerify.test.js +0 -0
  82. package/test/initializeTests.js +0 -0
  83. package/test/lib/lastUpdated.test.js +0 -0
  84. package/test/live/contentProgressLive.test.js +0 -0
  85. package/test/live/railcontentLive.test.js +0 -0
  86. package/test/localStorageMock.js +0 -0
  87. package/test/log.js +0 -0
  88. package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
  89. package/test/mockData/mockData_user_practices.json +0 -0
  90. package/test/sanityQueryService.test.js +0 -0
  91. package/test/streakMessage.test.js +0 -0
  92. package/test/user/permissions.test.js +0 -0
  93. package/test/userActivity.test.js +0 -0
  94. package/tools/generate-index.cjs +0 -0
  95. package/.yarnrc.yml +0 -1
  96. package/docs/module-Content-Services.html +0 -763
package/.coderabbit.yaml CHANGED
File without changes
package/.editorconfig CHANGED
File without changes
File without changes
package/.prettierignore CHANGED
File without changes
package/.prettierrc CHANGED
File without changes
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
+ ### [2.3.13](https://github.com/railroadmedia/musora-content-services/compare/v2.3.12...v2.3.13) (2025-04-10)
6
+
5
7
  ### [2.3.12](https://github.com/railroadmedia/musora-content-services/compare/v2.3.11...v2.3.12) (2025-04-10)
6
8
 
7
9
  ### [2.3.11](https://github.com/railroadmedia/musora-content-services/compare/v2.3.9...v2.3.11) (2025-04-09)
package/README.md CHANGED
File without changes
package/babel.config.cjs CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/jest.config.js CHANGED
File without changes
package/link_mcs.sh CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.3.12",
3
+ "version": "2.3.13",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,8 +2,8 @@
2
2
  * @module Railcontent-Services
3
3
  */
4
4
 
5
- import { globalConfig } from './config.js'
6
- import { fetchJSONHandler } from '../lib/httpHelper.js'
5
+ import {globalConfig} from './config.js'
6
+ import {fetchJSONHandler} from '../lib/httpHelper.js'
7
7
 
8
8
  /**
9
9
  * Exported functions that are excluded from index generation.
@@ -32,12 +32,13 @@ export async function fetchSimilarItems(content_id, brand, count = 10) {
32
32
  let data = {
33
33
  brand: brand,
34
34
  content_ids: content_id,
35
- num_similar: count,
35
+ num_similar: count + 1, // because the content itself is sometimes returned
36
36
  }
37
37
  const url = `/similar_items/`
38
38
  try {
39
39
  const response = await fetchHandler(url, 'POST', data)
40
- return response['similar_items']
40
+ // we requested count + 1 then filtered out the extra potential value, so we need slice to the correct size if necessary
41
+ return response['similar_items'].filter((item) => item !== content_id).slice(0, count)
41
42
  } catch (error) {
42
43
  console.error('Fetch error:', error)
43
44
  return null
@@ -113,11 +114,12 @@ export async function rankItems(brand, content_ids) {
113
114
  }
114
115
  }
115
116
 
116
- export async function recommendations(brand, { section = ''} = {}) {
117
+ export async function recommendations(brand, {section = ''} = {}) {
117
118
  section = section.toUpperCase().replace('-', '_')
118
119
  const sectionString = section ? `&section=${section}` : '';
119
120
  const url = `/api/content/v1/recommendations?brand=${brand}${sectionString}`
120
121
  try {
122
+ // This goes through the MPB, not the recommendations api, so we use fetchJSONHandler instead of the local handler
121
123
  return fetchJSONHandler(
122
124
  url,
123
125
  globalConfig.sessionConfig.token,
@@ -133,8 +135,8 @@ export async function recommendations(brand, { section = ''} = {}) {
133
135
  async function fetchHandler(url, method = 'get', body = null) {
134
136
  return fetchJSONHandler(
135
137
  url,
136
- globalConfig.sessionConfig.token,
137
- globalConfig.baseUrl,
138
+ globalConfig.recommendationsConfig.token,
139
+ globalConfig.recommendationsConfig.baseUrl,
138
140
  method,
139
141
  null,
140
142
  body
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/test/log.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/.yarnrc.yml DELETED
@@ -1 +0,0 @@
1
- nodeLinker: node-modules
@@ -1,763 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>Content-Services - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
-
18
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
- </head>
20
- <body>
21
-
22
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
- <label for="nav-trigger" class="navicon-button x">
24
- <div class="navicon"></div>
25
- </label>
26
-
27
- <label for="nav-trigger" class="overlay"></label>
28
-
29
- <nav >
30
-
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-Content-Services.html">Content-Services</a><ul class='methods'><li data-type='method'><a href="module-Content-Services.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.countAssignmentsAndLessons">countAssignmentsAndLessons</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistItem">deletePlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistLike">deletePlaylistLike</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeIndexMetadata">fetchChallengeIndexMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeLessonData">fetchChallengeLessonData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeMetadata">fetchChallengeMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeUserActiveChallenges">fetchChallengeUserActiveChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedChallenges">fetchCompletedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchOwnedChallenges">fetchOwnedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPinnedPlaylists">fetchPinnedPlaylists</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItem">fetchPlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserChallengeProgress">fetchUserChallengeProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPlaylists">fetchUserPlaylists</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.pinPlaylist">pinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesCommunityNotification">postChallengesCommunityNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesCompleteLesson">postChallengesCompleteLesson</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnroll">postChallengesEnroll</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnrollmentNotification">postChallengesEnrollmentNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesHideCompletedBanner">postChallengesHideCompletedBanner</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesLeave">postChallengesLeave</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSetStartDate">postChallengesSetStartDate</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSoloNotification">postChallengesSoloNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesUnlock">postChallengesUnlock</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unpinPlaylist">unpinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylistItem">updatePlaylistItem</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCoachLessons">fetchCoachLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchParentForDownload">fetchParentForDownload</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li></ul>
33
-
34
- </nav>
35
-
36
- <div id="main">
37
-
38
- <h1 class="page-title">Content-Services</h1>
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- <section>
47
-
48
- <header>
49
-
50
-
51
-
52
- </header>
53
-
54
- <article>
55
-
56
- <div class="container-overview">
57
-
58
-
59
-
60
-
61
-
62
- </div>
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
- <h3 class="subsection-title">Methods</h3>
81
-
82
-
83
-
84
-
85
-
86
-
87
- <h4 class="name" id=".getTabResults"><span class="type-signature type-signature-static">(static) </span>getTabResults<span class="signature">(brand, type, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
88
-
89
-
90
-
91
-
92
-
93
-
94
- <dl class="details">
95
-
96
- <dt class="tag-description">Description:</dt>
97
- <dd class="tag-description"><ul class="dummy"><li>Fetch all content for a specific brand and type with pagination, search, and grouping options.</li></ul></dd>
98
-
99
-
100
-
101
- <dt class="tag-source">Source:</dt>
102
- <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="content.js.html">content.js</a>, <a href="content.js.html#line103">line 103</a>
104
- </li></ul></dd>
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- </dl>
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <h5 class="h5-examples">Example</h5>
149
-
150
- <pre class="prettyprint"><code>fetchAll('drumeo', 'song', {
151
- page: 2,
152
- limit: 20,
153
- searchTerm: 'jazz',
154
- sort: '-popularity',
155
- includedFields: ['difficulty,Intermediate'],
156
- groupBy: 'artist',
157
- progressIds: [123, 321],
158
- useDefaultFields: false,
159
- customFields: ['is_house_coach', 'slug.current', "'instructors': instructor[]->name"],
160
- })
161
- .then(content => console.log(content))
162
- .catch(error => console.error(error));</code></pre>
163
-
164
-
165
-
166
-
167
- <h5 class="h5-parameters">Parameters:</h5>
168
-
169
-
170
- <table class="params">
171
- <thead>
172
- <tr>
173
-
174
- <th>Name</th>
175
-
176
-
177
- <th>Type</th>
178
-
179
-
180
-
181
-
182
-
183
- <th class="last">Description</th>
184
- </tr>
185
- </thead>
186
-
187
- <tbody>
188
-
189
-
190
- <tr>
191
-
192
- <td class="name"><code>brand</code></td>
193
-
194
-
195
- <td class="type">
196
-
197
-
198
- <span class="param-type">string</span>
199
-
200
-
201
-
202
-
203
- </td>
204
-
205
-
206
-
207
-
208
-
209
- <td class="description last">The brand for which to fetch content.</td>
210
- </tr>
211
-
212
-
213
-
214
- <tr>
215
-
216
- <td class="name"><code>type</code></td>
217
-
218
-
219
- <td class="type">
220
-
221
-
222
- <span class="param-type">string</span>
223
-
224
-
225
-
226
-
227
- </td>
228
-
229
-
230
-
231
-
232
-
233
- <td class="description last">The content type to fetch (e.g., 'song', 'artist').</td>
234
- </tr>
235
-
236
-
237
-
238
- <tr>
239
-
240
- <td class="name"><code>params</code></td>
241
-
242
-
243
- <td class="type">
244
-
245
-
246
- <span class="param-type">Object</span>
247
-
248
-
249
-
250
-
251
- </td>
252
-
253
-
254
-
255
-
256
-
257
- <td class="description last">Parameters for pagination, filtering, sorting, and grouping.
258
- <h6>Properties</h6>
259
-
260
-
261
- <table class="params">
262
- <thead>
263
- <tr>
264
-
265
- <th>Name</th>
266
-
267
-
268
- <th>Type</th>
269
-
270
-
271
- <th>Attributes</th>
272
-
273
-
274
-
275
- <th>Default</th>
276
-
277
-
278
- <th class="last">Description</th>
279
- </tr>
280
- </thead>
281
-
282
- <tbody>
283
-
284
-
285
- <tr>
286
-
287
- <td class="name"><code>page</code></td>
288
-
289
-
290
- <td class="type">
291
-
292
-
293
- <span class="param-type">number</span>
294
-
295
-
296
-
297
-
298
- </td>
299
-
300
-
301
- <td class="attributes">
302
-
303
- &lt;optional><br>
304
-
305
-
306
-
307
-
308
-
309
- </td>
310
-
311
-
312
-
313
- <td class="default">
314
-
315
- <code>1</code>
316
-
317
- </td>
318
-
319
-
320
- <td class="description last">The page number for pagination.</td>
321
- </tr>
322
-
323
-
324
-
325
- <tr>
326
-
327
- <td class="name"><code>limit</code></td>
328
-
329
-
330
- <td class="type">
331
-
332
-
333
- <span class="param-type">number</span>
334
-
335
-
336
-
337
-
338
- </td>
339
-
340
-
341
- <td class="attributes">
342
-
343
- &lt;optional><br>
344
-
345
-
346
-
347
-
348
-
349
- </td>
350
-
351
-
352
-
353
- <td class="default">
354
-
355
- <code>10</code>
356
-
357
- </td>
358
-
359
-
360
- <td class="description last">The number of items per page.</td>
361
- </tr>
362
-
363
-
364
-
365
- <tr>
366
-
367
- <td class="name"><code>searchTerm</code></td>
368
-
369
-
370
- <td class="type">
371
-
372
-
373
- <span class="param-type">string</span>
374
-
375
-
376
-
377
-
378
- </td>
379
-
380
-
381
- <td class="attributes">
382
-
383
- &lt;optional><br>
384
-
385
-
386
-
387
-
388
-
389
- </td>
390
-
391
-
392
-
393
- <td class="default">
394
-
395
- <code>""</code>
396
-
397
- </td>
398
-
399
-
400
- <td class="description last">The search term to filter content by title or artist.</td>
401
- </tr>
402
-
403
-
404
-
405
- <tr>
406
-
407
- <td class="name"><code>sort</code></td>
408
-
409
-
410
- <td class="type">
411
-
412
-
413
- <span class="param-type">string</span>
414
-
415
-
416
-
417
-
418
- </td>
419
-
420
-
421
- <td class="attributes">
422
-
423
- &lt;optional><br>
424
-
425
-
426
-
427
-
428
-
429
- </td>
430
-
431
-
432
-
433
- <td class="default">
434
-
435
- <code>"-published_on"</code>
436
-
437
- </td>
438
-
439
-
440
- <td class="description last">The field to sort the content by.</td>
441
- </tr>
442
-
443
-
444
-
445
- <tr>
446
-
447
- <td class="name"><code>includedFields</code></td>
448
-
449
-
450
- <td class="type">
451
-
452
-
453
- <span class="param-type">Array.&lt;string></span>
454
-
455
-
456
-
457
-
458
- </td>
459
-
460
-
461
- <td class="attributes">
462
-
463
- &lt;optional><br>
464
-
465
-
466
-
467
-
468
-
469
- </td>
470
-
471
-
472
-
473
- <td class="default">
474
-
475
- <code>[]</code>
476
-
477
- </td>
478
-
479
-
480
- <td class="description last">The fields to include in the query.</td>
481
- </tr>
482
-
483
-
484
-
485
- <tr>
486
-
487
- <td class="name"><code>groupBy</code></td>
488
-
489
-
490
- <td class="type">
491
-
492
-
493
- <span class="param-type">string</span>
494
-
495
-
496
-
497
-
498
- </td>
499
-
500
-
501
- <td class="attributes">
502
-
503
- &lt;optional><br>
504
-
505
-
506
-
507
-
508
-
509
- </td>
510
-
511
-
512
-
513
- <td class="default">
514
-
515
- <code>""</code>
516
-
517
- </td>
518
-
519
-
520
- <td class="description last">The field to group the results by (e.g., 'artist', 'genre').</td>
521
- </tr>
522
-
523
-
524
-
525
- <tr>
526
-
527
- <td class="name"><code>progressIds</code></td>
528
-
529
-
530
- <td class="type">
531
-
532
-
533
- <span class="param-type">Array.&lt;string></span>
534
-
535
-
536
-
537
-
538
- </td>
539
-
540
-
541
- <td class="attributes">
542
-
543
- &lt;optional><br>
544
-
545
-
546
-
547
-
548
-
549
- </td>
550
-
551
-
552
-
553
- <td class="default">
554
-
555
- </td>
556
-
557
-
558
- <td class="description last">An array of railcontent IDs to filter the results by. Used for filtering by progress.</td>
559
- </tr>
560
-
561
-
562
-
563
- <tr>
564
-
565
- <td class="name"><code>useDefaultFields</code></td>
566
-
567
-
568
- <td class="type">
569
-
570
-
571
- <span class="param-type">boolean</span>
572
-
573
-
574
-
575
-
576
- </td>
577
-
578
-
579
- <td class="attributes">
580
-
581
- &lt;optional><br>
582
-
583
-
584
-
585
-
586
-
587
- </td>
588
-
589
-
590
-
591
- <td class="default">
592
-
593
- <code>true</code>
594
-
595
- </td>
596
-
597
-
598
- <td class="description last">use the default sanity fields for content Type</td>
599
- </tr>
600
-
601
-
602
-
603
- <tr>
604
-
605
- <td class="name"><code>customFields</code></td>
606
-
607
-
608
- <td class="type">
609
-
610
-
611
- <span class="param-type">Array.&lt;string></span>
612
-
613
-
614
-
615
-
616
- </td>
617
-
618
-
619
- <td class="attributes">
620
-
621
- &lt;optional><br>
622
-
623
-
624
-
625
-
626
-
627
- </td>
628
-
629
-
630
-
631
- <td class="default">
632
-
633
- <code>[]</code>
634
-
635
- </td>
636
-
637
-
638
- <td class="description last">An array of sanity fields to include in the request</td>
639
- </tr>
640
-
641
-
642
-
643
- <tr>
644
-
645
- <td class="name"><code>progress</code></td>
646
-
647
-
648
- <td class="type">
649
-
650
-
651
- <span class="param-type">string</span>
652
-
653
-
654
-
655
-
656
- </td>
657
-
658
-
659
- <td class="attributes">
660
-
661
- &lt;optional><br>
662
-
663
-
664
-
665
-
666
-
667
- </td>
668
-
669
-
670
-
671
- <td class="default">
672
-
673
- <code>"all"</code>
674
-
675
- </td>
676
-
677
-
678
- <td class="description last">An string representing which progress filter to use ("all", "in progress", "complete", "not started").</td>
679
- </tr>
680
-
681
-
682
- </tbody>
683
- </table>
684
-
685
- </td>
686
- </tr>
687
-
688
-
689
- </tbody>
690
- </table>
691
-
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
- <h5 class="h5-returns">Returns:</h5>
708
-
709
-
710
- <div class="param-desc">
711
- - The fetched content data or null if not found.
712
- </div>
713
-
714
-
715
-
716
- <dl class="param-type">
717
- <dt>
718
- Type
719
- </dt>
720
- <dd>
721
-
722
- <span class="param-type">Promise.&lt;(Object|null)></span>
723
-
724
-
725
-
726
- </dd>
727
- </dl>
728
-
729
-
730
-
731
-
732
-
733
-
734
-
735
-
736
-
737
-
738
-
739
- </article>
740
-
741
- </section>
742
-
743
-
744
-
745
-
746
-
747
-
748
- </div>
749
-
750
- <br class="clear">
751
-
752
- <footer>
753
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Feb 07 2025 14:33:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
754
- </footer>
755
-
756
- <script>prettyPrint();</script>
757
- <script src="scripts/polyfill.js"></script>
758
- <script src="scripts/linenumber.js"></script>
759
-
760
-
761
-
762
- </body>
763
- </html>