musora-content-services 1.3.19 → 2.0.2

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 (46) hide show
  1. package/.editorconfig +16 -0
  2. package/CHANGELOG.md +1 -3
  3. package/docs/config.js.html +14 -5
  4. package/docs/content.js.html +425 -0
  5. package/docs/global.html +3026 -0
  6. package/docs/index.html +2 -2
  7. package/docs/module-Config.html +60 -7
  8. package/docs/module-Content-Services-V2.html +2433 -0
  9. package/docs/module-Railcontent-Services.html +522 -2
  10. package/docs/module-Sanity-Services.html +57 -43
  11. package/docs/module-Session-Management.html +575 -0
  12. package/docs/module-User-Permissions.html +406 -0
  13. package/docs/railcontent.js.html +42 -5
  14. package/docs/sanity.js.html +290 -103
  15. package/docs/user_permissions.js.html +110 -0
  16. package/docs/user_sessions.js.html +139 -0
  17. package/docs/user_types.js.html +188 -0
  18. package/jsdoc.json +2 -0
  19. package/package.json +1 -1
  20. package/publish.sh +2 -2
  21. package/src/contentMetaData.js +307 -1088
  22. package/src/contentTypeConfig.js +108 -4
  23. package/src/filterBuilder.js +6 -6
  24. package/src/index.d.ts +61 -6
  25. package/src/index.js +61 -6
  26. package/src/{services → lib}/lastUpdated.js +17 -1
  27. package/src/services/config.js +0 -0
  28. package/src/services/content.js +371 -0
  29. package/src/services/dataContext.js +0 -0
  30. package/src/services/forum.js +57 -0
  31. package/src/services/railcontent.js +124 -11
  32. package/src/services/recommendations.js +19 -0
  33. package/src/services/sanity.js +278 -104
  34. package/src/services/{userPermissions.js → user/permissions.js} +16 -2
  35. package/src/services/user/sessions.js +67 -0
  36. package/src/services/user/types.js +116 -0
  37. package/src/services/userActivity.js +32 -0
  38. package/test/content.test.js +116 -0
  39. package/test/contentLikes.test.js +0 -0
  40. package/test/contentProgress.test.js +83 -5
  41. package/test/forum.test.js +18 -0
  42. package/test/initializeTests.js +6 -1
  43. package/test/{lastUpdated.test.js → lib/lastUpdated.test.js} +2 -5
  44. package/test/sanityQueryService.test.js +66 -18
  45. package/test/{userPermissions.test.js → user/permissions.test.js} +3 -3
  46. package/tools/generate-index.cjs +16 -3
@@ -0,0 +1,2433 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>Content-Services-V2 - 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-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.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#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</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#.fetchTopComment">fetchTopComment</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#.fetchComingSoon">fetchComingSoon</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#.fetchLeaving">fetchLeaving</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#.fetchReturning">fetchReturning</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#~getNextAndPreviousQuarterDates">getNextAndPreviousQuarterDates</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li><li><a href="module-Session-Management.html">Session-Management</a><ul class='methods'><li data-type='method'><a href="module-Session-Management.html#.login">login</a></li><li data-type='method'><a href="module-Session-Management.html#.logout">logout</a></li></ul></li><li><a href="module-User-Permissions.html">User-Permissions</a><ul class='methods'><li data-type='method'><a href="module-User-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-User-Permissions.html#.reset">reset</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">Content-Services-V2</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=".getContentRows"><span class="type-signature type-signature-static">(static) </span>getContentRows<span class="signature">(brand, pageName, contentRowId<span class="signature-attributes">opt</span>, params)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</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>Fetches content rows for a given brand and page with optional filtering by content row id.</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#line176">line 176</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>getContentRows('drumeo', 'lessons', 'Your-Daily-Warmup', {
151
+ page: 1,
152
+ limit: 5
153
+ })
154
+ .then(content => console.log(content))
155
+ .catch(error => console.error(error));</code></pre>
156
+
157
+
158
+
159
+
160
+ <h5 class="h5-parameters">Parameters:</h5>
161
+
162
+
163
+ <table class="params">
164
+ <thead>
165
+ <tr>
166
+
167
+ <th>Name</th>
168
+
169
+
170
+ <th>Type</th>
171
+
172
+
173
+ <th>Attributes</th>
174
+
175
+
176
+
177
+
178
+ <th class="last">Description</th>
179
+ </tr>
180
+ </thead>
181
+
182
+ <tbody>
183
+
184
+
185
+ <tr>
186
+
187
+ <td class="name"><code>brand</code></td>
188
+
189
+
190
+ <td class="type">
191
+
192
+
193
+ <span class="param-type">string</span>
194
+
195
+
196
+
197
+
198
+ </td>
199
+
200
+
201
+ <td class="attributes">
202
+
203
+
204
+
205
+
206
+
207
+ </td>
208
+
209
+
210
+
211
+
212
+ <td class="description last">The brand for which to fetch content rows.</td>
213
+ </tr>
214
+
215
+
216
+
217
+ <tr>
218
+
219
+ <td class="name"><code>pageName</code></td>
220
+
221
+
222
+ <td class="type">
223
+
224
+
225
+ <span class="param-type">string</span>
226
+
227
+
228
+
229
+
230
+ </td>
231
+
232
+
233
+ <td class="attributes">
234
+
235
+
236
+
237
+
238
+
239
+ </td>
240
+
241
+
242
+
243
+
244
+ <td class="description last">The page name (e.g., 'lessons', 'songs', 'challenges').</td>
245
+ </tr>
246
+
247
+
248
+
249
+ <tr>
250
+
251
+ <td class="name"><code>contentRowId</code></td>
252
+
253
+
254
+ <td class="type">
255
+
256
+
257
+ <span class="param-type">string</span>
258
+
259
+
260
+
261
+
262
+ </td>
263
+
264
+
265
+ <td class="attributes">
266
+
267
+ &lt;optional><br>
268
+
269
+
270
+
271
+
272
+
273
+ </td>
274
+
275
+
276
+
277
+
278
+ <td class="description last">The specific content row ID to fetch.</td>
279
+ </tr>
280
+
281
+
282
+
283
+ <tr>
284
+
285
+ <td class="name"><code>params</code></td>
286
+
287
+
288
+ <td class="type">
289
+
290
+
291
+ <span class="param-type">Object</span>
292
+
293
+
294
+
295
+
296
+ </td>
297
+
298
+
299
+ <td class="attributes">
300
+
301
+
302
+
303
+
304
+
305
+ </td>
306
+
307
+
308
+
309
+
310
+ <td class="description last">Parameters for pagination.
311
+ <h6>Properties</h6>
312
+
313
+
314
+ <table class="params">
315
+ <thead>
316
+ <tr>
317
+
318
+ <th>Name</th>
319
+
320
+
321
+ <th>Type</th>
322
+
323
+
324
+ <th>Attributes</th>
325
+
326
+
327
+
328
+ <th>Default</th>
329
+
330
+
331
+ <th class="last">Description</th>
332
+ </tr>
333
+ </thead>
334
+
335
+ <tbody>
336
+
337
+
338
+ <tr>
339
+
340
+ <td class="name"><code>page</code></td>
341
+
342
+
343
+ <td class="type">
344
+
345
+
346
+ <span class="param-type">number</span>
347
+
348
+
349
+
350
+
351
+ </td>
352
+
353
+
354
+ <td class="attributes">
355
+
356
+ &lt;optional><br>
357
+
358
+
359
+
360
+
361
+
362
+ </td>
363
+
364
+
365
+
366
+ <td class="default">
367
+
368
+ <code>1</code>
369
+
370
+ </td>
371
+
372
+
373
+ <td class="description last">The page number for pagination.</td>
374
+ </tr>
375
+
376
+
377
+
378
+ <tr>
379
+
380
+ <td class="name"><code>limit</code></td>
381
+
382
+
383
+ <td class="type">
384
+
385
+
386
+ <span class="param-type">number</span>
387
+
388
+
389
+
390
+
391
+ </td>
392
+
393
+
394
+ <td class="attributes">
395
+
396
+ &lt;optional><br>
397
+
398
+
399
+
400
+
401
+
402
+ </td>
403
+
404
+
405
+
406
+ <td class="default">
407
+
408
+ <code>10</code>
409
+
410
+ </td>
411
+
412
+
413
+ <td class="description last">The maximum number of content items per row.</td>
414
+ </tr>
415
+
416
+
417
+ </tbody>
418
+ </table>
419
+
420
+ </td>
421
+ </tr>
422
+
423
+
424
+ </tbody>
425
+ </table>
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+ <h5 class="h5-returns">Returns:</h5>
443
+
444
+
445
+ <div class="param-desc">
446
+ - The fetched content rows.
447
+ </div>
448
+
449
+
450
+
451
+ <dl class="param-type">
452
+ <dt>
453
+ Type
454
+ </dt>
455
+ <dd>
456
+
457
+ <span class="param-type">Promise.&lt;Object></span>
458
+
459
+
460
+
461
+ </dd>
462
+ </dl>
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+ <h4 class="name" id=".getNewAndUpcoming"><span class="type-signature type-signature-static">(static) </span>getNewAndUpcoming<span class="signature">(brand, params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;({data: Array.&lt;Object>}|null)>}</span></h4>
474
+
475
+
476
+
477
+
478
+
479
+
480
+ <dl class="details">
481
+
482
+ <dt class="tag-description">Description:</dt>
483
+ <dd class="tag-description"><ul class="dummy"><li>Fetches new and upcoming releases for a given brand with pagination options.</li></ul></dd>
484
+
485
+
486
+
487
+ <dt class="tag-source">Source:</dt>
488
+ <dd class="tag-source"><ul class="dummy"><li>
489
+ <a href="content.js.html">content.js</a>, <a href="content.js.html#line206">line 206</a>
490
+ </li></ul></dd>
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+ </dl>
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+ <h5 class="h5-examples">Examples</h5>
535
+
536
+ <pre class="prettyprint"><code>// Fetch the first page with 10 results
537
+ getNewAndUpcoming('drumeo')
538
+ .then(response => console.log(response))
539
+ .catch(error => console.error(error));</code></pre>
540
+
541
+ <pre class="prettyprint"><code>// Fetch the second page with 20 results
542
+ getNewAndUpcoming('drumeo', { page: 2, limit: 20 })
543
+ .then(response => console.log(response))
544
+ .catch(error => console.error(error));</code></pre>
545
+
546
+
547
+
548
+
549
+ <h5 class="h5-parameters">Parameters:</h5>
550
+
551
+
552
+ <table class="params">
553
+ <thead>
554
+ <tr>
555
+
556
+ <th>Name</th>
557
+
558
+
559
+ <th>Type</th>
560
+
561
+
562
+ <th>Attributes</th>
563
+
564
+
565
+
566
+ <th>Default</th>
567
+
568
+
569
+ <th class="last">Description</th>
570
+ </tr>
571
+ </thead>
572
+
573
+ <tbody>
574
+
575
+
576
+ <tr>
577
+
578
+ <td class="name"><code>brand</code></td>
579
+
580
+
581
+ <td class="type">
582
+
583
+
584
+ <span class="param-type">string</span>
585
+
586
+
587
+
588
+
589
+ </td>
590
+
591
+
592
+ <td class="attributes">
593
+
594
+
595
+
596
+
597
+
598
+ </td>
599
+
600
+
601
+
602
+ <td class="default">
603
+
604
+ </td>
605
+
606
+
607
+ <td class="description last">The brand for which to fetch new and upcoming releases.</td>
608
+ </tr>
609
+
610
+
611
+
612
+ <tr>
613
+
614
+ <td class="name"><code>params</code></td>
615
+
616
+
617
+ <td class="type">
618
+
619
+
620
+ <span class="param-type">Object</span>
621
+
622
+
623
+
624
+
625
+ </td>
626
+
627
+
628
+ <td class="attributes">
629
+
630
+ &lt;optional><br>
631
+
632
+
633
+
634
+
635
+
636
+ </td>
637
+
638
+
639
+
640
+ <td class="default">
641
+
642
+ <code>{}</code>
643
+
644
+ </td>
645
+
646
+
647
+ <td class="description last">Pagination parameters.
648
+ <h6>Properties</h6>
649
+
650
+
651
+ <table class="params">
652
+ <thead>
653
+ <tr>
654
+
655
+ <th>Name</th>
656
+
657
+
658
+ <th>Type</th>
659
+
660
+
661
+ <th>Attributes</th>
662
+
663
+
664
+
665
+ <th>Default</th>
666
+
667
+
668
+ <th class="last">Description</th>
669
+ </tr>
670
+ </thead>
671
+
672
+ <tbody>
673
+
674
+
675
+ <tr>
676
+
677
+ <td class="name"><code>page</code></td>
678
+
679
+
680
+ <td class="type">
681
+
682
+
683
+ <span class="param-type">number</span>
684
+
685
+
686
+
687
+
688
+ </td>
689
+
690
+
691
+ <td class="attributes">
692
+
693
+ &lt;optional><br>
694
+
695
+
696
+
697
+
698
+
699
+ </td>
700
+
701
+
702
+
703
+ <td class="default">
704
+
705
+ <code>1</code>
706
+
707
+ </td>
708
+
709
+
710
+ <td class="description last">The page number for pagination.</td>
711
+ </tr>
712
+
713
+
714
+
715
+ <tr>
716
+
717
+ <td class="name"><code>limit</code></td>
718
+
719
+
720
+ <td class="type">
721
+
722
+
723
+ <span class="param-type">number</span>
724
+
725
+
726
+
727
+
728
+ </td>
729
+
730
+
731
+ <td class="attributes">
732
+
733
+ &lt;optional><br>
734
+
735
+
736
+
737
+
738
+
739
+ </td>
740
+
741
+
742
+
743
+ <td class="default">
744
+
745
+ <code>10</code>
746
+
747
+ </td>
748
+
749
+
750
+ <td class="description last">The maximum number of content items to fetch.</td>
751
+ </tr>
752
+
753
+
754
+ </tbody>
755
+ </table>
756
+
757
+ </td>
758
+ </tr>
759
+
760
+
761
+ </tbody>
762
+ </table>
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+ <h5 class="h5-returns">Returns:</h5>
780
+
781
+
782
+ <div class="param-desc">
783
+ - A promise that resolves to the fetched content data or `null` if no data is found.
784
+ </div>
785
+
786
+
787
+
788
+ <dl class="param-type">
789
+ <dt>
790
+ Type
791
+ </dt>
792
+ <dd>
793
+
794
+ <span class="param-type">Promise.&lt;({data: Array.&lt;Object>}|null)></span>
795
+
796
+
797
+
798
+ </dd>
799
+ </dl>
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+ <h4 class="name" id=".getRecent"><span class="type-signature type-signature-static">(static) </span>getRecent<span class="signature">(brand, pageName, tabName<span class="signature-attributes">opt</span>, params)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
811
+
812
+
813
+
814
+
815
+
816
+
817
+ <dl class="details">
818
+
819
+ <dt class="tag-description">Description:</dt>
820
+ <dd class="tag-description"><ul class="dummy"><li>Fetches recent content for a given brand and page with pagination.</li></ul></dd>
821
+
822
+
823
+
824
+ <dt class="tag-source">Source:</dt>
825
+ <dd class="tag-source"><ul class="dummy"><li>
826
+ <a href="content.js.html">content.js</a>, <a href="content.js.html#line142">line 142</a>
827
+ </li></ul></dd>
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+ </dl>
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+ <h5 class="h5-examples">Example</h5>
872
+
873
+ <pre class="prettyprint"><code>getRecent('drumeo', 'lessons', 'all', {
874
+ page: 2,
875
+ limit: 15,
876
+ sort: '-popularity'
877
+ })
878
+ .then(content => console.log(content))
879
+ .catch(error => console.error(error));</code></pre>
880
+
881
+
882
+
883
+
884
+ <h5 class="h5-parameters">Parameters:</h5>
885
+
886
+
887
+ <table class="params">
888
+ <thead>
889
+ <tr>
890
+
891
+ <th>Name</th>
892
+
893
+
894
+ <th>Type</th>
895
+
896
+
897
+ <th>Attributes</th>
898
+
899
+
900
+
901
+ <th>Default</th>
902
+
903
+
904
+ <th class="last">Description</th>
905
+ </tr>
906
+ </thead>
907
+
908
+ <tbody>
909
+
910
+
911
+ <tr>
912
+
913
+ <td class="name"><code>brand</code></td>
914
+
915
+
916
+ <td class="type">
917
+
918
+
919
+ <span class="param-type">string</span>
920
+
921
+
922
+
923
+
924
+ </td>
925
+
926
+
927
+ <td class="attributes">
928
+
929
+
930
+
931
+
932
+
933
+ </td>
934
+
935
+
936
+
937
+ <td class="default">
938
+
939
+ </td>
940
+
941
+
942
+ <td class="description last">The brand for which to fetch data.</td>
943
+ </tr>
944
+
945
+
946
+
947
+ <tr>
948
+
949
+ <td class="name"><code>pageName</code></td>
950
+
951
+
952
+ <td class="type">
953
+
954
+
955
+ <span class="param-type">string</span>
956
+
957
+
958
+
959
+
960
+ </td>
961
+
962
+
963
+ <td class="attributes">
964
+
965
+
966
+
967
+
968
+
969
+ </td>
970
+
971
+
972
+
973
+ <td class="default">
974
+
975
+ </td>
976
+
977
+
978
+ <td class="description last">The page name (e.g., 'all', 'incomplete', 'completed').</td>
979
+ </tr>
980
+
981
+
982
+
983
+ <tr>
984
+
985
+ <td class="name"><code>tabName</code></td>
986
+
987
+
988
+ <td class="type">
989
+
990
+
991
+ <span class="param-type">string</span>
992
+
993
+
994
+
995
+
996
+ </td>
997
+
998
+
999
+ <td class="attributes">
1000
+
1001
+ &lt;optional><br>
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+ </td>
1008
+
1009
+
1010
+
1011
+ <td class="default">
1012
+
1013
+ <code>'all'</code>
1014
+
1015
+ </td>
1016
+
1017
+
1018
+ <td class="description last">The tab name (defaults to 'all' for recent content).</td>
1019
+ </tr>
1020
+
1021
+
1022
+
1023
+ <tr>
1024
+
1025
+ <td class="name"><code>params</code></td>
1026
+
1027
+
1028
+ <td class="type">
1029
+
1030
+
1031
+ <span class="param-type">Object</span>
1032
+
1033
+
1034
+
1035
+
1036
+ </td>
1037
+
1038
+
1039
+ <td class="attributes">
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+ </td>
1046
+
1047
+
1048
+
1049
+ <td class="default">
1050
+
1051
+ </td>
1052
+
1053
+
1054
+ <td class="description last">Parameters for pagination and sorting.
1055
+ <h6>Properties</h6>
1056
+
1057
+
1058
+ <table class="params">
1059
+ <thead>
1060
+ <tr>
1061
+
1062
+ <th>Name</th>
1063
+
1064
+
1065
+ <th>Type</th>
1066
+
1067
+
1068
+ <th>Attributes</th>
1069
+
1070
+
1071
+
1072
+ <th>Default</th>
1073
+
1074
+
1075
+ <th class="last">Description</th>
1076
+ </tr>
1077
+ </thead>
1078
+
1079
+ <tbody>
1080
+
1081
+
1082
+ <tr>
1083
+
1084
+ <td class="name"><code>page</code></td>
1085
+
1086
+
1087
+ <td class="type">
1088
+
1089
+
1090
+ <span class="param-type">number</span>
1091
+
1092
+
1093
+
1094
+
1095
+ </td>
1096
+
1097
+
1098
+ <td class="attributes">
1099
+
1100
+ &lt;optional><br>
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+ </td>
1107
+
1108
+
1109
+
1110
+ <td class="default">
1111
+
1112
+ <code>1</code>
1113
+
1114
+ </td>
1115
+
1116
+
1117
+ <td class="description last">The page number for pagination.</td>
1118
+ </tr>
1119
+
1120
+
1121
+
1122
+ <tr>
1123
+
1124
+ <td class="name"><code>limit</code></td>
1125
+
1126
+
1127
+ <td class="type">
1128
+
1129
+
1130
+ <span class="param-type">number</span>
1131
+
1132
+
1133
+
1134
+
1135
+ </td>
1136
+
1137
+
1138
+ <td class="attributes">
1139
+
1140
+ &lt;optional><br>
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+ </td>
1147
+
1148
+
1149
+
1150
+ <td class="default">
1151
+
1152
+ <code>10</code>
1153
+
1154
+ </td>
1155
+
1156
+
1157
+ <td class="description last">The number of items per page.</td>
1158
+ </tr>
1159
+
1160
+
1161
+
1162
+ <tr>
1163
+
1164
+ <td class="name"><code>sort</code></td>
1165
+
1166
+
1167
+ <td class="type">
1168
+
1169
+
1170
+ <span class="param-type">string</span>
1171
+
1172
+
1173
+
1174
+
1175
+ </td>
1176
+
1177
+
1178
+ <td class="attributes">
1179
+
1180
+ &lt;optional><br>
1181
+
1182
+
1183
+
1184
+
1185
+
1186
+ </td>
1187
+
1188
+
1189
+
1190
+ <td class="default">
1191
+
1192
+ <code>"-published_on"</code>
1193
+
1194
+ </td>
1195
+
1196
+
1197
+ <td class="description last">The field to sort the data by.</td>
1198
+ </tr>
1199
+
1200
+
1201
+ </tbody>
1202
+ </table>
1203
+
1204
+ </td>
1205
+ </tr>
1206
+
1207
+
1208
+ </tbody>
1209
+ </table>
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+
1224
+
1225
+
1226
+ <h5 class="h5-returns">Returns:</h5>
1227
+
1228
+
1229
+ <div class="param-desc">
1230
+ - The fetched content data.
1231
+ </div>
1232
+
1233
+
1234
+
1235
+ <dl class="param-type">
1236
+ <dt>
1237
+ Type
1238
+ </dt>
1239
+ <dd>
1240
+
1241
+ <span class="param-type">Promise.&lt;Object></span>
1242
+
1243
+
1244
+
1245
+ </dd>
1246
+ </dl>
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+ <h4 class="name" id=".getRecommendedForYou"><span class="type-signature type-signature-static">(static) </span>getRecommendedForYou<span class="signature">(brand, params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1258
+
1259
+
1260
+
1261
+
1262
+
1263
+
1264
+ <dl class="details">
1265
+
1266
+ <dt class="tag-description">Description:</dt>
1267
+ <dd class="tag-description"><ul class="dummy"><li>Fetches recommended content for a given brand with pagination support.</li></ul></dd>
1268
+
1269
+
1270
+
1271
+ <dt class="tag-source">Source:</dt>
1272
+ <dd class="tag-source"><ul class="dummy"><li>
1273
+ <a href="content.js.html">content.js</a>, <a href="content.js.html#line335">line 335</a>
1274
+ </li></ul></dd>
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+ </dl>
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+ <h5 class="h5-examples">Examples</h5>
1319
+
1320
+ <pre class="prettyprint"><code>// Fetch recommended content for a brand with default pagination
1321
+ getRecommendedForYou('drumeo')
1322
+ .then(content => console.log(content))
1323
+ .catch(error => console.error(error));</code></pre>
1324
+
1325
+ <pre class="prettyprint"><code>// Fetch recommended content for a brand with custom pagination
1326
+ getRecommendedForYou('drumeo', { page: 2, limit: 5 })
1327
+ .then(content => console.log(content))
1328
+ .catch(error => console.error(error));</code></pre>
1329
+
1330
+
1331
+
1332
+
1333
+ <h5 class="h5-parameters">Parameters:</h5>
1334
+
1335
+
1336
+ <table class="params">
1337
+ <thead>
1338
+ <tr>
1339
+
1340
+ <th>Name</th>
1341
+
1342
+
1343
+ <th>Type</th>
1344
+
1345
+
1346
+ <th>Attributes</th>
1347
+
1348
+
1349
+
1350
+ <th>Default</th>
1351
+
1352
+
1353
+ <th class="last">Description</th>
1354
+ </tr>
1355
+ </thead>
1356
+
1357
+ <tbody>
1358
+
1359
+
1360
+ <tr>
1361
+
1362
+ <td class="name"><code>brand</code></td>
1363
+
1364
+
1365
+ <td class="type">
1366
+
1367
+
1368
+ <span class="param-type">string</span>
1369
+
1370
+
1371
+
1372
+
1373
+ </td>
1374
+
1375
+
1376
+ <td class="attributes">
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+ </td>
1383
+
1384
+
1385
+
1386
+ <td class="default">
1387
+
1388
+ </td>
1389
+
1390
+
1391
+ <td class="description last">The brand for which to fetch recommended content.</td>
1392
+ </tr>
1393
+
1394
+
1395
+
1396
+ <tr>
1397
+
1398
+ <td class="name"><code>params</code></td>
1399
+
1400
+
1401
+ <td class="type">
1402
+
1403
+
1404
+ <span class="param-type">Object</span>
1405
+
1406
+
1407
+
1408
+
1409
+ </td>
1410
+
1411
+
1412
+ <td class="attributes">
1413
+
1414
+ &lt;optional><br>
1415
+
1416
+
1417
+
1418
+
1419
+
1420
+ </td>
1421
+
1422
+
1423
+
1424
+ <td class="default">
1425
+
1426
+ <code>{}</code>
1427
+
1428
+ </td>
1429
+
1430
+
1431
+ <td class="description last">Pagination parameters.
1432
+ <h6>Properties</h6>
1433
+
1434
+
1435
+ <table class="params">
1436
+ <thead>
1437
+ <tr>
1438
+
1439
+ <th>Name</th>
1440
+
1441
+
1442
+ <th>Type</th>
1443
+
1444
+
1445
+ <th>Attributes</th>
1446
+
1447
+
1448
+
1449
+ <th>Default</th>
1450
+
1451
+
1452
+ <th class="last">Description</th>
1453
+ </tr>
1454
+ </thead>
1455
+
1456
+ <tbody>
1457
+
1458
+
1459
+ <tr>
1460
+
1461
+ <td class="name"><code>page</code></td>
1462
+
1463
+
1464
+ <td class="type">
1465
+
1466
+
1467
+ <span class="param-type">number</span>
1468
+
1469
+
1470
+
1471
+
1472
+ </td>
1473
+
1474
+
1475
+ <td class="attributes">
1476
+
1477
+ &lt;optional><br>
1478
+
1479
+
1480
+
1481
+
1482
+
1483
+ </td>
1484
+
1485
+
1486
+
1487
+ <td class="default">
1488
+
1489
+ <code>1</code>
1490
+
1491
+ </td>
1492
+
1493
+
1494
+ <td class="description last">The page number for pagination.</td>
1495
+ </tr>
1496
+
1497
+
1498
+
1499
+ <tr>
1500
+
1501
+ <td class="name"><code>limit</code></td>
1502
+
1503
+
1504
+ <td class="type">
1505
+
1506
+
1507
+ <span class="param-type">number</span>
1508
+
1509
+
1510
+
1511
+
1512
+ </td>
1513
+
1514
+
1515
+ <td class="attributes">
1516
+
1517
+ &lt;optional><br>
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+ </td>
1524
+
1525
+
1526
+
1527
+ <td class="default">
1528
+
1529
+ <code>10</code>
1530
+
1531
+ </td>
1532
+
1533
+
1534
+ <td class="description last">The maximum number of recommended content items per page.</td>
1535
+ </tr>
1536
+
1537
+
1538
+ </tbody>
1539
+ </table>
1540
+
1541
+ </td>
1542
+ </tr>
1543
+
1544
+
1545
+ </tbody>
1546
+ </table>
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+ <h5 class="h5-returns">Returns:</h5>
1564
+
1565
+
1566
+ <div class="param-desc">
1567
+ - A promise that resolves to an object containing recommended content.
1568
+ </div>
1569
+
1570
+
1571
+
1572
+ <dl class="param-type">
1573
+ <dt>
1574
+ Type
1575
+ </dt>
1576
+ <dd>
1577
+
1578
+ <span class="param-type">Promise.&lt;Object></span>
1579
+
1580
+
1581
+
1582
+ </dd>
1583
+ </dl>
1584
+
1585
+
1586
+
1587
+
1588
+
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+ <h4 class="name" id=".getScheduleContentRows"><span class="type-signature type-signature-static">(static) </span>getScheduleContentRows<span class="signature">(brand, contentRowId<span class="signature-attributes">opt</span>, params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+ <dl class="details">
1602
+
1603
+ <dt class="tag-description">Description:</dt>
1604
+ <dd class="tag-description"><ul class="dummy"><li>Fetches scheduled content rows for a given brand with optional filtering by content row ID.</li></ul></dd>
1605
+
1606
+
1607
+
1608
+ <dt class="tag-source">Source:</dt>
1609
+ <dd class="tag-source"><ul class="dummy"><li>
1610
+ <a href="content.js.html">content.js</a>, <a href="content.js.html#line249">line 249</a>
1611
+ </li></ul></dd>
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+ </dl>
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+ <h5 class="h5-examples">Examples</h5>
1656
+
1657
+ <pre class="prettyprint"><code>// Fetch all sections with default pagination
1658
+ getScheduleContentRows('drumeo')
1659
+ .then(content => console.log(content))
1660
+ .catch(error => console.error(error));</code></pre>
1661
+
1662
+ <pre class="prettyprint"><code>// Fetch only the 'New-Releases' section with custom pagination
1663
+ getScheduleContentRows('drumeo', 'New-Releases', { page: 1, limit: 30 })
1664
+ .then(content => console.log(content))
1665
+ .catch(error => console.error(error));</code></pre>
1666
+
1667
+ <pre class="prettyprint"><code>// Fetch only the 'Live-Streams' section with unlimited results
1668
+ getScheduleContentRows('drumeo', 'Live-Streams')
1669
+ .then(content => console.log(content))
1670
+ .catch(error => console.error(error));</code></pre>
1671
+
1672
+
1673
+
1674
+
1675
+ <h5 class="h5-parameters">Parameters:</h5>
1676
+
1677
+
1678
+ <table class="params">
1679
+ <thead>
1680
+ <tr>
1681
+
1682
+ <th>Name</th>
1683
+
1684
+
1685
+ <th>Type</th>
1686
+
1687
+
1688
+ <th>Attributes</th>
1689
+
1690
+
1691
+
1692
+ <th>Default</th>
1693
+
1694
+
1695
+ <th class="last">Description</th>
1696
+ </tr>
1697
+ </thead>
1698
+
1699
+ <tbody>
1700
+
1701
+
1702
+ <tr>
1703
+
1704
+ <td class="name"><code>brand</code></td>
1705
+
1706
+
1707
+ <td class="type">
1708
+
1709
+
1710
+ <span class="param-type">string</span>
1711
+
1712
+
1713
+
1714
+
1715
+ </td>
1716
+
1717
+
1718
+ <td class="attributes">
1719
+
1720
+
1721
+
1722
+
1723
+
1724
+ </td>
1725
+
1726
+
1727
+
1728
+ <td class="default">
1729
+
1730
+ </td>
1731
+
1732
+
1733
+ <td class="description last">The brand for which to fetch content rows.</td>
1734
+ </tr>
1735
+
1736
+
1737
+
1738
+ <tr>
1739
+
1740
+ <td class="name"><code>contentRowId</code></td>
1741
+
1742
+
1743
+ <td class="type">
1744
+
1745
+
1746
+ <span class="param-type">string</span>
1747
+
1748
+
1749
+
1750
+
1751
+ </td>
1752
+
1753
+
1754
+ <td class="attributes">
1755
+
1756
+ &lt;optional><br>
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+ </td>
1763
+
1764
+
1765
+
1766
+ <td class="default">
1767
+
1768
+ <code>null</code>
1769
+
1770
+ </td>
1771
+
1772
+
1773
+ <td class="description last">The specific content row ID to fetch (optional).</td>
1774
+ </tr>
1775
+
1776
+
1777
+
1778
+ <tr>
1779
+
1780
+ <td class="name"><code>params</code></td>
1781
+
1782
+
1783
+ <td class="type">
1784
+
1785
+
1786
+ <span class="param-type">Object</span>
1787
+
1788
+
1789
+
1790
+
1791
+ </td>
1792
+
1793
+
1794
+ <td class="attributes">
1795
+
1796
+ &lt;optional><br>
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+ </td>
1803
+
1804
+
1805
+
1806
+ <td class="default">
1807
+
1808
+ <code>{}</code>
1809
+
1810
+ </td>
1811
+
1812
+
1813
+ <td class="description last">Pagination parameters.
1814
+ <h6>Properties</h6>
1815
+
1816
+
1817
+ <table class="params">
1818
+ <thead>
1819
+ <tr>
1820
+
1821
+ <th>Name</th>
1822
+
1823
+
1824
+ <th>Type</th>
1825
+
1826
+
1827
+ <th>Attributes</th>
1828
+
1829
+
1830
+
1831
+ <th>Default</th>
1832
+
1833
+
1834
+ <th class="last">Description</th>
1835
+ </tr>
1836
+ </thead>
1837
+
1838
+ <tbody>
1839
+
1840
+
1841
+ <tr>
1842
+
1843
+ <td class="name"><code>page</code></td>
1844
+
1845
+
1846
+ <td class="type">
1847
+
1848
+
1849
+ <span class="param-type">number</span>
1850
+
1851
+
1852
+
1853
+
1854
+ </td>
1855
+
1856
+
1857
+ <td class="attributes">
1858
+
1859
+ &lt;optional><br>
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+ </td>
1866
+
1867
+
1868
+
1869
+ <td class="default">
1870
+
1871
+ <code>1</code>
1872
+
1873
+ </td>
1874
+
1875
+
1876
+ <td class="description last">The page number for pagination.</td>
1877
+ </tr>
1878
+
1879
+
1880
+
1881
+ <tr>
1882
+
1883
+ <td class="name"><code>limit</code></td>
1884
+
1885
+
1886
+ <td class="type">
1887
+
1888
+
1889
+ <span class="param-type">number</span>
1890
+
1891
+
1892
+
1893
+
1894
+ </td>
1895
+
1896
+
1897
+ <td class="attributes">
1898
+
1899
+ &lt;optional><br>
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+ </td>
1906
+
1907
+
1908
+
1909
+ <td class="default">
1910
+
1911
+ <code>10</code>
1912
+
1913
+ </td>
1914
+
1915
+
1916
+ <td class="description last">The maximum number of content items per row.</td>
1917
+ </tr>
1918
+
1919
+
1920
+ </tbody>
1921
+ </table>
1922
+
1923
+ </td>
1924
+ </tr>
1925
+
1926
+
1927
+ </tbody>
1928
+ </table>
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+ <h5 class="h5-returns">Returns:</h5>
1946
+
1947
+
1948
+ <div class="param-desc">
1949
+ - A promise that resolves to the fetched content rows.
1950
+ </div>
1951
+
1952
+
1953
+
1954
+ <dl class="param-type">
1955
+ <dt>
1956
+ Type
1957
+ </dt>
1958
+ <dd>
1959
+
1960
+ <span class="param-type">Promise.&lt;Object></span>
1961
+
1962
+
1963
+
1964
+ </dd>
1965
+ </dl>
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+
1976
+ <h4 class="name" id=".getTabResults"><span class="type-signature type-signature-static">(static) </span>getTabResults<span class="signature">(brand, pageName, tabName, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+ <dl class="details">
1984
+
1985
+ <dt class="tag-description">Description:</dt>
1986
+ <dd class="tag-description"><ul class="dummy"><li>Get data that should be displayed for a specific tab with pagination</li></ul></dd>
1987
+
1988
+
1989
+
1990
+ <dt class="tag-source">Source:</dt>
1991
+ <dd class="tag-source"><ul class="dummy"><li>
1992
+ <a href="content.js.html">content.js</a>, <a href="content.js.html#line68">line 68</a>
1993
+ </li></ul></dd>
1994
+
1995
+
1996
+
1997
+
1998
+
1999
+
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+
2009
+
2010
+
2011
+
2012
+
2013
+
2014
+
2015
+
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+ </dl>
2026
+
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+ <h5 class="h5-examples">Example</h5>
2038
+
2039
+ <pre class="prettyprint"><code>getTabResults('drumeo', 'lessons','Singles', {
2040
+ page: 2,
2041
+ limit: 20,
2042
+ sort: '-popularity',
2043
+ includedFields: ['difficulty,Intermediate'],
2044
+ })
2045
+ .then(content => console.log(content))
2046
+ .catch(error => console.error(error));</code></pre>
2047
+
2048
+
2049
+
2050
+
2051
+ <h5 class="h5-parameters">Parameters:</h5>
2052
+
2053
+
2054
+ <table class="params">
2055
+ <thead>
2056
+ <tr>
2057
+
2058
+ <th>Name</th>
2059
+
2060
+
2061
+ <th>Type</th>
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+ <th class="last">Description</th>
2068
+ </tr>
2069
+ </thead>
2070
+
2071
+ <tbody>
2072
+
2073
+
2074
+ <tr>
2075
+
2076
+ <td class="name"><code>brand</code></td>
2077
+
2078
+
2079
+ <td class="type">
2080
+
2081
+
2082
+ <span class="param-type">string</span>
2083
+
2084
+
2085
+
2086
+
2087
+ </td>
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+ <td class="description last">The brand for which to fetch data.</td>
2094
+ </tr>
2095
+
2096
+
2097
+
2098
+ <tr>
2099
+
2100
+ <td class="name"><code>pageName</code></td>
2101
+
2102
+
2103
+ <td class="type">
2104
+
2105
+
2106
+ <span class="param-type">string</span>
2107
+
2108
+
2109
+
2110
+
2111
+ </td>
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+ <td class="description last">The page name (e.g., 'lessons', 'songs','challenges).</td>
2118
+ </tr>
2119
+
2120
+
2121
+
2122
+ <tr>
2123
+
2124
+ <td class="name"><code>tabName</code></td>
2125
+
2126
+
2127
+ <td class="type">
2128
+
2129
+
2130
+ <span class="param-type">string</span>
2131
+
2132
+
2133
+
2134
+
2135
+ </td>
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+ <td class="description last">The name for the selected tab. Should be same name received from fetchMetadata (e.g., 'Individuals', 'Collections','For You').</td>
2142
+ </tr>
2143
+
2144
+
2145
+
2146
+ <tr>
2147
+
2148
+ <td class="name"><code>params</code></td>
2149
+
2150
+
2151
+ <td class="type">
2152
+
2153
+
2154
+ <span class="param-type">Object</span>
2155
+
2156
+
2157
+
2158
+
2159
+ </td>
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+ <td class="description last">Parameters for pagination, sorting, and filter.
2166
+ <h6>Properties</h6>
2167
+
2168
+
2169
+ <table class="params">
2170
+ <thead>
2171
+ <tr>
2172
+
2173
+ <th>Name</th>
2174
+
2175
+
2176
+ <th>Type</th>
2177
+
2178
+
2179
+ <th>Attributes</th>
2180
+
2181
+
2182
+
2183
+ <th>Default</th>
2184
+
2185
+
2186
+ <th class="last">Description</th>
2187
+ </tr>
2188
+ </thead>
2189
+
2190
+ <tbody>
2191
+
2192
+
2193
+ <tr>
2194
+
2195
+ <td class="name"><code>page</code></td>
2196
+
2197
+
2198
+ <td class="type">
2199
+
2200
+
2201
+ <span class="param-type">number</span>
2202
+
2203
+
2204
+
2205
+
2206
+ </td>
2207
+
2208
+
2209
+ <td class="attributes">
2210
+
2211
+ &lt;optional><br>
2212
+
2213
+
2214
+
2215
+
2216
+
2217
+ </td>
2218
+
2219
+
2220
+
2221
+ <td class="default">
2222
+
2223
+ <code>1</code>
2224
+
2225
+ </td>
2226
+
2227
+
2228
+ <td class="description last">The page number for pagination.</td>
2229
+ </tr>
2230
+
2231
+
2232
+
2233
+ <tr>
2234
+
2235
+ <td class="name"><code>limit</code></td>
2236
+
2237
+
2238
+ <td class="type">
2239
+
2240
+
2241
+ <span class="param-type">number</span>
2242
+
2243
+
2244
+
2245
+
2246
+ </td>
2247
+
2248
+
2249
+ <td class="attributes">
2250
+
2251
+ &lt;optional><br>
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+ </td>
2258
+
2259
+
2260
+
2261
+ <td class="default">
2262
+
2263
+ <code>10</code>
2264
+
2265
+ </td>
2266
+
2267
+
2268
+ <td class="description last">The number of items per page.</td>
2269
+ </tr>
2270
+
2271
+
2272
+
2273
+ <tr>
2274
+
2275
+ <td class="name"><code>sort</code></td>
2276
+
2277
+
2278
+ <td class="type">
2279
+
2280
+
2281
+ <span class="param-type">string</span>
2282
+
2283
+
2284
+
2285
+
2286
+ </td>
2287
+
2288
+
2289
+ <td class="attributes">
2290
+
2291
+ &lt;optional><br>
2292
+
2293
+
2294
+
2295
+
2296
+
2297
+ </td>
2298
+
2299
+
2300
+
2301
+ <td class="default">
2302
+
2303
+ <code>"-published_on"</code>
2304
+
2305
+ </td>
2306
+
2307
+
2308
+ <td class="description last">The field to sort the data by.</td>
2309
+ </tr>
2310
+
2311
+
2312
+
2313
+ <tr>
2314
+
2315
+ <td class="name"><code>selectedFilters</code></td>
2316
+
2317
+
2318
+ <td class="type">
2319
+
2320
+
2321
+ <span class="param-type">Array.&lt;string></span>
2322
+
2323
+
2324
+
2325
+
2326
+ </td>
2327
+
2328
+
2329
+ <td class="attributes">
2330
+
2331
+ &lt;optional><br>
2332
+
2333
+
2334
+
2335
+
2336
+
2337
+ </td>
2338
+
2339
+
2340
+
2341
+ <td class="default">
2342
+
2343
+ <code>[]</code>
2344
+
2345
+ </td>
2346
+
2347
+
2348
+ <td class="description last">The selected filter.</td>
2349
+ </tr>
2350
+
2351
+
2352
+ </tbody>
2353
+ </table>
2354
+
2355
+ </td>
2356
+ </tr>
2357
+
2358
+
2359
+ </tbody>
2360
+ </table>
2361
+
2362
+
2363
+
2364
+
2365
+
2366
+
2367
+
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+
2374
+
2375
+
2376
+
2377
+ <h5 class="h5-returns">Returns:</h5>
2378
+
2379
+
2380
+ <div class="param-desc">
2381
+ - The fetched content data or null if not found.
2382
+ </div>
2383
+
2384
+
2385
+
2386
+ <dl class="param-type">
2387
+ <dt>
2388
+ Type
2389
+ </dt>
2390
+ <dd>
2391
+
2392
+ <span class="param-type">Promise.&lt;(Object|null)></span>
2393
+
2394
+
2395
+
2396
+ </dd>
2397
+ </dl>
2398
+
2399
+
2400
+
2401
+
2402
+
2403
+
2404
+
2405
+
2406
+
2407
+
2408
+
2409
+ </article>
2410
+
2411
+ </section>
2412
+
2413
+
2414
+
2415
+
2416
+
2417
+
2418
+ </div>
2419
+
2420
+ <br class="clear">
2421
+
2422
+ <footer>
2423
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Mar 13 2025 09:07:06 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2424
+ </footer>
2425
+
2426
+ <script>prettyPrint();</script>
2427
+ <script src="scripts/polyfill.js"></script>
2428
+ <script src="scripts/linenumber.js"></script>
2429
+
2430
+
2431
+
2432
+ </body>
2433
+ </html>