musora-content-services 1.0.7 → 1.0.9

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/docs/global.html CHANGED
@@ -24,7 +24,7 @@
24
24
  <label for="nav-trigger" class="overlay"></label>
25
25
 
26
26
  <nav>
27
- <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchAll">fetchAll</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchAllSongs">fetchAllSongs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchArtists">fetchArtists</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchByRailContentId">fetchByRailContentId</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchByRailContentIds">fetchByRailContentIds</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchChildren">fetchChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchFilterOptions">fetchFilterOptions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchMethodChildren">fetchMethodChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchMethodNextLesson">fetchMethodNextLesson</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchNewReleases">fetchNewReleases</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchNextPreviousLesson">fetchNextPreviousLesson</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchPackAll">fetchPackAll</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchPackChildren">fetchPackChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchRelatedLessons">fetchRelatedLessons</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchRelatedSongs">fetchRelatedSongs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSanity">fetchSanity</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongById">fetchSongById</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongCount">fetchSongCount</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchUpcomingEvents">fetchUpcomingEvents</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchWorkouts">fetchWorkouts</a></span></li>
27
+ <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchAll">fetchAll</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchAllFilterOptions">fetchAllFilterOptions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchAllSongs">fetchAllSongs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchArtists">fetchArtists</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchByRailContentId">fetchByRailContentId</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchByRailContentIds">fetchByRailContentIds</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchChildren">fetchChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchLessonContent">fetchLessonContent</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchMethodChildren">fetchMethodChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchMethodNextLesson">fetchMethodNextLesson</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchNewReleases">fetchNewReleases</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchNextPreviousLesson">fetchNextPreviousLesson</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchPackAll">fetchPackAll</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchPackChildren">fetchPackChildren</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchRelatedLessons">fetchRelatedLessons</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchRelatedSongs">fetchRelatedSongs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSanity">fetchSanity</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongArtistCount">fetchSongArtistCount</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongById">fetchSongById</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongCount">fetchSongCount</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchSongFilterOptions">fetchSongFilterOptions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchUpcomingEvents">fetchUpcomingEvents</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#fetchWorkouts">fetchWorkouts</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#initializeSanityService">initializeSanityService</a></span></li>
28
28
  </nav>
29
29
 
30
30
  <div id="main">
@@ -117,7 +117,7 @@
117
117
 
118
118
 
119
119
 
120
- <h4 class="name" id="fetchAll"><span class="type-signature"></span>fetchAll<span class="signature">(config, brand, type, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
120
+ <h4 class="name" id="fetchAll"><span class="type-signature">(async) </span>fetchAll<span class="signature">(brand, type, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
121
121
 
122
122
 
123
123
 
@@ -160,7 +160,7 @@
160
160
 
161
161
  <dt class="tag-source">Source:</dt>
162
162
  <dd class="tag-source"><ul class="dummy"><li>
163
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line431">line 431</a>
163
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line463">line 463</a>
164
164
  </li></ul></dd>
165
165
 
166
166
 
@@ -202,32 +202,6 @@
202
202
  <tbody>
203
203
 
204
204
 
205
- <tr>
206
-
207
- <td class="name"><code>config</code></td>
208
-
209
-
210
- <td class="type">
211
-
212
-
213
- <span class="param-type"><code>Object</code></span>
214
-
215
-
216
-
217
- </td>
218
-
219
-
220
-
221
-
222
-
223
- <td class="description last">
224
- Configuration object containing token, projectId, dataset, version, and debug.
225
-
226
- </td>
227
- </tr>
228
-
229
-
230
-
231
205
  <tr>
232
206
 
233
207
  <td class="name"><code>brand</code></td>
@@ -636,14 +610,17 @@
636
610
 
637
611
 
638
612
 
639
- <h4 class="name" id="fetchAllSongs"><span class="type-signature"></span>fetchAllSongs<span class="signature">(config, brand, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
613
+ <h4 class="name" id="fetchAllFilterOptions"><span class="type-signature">(async) </span>fetchAllFilterOptions<span class="signature">(brand, filters, style<span class="signature-attributes">opt</span>, artist<span class="signature-attributes">opt</span>, contentType, term<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
640
614
 
641
615
 
642
616
 
643
617
 
644
618
 
645
619
  <div class="description">
646
- Fetch all songs for a specific brand with pagination and search options.
620
+ Fetches all available filter options based on various criteria such as brand, filters, style, artist, content type, and search term.
621
+
622
+ This function constructs a query to retrieve the total number of results and filter options such as difficulty, instrument type, and genre.
623
+ The filter options are dynamically generated based on the provided filters, style, artist, and content type.
647
624
  </div>
648
625
 
649
626
 
@@ -679,7 +656,7 @@
679
656
 
680
657
  <dt class="tag-source">Source:</dt>
681
658
  <dd class="tag-source"><ul class="dummy"><li>
682
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line131">line 131</a>
659
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line607">line 607</a>
683
660
  </li></ul></dd>
684
661
 
685
662
 
@@ -711,107 +688,10 @@
711
688
  <th>Type</th>
712
689
 
713
690
 
714
-
715
-
716
-
717
- <th class="last">Description</th>
718
- </tr>
719
- </thead>
720
-
721
- <tbody>
722
-
723
-
724
- <tr>
725
-
726
- <td class="name"><code>config</code></td>
727
-
728
-
729
- <td class="type">
730
-
731
-
732
- <span class="param-type"><code>Object</code></span>
733
-
734
-
735
-
736
- </td>
737
-
738
-
739
-
740
-
741
-
742
- <td class="description last">
743
- Configuration object containing token, projectId, dataset, version, and debug.
744
-
745
- </td>
746
- </tr>
747
-
748
-
749
-
750
- <tr>
751
-
752
- <td class="name"><code>brand</code></td>
753
-
754
-
755
- <td class="type">
756
-
757
-
758
- <span class="param-type"><code>string</code></span>
759
-
760
-
761
-
762
- </td>
763
-
764
-
765
-
766
-
767
-
768
- <td class="description last">
769
- The brand for which to fetch songs.
770
-
771
- </td>
772
- </tr>
773
-
774
-
775
-
776
- <tr>
777
-
778
- <td class="name"><code>params</code></td>
779
-
780
-
781
- <td class="type">
782
-
783
-
784
- <span class="param-type"><code>Object</code></span>
785
-
786
-
787
-
788
- </td>
789
-
790
-
791
-
792
-
793
-
794
- <td class="description last">
795
- Parameters for pagination, filtering, and sorting.
796
-
797
-
798
-
799
- <table class="params">
800
- <thead>
801
- <tr>
802
-
803
- <th>Name</th>
804
-
805
-
806
- <th>Type</th>
807
-
808
-
809
691
  <th>Attributes</th>
810
692
 
811
693
 
812
694
 
813
- <th>Default</th>
814
-
815
695
 
816
696
  <th class="last">Description</th>
817
697
  </tr>
@@ -822,13 +702,13 @@
822
702
 
823
703
  <tr>
824
704
 
825
- <td class="name"><code>page</code></td>
705
+ <td class="name"><code>brand</code></td>
826
706
 
827
707
 
828
708
  <td class="type">
829
709
 
830
710
 
831
- <span class="param-type"><code>number</code></span>
711
+ <span class="param-type"><code>string</code></span>
832
712
 
833
713
 
834
714
 
@@ -837,8 +717,6 @@
837
717
 
838
718
  <td class="attributes">
839
719
 
840
- &lt;optional><br>
841
-
842
720
 
843
721
 
844
722
 
@@ -847,15 +725,9 @@
847
725
 
848
726
 
849
727
 
850
- <td class="default">
851
-
852
- 1
853
-
854
- </td>
855
-
856
728
 
857
729
  <td class="description last">
858
- The page number for pagination.
730
+ The brand for which to fetch the filter options.
859
731
 
860
732
  </td>
861
733
  </tr>
@@ -864,13 +736,13 @@
864
736
 
865
737
  <tr>
866
738
 
867
- <td class="name"><code>limit</code></td>
739
+ <td class="name"><code>filters</code></td>
868
740
 
869
741
 
870
742
  <td class="type">
871
743
 
872
744
 
873
- <span class="param-type"><code>number</code></span>
745
+ <span class="param-type"><code>string</code></span>
874
746
 
875
747
 
876
748
 
@@ -879,8 +751,6 @@
879
751
 
880
752
  <td class="attributes">
881
753
 
882
- &lt;optional><br>
883
-
884
754
 
885
755
 
886
756
 
@@ -889,15 +759,9 @@
889
759
 
890
760
 
891
761
 
892
- <td class="default">
893
-
894
- 10
895
-
896
- </td>
897
-
898
762
 
899
763
  <td class="description last">
900
- The number of songs per page.
764
+ Additional filters to apply to the query, typically in the format of Sanity GROQ queries.
901
765
 
902
766
  </td>
903
767
  </tr>
@@ -906,7 +770,7 @@
906
770
 
907
771
  <tr>
908
772
 
909
- <td class="name"><code>searchTerm</code></td>
773
+ <td class="name"><code>style</code></td>
910
774
 
911
775
 
912
776
  <td class="type">
@@ -931,15 +795,9 @@
931
795
 
932
796
 
933
797
 
934
- <td class="default">
935
-
936
- ""
937
-
938
- </td>
939
-
940
798
 
941
799
  <td class="description last">
942
- The search term to filter songs by title or artist.
800
+ Optional style or genre to filter the results. If provided, the query will check if the style exists in the genre array.
943
801
 
944
802
  </td>
945
803
  </tr>
@@ -948,7 +806,7 @@
948
806
 
949
807
  <tr>
950
808
 
951
- <td class="name"><code>sort</code></td>
809
+ <td class="name"><code>artist</code></td>
952
810
 
953
811
 
954
812
  <td class="type">
@@ -973,15 +831,9 @@
973
831
 
974
832
 
975
833
 
976
- <td class="default">
977
-
978
- "-published_on"
979
-
980
- </td>
981
-
982
834
 
983
835
  <td class="description last">
984
- The field to sort the songs by.
836
+ Optional artist name to filter the results. If provided, the query will check if the artist's name matches.
985
837
 
986
838
  </td>
987
839
  </tr>
@@ -990,13 +842,13 @@
990
842
 
991
843
  <tr>
992
844
 
993
- <td class="name"><code>includedFields</code></td>
845
+ <td class="name"><code>contentType</code></td>
994
846
 
995
847
 
996
848
  <td class="type">
997
849
 
998
850
 
999
- <span class="param-type"><code>Array.&lt;string></code></span>
851
+ <span class="param-type"><code>string</code></span>
1000
852
 
1001
853
 
1002
854
 
@@ -1005,8 +857,6 @@
1005
857
 
1006
858
  <td class="attributes">
1007
859
 
1008
- &lt;optional><br>
1009
-
1010
860
 
1011
861
 
1012
862
 
@@ -1015,15 +865,9 @@
1015
865
 
1016
866
 
1017
867
 
1018
- <td class="default">
1019
-
1020
- []
1021
-
1022
- </td>
1023
-
1024
868
 
1025
869
  <td class="description last">
1026
- The fields to include in the query.
870
+ The content type to fetch (e.g., 'song', 'lesson').
1027
871
 
1028
872
  </td>
1029
873
  </tr>
@@ -1032,7 +876,7 @@
1032
876
 
1033
877
  <tr>
1034
878
 
1035
- <td class="name"><code>groupBy</code></td>
879
+ <td class="name"><code>term</code></td>
1036
880
 
1037
881
 
1038
882
  <td class="type">
@@ -1057,23 +901,9 @@
1057
901
 
1058
902
 
1059
903
 
1060
- <td class="default">
1061
-
1062
- ""
1063
-
1064
- </td>
1065
-
1066
904
 
1067
905
  <td class="description last">
1068
- The field to group the results by.
1069
-
1070
- </td>
1071
- </tr>
1072
-
1073
-
1074
- </tbody>
1075
- </table>
1076
-
906
+ Optional search term to match against various fields such as title, album, artist name, and genre.
1077
907
 
1078
908
  </td>
1079
909
  </tr>
@@ -1114,7 +944,7 @@
1114
944
 
1115
945
 
1116
946
  <div class="param-desc">
1117
- - The fetched song data or null if not found.
947
+ - A promise that resolves to an object containing the total results and filter options, or null if the query fails.
1118
948
  </div>
1119
949
 
1120
950
 
@@ -1122,6 +952,16 @@
1122
952
 
1123
953
 
1124
954
 
955
+ <div class="section-examples">
956
+ <h5>Example</h5>
957
+
958
+ <pre class="prettyprint"><code>// Example usage:
959
+ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
960
+ .then(options => console.log(options))
961
+ .catch(error => console.error(error));</code></pre>
962
+
963
+ </div>
964
+
1125
965
  </div>
1126
966
 
1127
967
 
@@ -1129,14 +969,14 @@
1129
969
 
1130
970
 
1131
971
 
1132
- <h4 class="name" id="fetchArtists"><span class="type-signature"></span>fetchArtists<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
972
+ <h4 class="name" id="fetchAllSongs"><span class="type-signature">(async) </span>fetchAllSongs<span class="signature">(brand, params)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1133
973
 
1134
974
 
1135
975
 
1136
976
 
1137
977
 
1138
978
  <div class="description">
1139
- Fetch all artists with lessons available for a specific brand.
979
+ Fetch all songs for a specific brand with pagination and search options.
1140
980
  </div>
1141
981
 
1142
982
 
@@ -1172,7 +1012,7 @@
1172
1012
 
1173
1013
  <dt class="tag-source">Source:</dt>
1174
1014
  <dd class="tag-source"><ul class="dummy"><li>
1175
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line34">line 34</a>
1015
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line164">line 164</a>
1176
1016
  </li></ul></dd>
1177
1017
 
1178
1018
 
@@ -1216,13 +1056,13 @@
1216
1056
 
1217
1057
  <tr>
1218
1058
 
1219
- <td class="name"><code>config</code></td>
1059
+ <td class="name"><code>brand</code></td>
1220
1060
 
1221
1061
 
1222
1062
  <td class="type">
1223
1063
 
1224
1064
 
1225
- <span class="param-type"><code>Object</code></span>
1065
+ <span class="param-type"><code>string</code></span>
1226
1066
 
1227
1067
 
1228
1068
 
@@ -1233,7 +1073,7 @@
1233
1073
 
1234
1074
 
1235
1075
  <td class="description last">
1236
- Configuration object containing token, projectId, dataset, version, and debug.
1076
+ The brand for which to fetch songs.
1237
1077
 
1238
1078
  </td>
1239
1079
  </tr>
@@ -1242,13 +1082,13 @@
1242
1082
 
1243
1083
  <tr>
1244
1084
 
1245
- <td class="name"><code>brand</code></td>
1085
+ <td class="name"><code>params</code></td>
1246
1086
 
1247
1087
 
1248
1088
  <td class="type">
1249
1089
 
1250
1090
 
1251
- <span class="param-type"><code>string</code></span>
1091
+ <span class="param-type"><code>Object</code></span>
1252
1092
 
1253
1093
 
1254
1094
 
@@ -1259,167 +1099,238 @@
1259
1099
 
1260
1100
 
1261
1101
  <td class="description last">
1262
- The brand for which to fetch artists.
1102
+ Parameters for pagination, filtering, and sorting.
1263
1103
 
1264
- </td>
1265
- </tr>
1266
-
1267
-
1268
- </tbody>
1269
- </table>
1104
+
1270
1105
 
1106
+ <table class="params">
1107
+ <thead>
1108
+ <tr>
1109
+
1110
+ <th>Name</th>
1111
+
1271
1112
 
1113
+ <th>Type</th>
1272
1114
 
1115
+
1116
+ <th>Attributes</th>
1117
+
1273
1118
 
1119
+
1120
+ <th>Default</th>
1121
+
1274
1122
 
1123
+ <th class="last">Description</th>
1124
+ </tr>
1125
+ </thead>
1275
1126
 
1127
+ <tbody>
1128
+
1276
1129
 
1130
+ <tr>
1131
+
1132
+ <td class="name"><code>page</code></td>
1133
+
1277
1134
 
1135
+ <td class="type">
1136
+
1137
+
1138
+ <span class="param-type"><code>number</code></span>
1278
1139
 
1279
1140
 
1141
+
1142
+ </td>
1280
1143
 
1144
+
1145
+ <td class="attributes">
1146
+
1147
+ &lt;optional><br>
1148
+
1281
1149
 
1150
+
1282
1151
 
1152
+
1153
+ </td>
1154
+
1283
1155
 
1284
- <div class="section-returns">
1285
- <h5>Returns:</h5>
1286
-
1287
-
1288
-
1289
- <dl class="param-type">
1290
- <dt>
1291
- Type:
1292
- </dt>
1293
- <dd>
1294
-
1295
- <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
1296
-
1297
-
1298
- </dd>
1299
- </dl>
1300
-
1301
-
1302
- <div class="param-desc">
1303
- - The fetched artist data or null if not found.
1304
- </div>
1305
-
1306
-
1307
- </div>
1308
-
1309
-
1310
-
1311
- </div>
1312
-
1313
1156
 
1314
- <div class="section-method">
1315
-
1316
-
1157
+ <td class="default">
1158
+
1159
+ 1
1160
+
1161
+ </td>
1162
+
1317
1163
 
1318
- <h4 class="name" id="fetchByRailContentId"><span class="type-signature"></span>fetchByRailContentId<span class="signature">(config, id)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1164
+ <td class="description last">
1165
+ The page number for pagination.
1166
+
1167
+ </td>
1168
+ </tr>
1319
1169
 
1320
1170
 
1321
1171
 
1172
+ <tr>
1173
+
1174
+ <td class="name"><code>limit</code></td>
1175
+
1322
1176
 
1323
-
1324
- <div class="description">
1325
- Fetch content by a specific Railcontent ID.
1326
- </div>
1327
-
1328
-
1329
-
1177
+ <td class="type">
1178
+
1179
+
1180
+ <span class="param-type"><code>number</code></span>
1330
1181
 
1331
1182
 
1332
- <dl class="details">
1183
+
1184
+ </td>
1333
1185
 
1334
-
1186
+
1187
+ <td class="attributes">
1188
+
1189
+ &lt;optional><br>
1190
+
1335
1191
 
1336
-
1192
+
1337
1193
 
1338
-
1194
+
1195
+ </td>
1196
+
1339
1197
 
1340
-
1198
+
1199
+ <td class="default">
1200
+
1201
+ 10
1202
+
1203
+ </td>
1204
+
1341
1205
 
1342
-
1206
+ <td class="description last">
1207
+ The number of songs per page.
1208
+
1209
+ </td>
1210
+ </tr>
1343
1211
 
1344
1212
 
1345
1213
 
1346
-
1214
+ <tr>
1215
+
1216
+ <td class="name"><code>searchTerm</code></td>
1217
+
1347
1218
 
1348
-
1219
+ <td class="type">
1220
+
1221
+
1222
+ <span class="param-type"><code>string</code></span>
1349
1223
 
1350
-
1351
1224
 
1352
-
1225
+
1226
+ </td>
1353
1227
 
1354
-
1228
+
1229
+ <td class="attributes">
1230
+
1231
+ &lt;optional><br>
1232
+
1355
1233
 
1356
-
1234
+
1357
1235
 
1358
-
1359
- <dt class="tag-source">Source:</dt>
1360
- <dd class="tag-source"><ul class="dummy"><li>
1361
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line380">line 380</a>
1362
- </li></ul></dd>
1363
-
1236
+
1237
+ </td>
1238
+
1364
1239
 
1365
-
1240
+
1241
+ <td class="default">
1242
+
1243
+ ""
1244
+
1245
+ </td>
1246
+
1366
1247
 
1367
-
1248
+ <td class="description last">
1249
+ The search term to filter songs by title or artist.
1250
+
1251
+ </td>
1252
+ </tr>
1368
1253
 
1369
1254
 
1370
- </dl>
1371
-
1372
-
1373
-
1374
-
1375
-
1376
1255
 
1256
+ <tr>
1257
+
1258
+ <td class="name"><code>sort</code></td>
1259
+
1377
1260
 
1261
+ <td class="type">
1262
+
1263
+
1264
+ <span class="param-type"><code>string</code></span>
1378
1265
 
1379
1266
 
1380
- <h5>Parameters:</h5>
1381
-
1267
+
1268
+ </td>
1382
1269
 
1383
- <table class="params">
1384
- <thead>
1385
- <tr>
1386
-
1387
- <th>Name</th>
1388
-
1270
+
1271
+ <td class="attributes">
1272
+
1273
+ &lt;optional><br>
1274
+
1389
1275
 
1390
- <th>Type</th>
1276
+
1391
1277
 
1392
-
1278
+
1279
+ </td>
1280
+
1393
1281
 
1394
-
1282
+
1283
+ <td class="default">
1284
+
1285
+ "-published_on"
1286
+
1287
+ </td>
1288
+
1395
1289
 
1396
- <th class="last">Description</th>
1397
- </tr>
1398
- </thead>
1290
+ <td class="description last">
1291
+ The field to sort the songs by.
1292
+
1293
+ </td>
1294
+ </tr>
1399
1295
 
1400
- <tbody>
1401
1296
 
1402
1297
 
1403
1298
  <tr>
1404
1299
 
1405
- <td class="name"><code>config</code></td>
1300
+ <td class="name"><code>includedFields</code></td>
1406
1301
 
1407
1302
 
1408
1303
  <td class="type">
1409
1304
 
1410
1305
 
1411
- <span class="param-type"><code>Object</code></span>
1306
+ <span class="param-type"><code>Array.&lt;string></code></span>
1412
1307
 
1413
1308
 
1414
1309
 
1415
1310
  </td>
1416
1311
 
1417
1312
 
1313
+ <td class="attributes">
1314
+
1315
+ &lt;optional><br>
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+ </td>
1322
+
1418
1323
 
1419
1324
 
1325
+ <td class="default">
1326
+
1327
+ []
1328
+
1329
+ </td>
1330
+
1420
1331
 
1421
1332
  <td class="description last">
1422
- Configuration object containing token, projectId, dataset, version, and debug.
1333
+ The fields to include in the query.
1423
1334
 
1424
1335
  </td>
1425
1336
  </tr>
@@ -1428,7 +1339,7 @@
1428
1339
 
1429
1340
  <tr>
1430
1341
 
1431
- <td class="name"><code>id</code></td>
1342
+ <td class="name"><code>groupBy</code></td>
1432
1343
 
1433
1344
 
1434
1345
  <td class="type">
@@ -1441,11 +1352,35 @@
1441
1352
  </td>
1442
1353
 
1443
1354
 
1355
+ <td class="attributes">
1356
+
1357
+ &lt;optional><br>
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+ </td>
1364
+
1444
1365
 
1445
1366
 
1367
+ <td class="default">
1368
+
1369
+ ""
1370
+
1371
+ </td>
1372
+
1446
1373
 
1447
1374
  <td class="description last">
1448
- The Railcontent ID of the content to fetch.
1375
+ The field to group the results by.
1376
+
1377
+ </td>
1378
+ </tr>
1379
+
1380
+
1381
+ </tbody>
1382
+ </table>
1383
+
1449
1384
 
1450
1385
  </td>
1451
1386
  </tr>
@@ -1486,7 +1421,7 @@
1486
1421
 
1487
1422
 
1488
1423
  <div class="param-desc">
1489
- - The fetched content data or null if not found.
1424
+ - The fetched song data or null if not found.
1490
1425
  </div>
1491
1426
 
1492
1427
 
@@ -1501,14 +1436,14 @@
1501
1436
 
1502
1437
 
1503
1438
 
1504
- <h4 class="name" id="fetchByRailContentIds"><span class="type-signature"></span>fetchByRailContentIds<span class="signature">(config, ids)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
1439
+ <h4 class="name" id="fetchArtists"><span class="type-signature">(async) </span>fetchArtists<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1505
1440
 
1506
1441
 
1507
1442
 
1508
1443
 
1509
1444
 
1510
1445
  <div class="description">
1511
- Fetch content by an array of Railcontent IDs.
1446
+ Fetch all artists with lessons available for a specific brand.
1512
1447
  </div>
1513
1448
 
1514
1449
 
@@ -1544,7 +1479,7 @@
1544
1479
 
1545
1480
  <dt class="tag-source">Source:</dt>
1546
1481
  <dd class="tag-source"><ul class="dummy"><li>
1547
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line401">line 401</a>
1482
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line59">line 59</a>
1548
1483
  </li></ul></dd>
1549
1484
 
1550
1485
 
@@ -1588,13 +1523,13 @@
1588
1523
 
1589
1524
  <tr>
1590
1525
 
1591
- <td class="name"><code>config</code></td>
1526
+ <td class="name"><code>brand</code></td>
1592
1527
 
1593
1528
 
1594
1529
  <td class="type">
1595
1530
 
1596
1531
 
1597
- <span class="param-type"><code>Object</code></span>
1532
+ <span class="param-type"><code>string</code></span>
1598
1533
 
1599
1534
 
1600
1535
 
@@ -1605,40 +1540,14 @@
1605
1540
 
1606
1541
 
1607
1542
  <td class="description last">
1608
- Configuration object containing token, projectId, dataset, version, and debug.
1543
+ The brand for which to fetch artists.
1609
1544
 
1610
1545
  </td>
1611
1546
  </tr>
1612
1547
 
1613
1548
 
1614
-
1615
- <tr>
1616
-
1617
- <td class="name"><code>ids</code></td>
1618
-
1619
-
1620
- <td class="type">
1621
-
1622
-
1623
- <span class="param-type"><code>Array.&lt;string></code></span>
1624
-
1625
-
1626
-
1627
- </td>
1628
-
1629
-
1630
-
1631
-
1632
-
1633
- <td class="description last">
1634
- The array of Railcontent IDs of the content to fetch.
1635
-
1636
- </td>
1637
- </tr>
1638
-
1639
-
1640
- </tbody>
1641
- </table>
1549
+ </tbody>
1550
+ </table>
1642
1551
 
1643
1552
 
1644
1553
 
@@ -1664,7 +1573,7 @@
1664
1573
  </dt>
1665
1574
  <dd>
1666
1575
 
1667
- <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
1576
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
1668
1577
 
1669
1578
 
1670
1579
  </dd>
@@ -1672,7 +1581,7 @@
1672
1581
 
1673
1582
 
1674
1583
  <div class="param-desc">
1675
- - The fetched content data or null if not found.
1584
+ - The fetched artist data or null if not found.
1676
1585
  </div>
1677
1586
 
1678
1587
 
@@ -1687,14 +1596,14 @@
1687
1596
 
1688
1597
 
1689
1598
 
1690
- <h4 class="name" id="fetchChildren"><span class="type-signature"></span>fetchChildren<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
1599
+ <h4 class="name" id="fetchByRailContentId"><span class="type-signature">(async) </span>fetchByRailContentId<span class="signature">(id)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1691
1600
 
1692
1601
 
1693
1602
 
1694
1603
 
1695
1604
 
1696
1605
  <div class="description">
1697
- Fetch children content by Railcontent ID.
1606
+ Fetch content by a specific Railcontent ID.
1698
1607
  </div>
1699
1608
 
1700
1609
 
@@ -1730,7 +1639,7 @@
1730
1639
 
1731
1640
  <dt class="tag-source">Source:</dt>
1732
1641
  <dd class="tag-source"><ul class="dummy"><li>
1733
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line527">line 527</a>
1642
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line414">line 414</a>
1734
1643
  </li></ul></dd>
1735
1644
 
1736
1645
 
@@ -1774,33 +1683,7 @@
1774
1683
 
1775
1684
  <tr>
1776
1685
 
1777
- <td class="name"><code>config</code></td>
1778
-
1779
-
1780
- <td class="type">
1781
-
1782
-
1783
- <span class="param-type"><code>Object</code></span>
1784
-
1785
-
1786
-
1787
- </td>
1788
-
1789
-
1790
-
1791
-
1792
-
1793
- <td class="description last">
1794
- Configuration object containing token, projectId, dataset, version, and debug.
1795
-
1796
- </td>
1797
- </tr>
1798
-
1799
-
1800
-
1801
- <tr>
1802
-
1803
- <td class="name"><code>railcontentId</code></td>
1686
+ <td class="name"><code>id</code></td>
1804
1687
 
1805
1688
 
1806
1689
  <td class="type">
@@ -1817,7 +1700,7 @@
1817
1700
 
1818
1701
 
1819
1702
  <td class="description last">
1820
- The Railcontent ID of the parent content.
1703
+ The Railcontent ID of the content to fetch.
1821
1704
 
1822
1705
  </td>
1823
1706
  </tr>
@@ -1850,7 +1733,7 @@
1850
1733
  </dt>
1851
1734
  <dd>
1852
1735
 
1853
- <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
1736
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
1854
1737
 
1855
1738
 
1856
1739
  </dd>
@@ -1858,7 +1741,7 @@
1858
1741
 
1859
1742
 
1860
1743
  <div class="param-desc">
1861
- - The fetched children content data or null if not found.
1744
+ - The fetched content data or null if not found.
1862
1745
  </div>
1863
1746
 
1864
1747
 
@@ -1873,14 +1756,14 @@
1873
1756
 
1874
1757
 
1875
1758
 
1876
- <h4 class="name" id="fetchFilterOptions"><span class="type-signature"></span>fetchFilterOptions<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
1759
+ <h4 class="name" id="fetchByRailContentIds"><span class="type-signature">(async) </span>fetchByRailContentIds<span class="signature">(ids)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
1877
1760
 
1878
1761
 
1879
1762
 
1880
1763
 
1881
1764
 
1882
1765
  <div class="description">
1883
- Fetch filter options for a specific brand.
1766
+ Fetch content by an array of Railcontent IDs.
1884
1767
  </div>
1885
1768
 
1886
1769
 
@@ -1916,7 +1799,7 @@
1916
1799
 
1917
1800
  <dt class="tag-source">Source:</dt>
1918
1801
  <dd class="tag-source"><ul class="dummy"><li>
1919
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line258">line 258</a>
1802
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line434">line 434</a>
1920
1803
  </li></ul></dd>
1921
1804
 
1922
1805
 
@@ -1960,39 +1843,13 @@
1960
1843
 
1961
1844
  <tr>
1962
1845
 
1963
- <td class="name"><code>config</code></td>
1964
-
1965
-
1966
- <td class="type">
1967
-
1968
-
1969
- <span class="param-type"><code>Object</code></span>
1970
-
1971
-
1972
-
1973
- </td>
1974
-
1975
-
1976
-
1977
-
1978
-
1979
- <td class="description last">
1980
- Configuration object containing token, projectId, dataset, version, and debug.
1981
-
1982
- </td>
1983
- </tr>
1984
-
1985
-
1986
-
1987
- <tr>
1988
-
1989
- <td class="name"><code>brand</code></td>
1846
+ <td class="name"><code>ids</code></td>
1990
1847
 
1991
1848
 
1992
1849
  <td class="type">
1993
1850
 
1994
1851
 
1995
- <span class="param-type"><code>string</code></span>
1852
+ <span class="param-type"><code>Array.&lt;string></code></span>
1996
1853
 
1997
1854
 
1998
1855
 
@@ -2003,7 +1860,7 @@
2003
1860
 
2004
1861
 
2005
1862
  <td class="description last">
2006
- The brand for which to fetch filter options.
1863
+ The array of Railcontent IDs of the content to fetch.
2007
1864
 
2008
1865
  </td>
2009
1866
  </tr>
@@ -2036,7 +1893,7 @@
2036
1893
  </dt>
2037
1894
  <dd>
2038
1895
 
2039
- <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
1896
+ <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
2040
1897
 
2041
1898
 
2042
1899
  </dd>
@@ -2044,7 +1901,7 @@
2044
1901
 
2045
1902
 
2046
1903
  <div class="param-desc">
2047
- - The fetched filter options or null if not found.
1904
+ - The fetched content data or null if not found.
2048
1905
  </div>
2049
1906
 
2050
1907
 
@@ -2059,14 +1916,14 @@
2059
1916
 
2060
1917
 
2061
1918
 
2062
- <h4 class="name" id="fetchMethodChildren"><span class="type-signature"></span>fetchMethodChildren<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
1919
+ <h4 class="name" id="fetchChildren"><span class="type-signature">(async) </span>fetchChildren<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
2063
1920
 
2064
1921
 
2065
1922
 
2066
1923
 
2067
1924
 
2068
1925
  <div class="description">
2069
- Fetch all children of a specific method by Railcontent ID.
1926
+ Fetch children content by Railcontent ID.
2070
1927
  </div>
2071
1928
 
2072
1929
 
@@ -2102,7 +1959,7 @@
2102
1959
 
2103
1960
  <dt class="tag-source">Source:</dt>
2104
1961
  <dd class="tag-source"><ul class="dummy"><li>
2105
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line571">line 571</a>
1962
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line649">line 649</a>
2106
1963
  </li></ul></dd>
2107
1964
 
2108
1965
 
@@ -2144,32 +2001,6 @@
2144
2001
  <tbody>
2145
2002
 
2146
2003
 
2147
- <tr>
2148
-
2149
- <td class="name"><code>config</code></td>
2150
-
2151
-
2152
- <td class="type">
2153
-
2154
-
2155
- <span class="param-type"><code>Object</code></span>
2156
-
2157
-
2158
-
2159
- </td>
2160
-
2161
-
2162
-
2163
-
2164
-
2165
- <td class="description last">
2166
- Configuration object containing token, projectId, dataset, version, and debug.
2167
-
2168
- </td>
2169
- </tr>
2170
-
2171
-
2172
-
2173
2004
  <tr>
2174
2005
 
2175
2006
  <td class="name"><code>railcontentId</code></td>
@@ -2189,7 +2020,7 @@
2189
2020
 
2190
2021
 
2191
2022
  <td class="description last">
2192
- The Railcontent ID of the method.
2023
+ The Railcontent ID of the parent content.
2193
2024
 
2194
2025
  </td>
2195
2026
  </tr>
@@ -2230,7 +2061,7 @@
2230
2061
 
2231
2062
 
2232
2063
  <div class="param-desc">
2233
- - The fetched children data or null if not found.
2064
+ - The fetched children content data or null if not found.
2234
2065
  </div>
2235
2066
 
2236
2067
 
@@ -2245,14 +2076,14 @@
2245
2076
 
2246
2077
 
2247
2078
 
2248
- <h4 class="name" id="fetchMethodNextLesson"><span class="type-signature"></span>fetchMethodNextLesson<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2079
+ <h4 class="name" id="fetchLessonContent"><span class="type-signature">(async) </span>fetchLessonContent<span class="signature">(railContentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2249
2080
 
2250
2081
 
2251
2082
 
2252
2083
 
2253
2084
 
2254
2085
  <div class="description">
2255
- Fetch the next lesson for a specific method by Railcontent ID.
2086
+ Fetch the page data for a specific lesson by Railcontent ID.
2256
2087
  </div>
2257
2088
 
2258
2089
 
@@ -2288,7 +2119,7 @@
2288
2119
 
2289
2120
  <dt class="tag-source">Source:</dt>
2290
2121
  <dd class="tag-source"><ul class="dummy"><li>
2291
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line549">line 549</a>
2122
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line722">line 722</a>
2292
2123
  </li></ul></dd>
2293
2124
 
2294
2125
 
@@ -2332,33 +2163,7 @@
2332
2163
 
2333
2164
  <tr>
2334
2165
 
2335
- <td class="name"><code>config</code></td>
2336
-
2337
-
2338
- <td class="type">
2339
-
2340
-
2341
- <span class="param-type"><code>Object</code></span>
2342
-
2343
-
2344
-
2345
- </td>
2346
-
2347
-
2348
-
2349
-
2350
-
2351
- <td class="description last">
2352
- Configuration object containing token, projectId, dataset, version, and debug.
2353
-
2354
- </td>
2355
- </tr>
2356
-
2357
-
2358
-
2359
- <tr>
2360
-
2361
- <td class="name"><code>railcontentId</code></td>
2166
+ <td class="name"><code>railContentId</code></td>
2362
2167
 
2363
2168
 
2364
2169
  <td class="type">
@@ -2416,7 +2221,7 @@
2416
2221
 
2417
2222
 
2418
2223
  <div class="param-desc">
2419
- - The fetched next lesson data or null if not found.
2224
+ - The fetched page data or null if found.
2420
2225
  </div>
2421
2226
 
2422
2227
 
@@ -2431,14 +2236,14 @@
2431
2236
 
2432
2237
 
2433
2238
 
2434
- <h4 class="name" id="fetchNewReleases"><span class="type-signature"></span>fetchNewReleases<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2239
+ <h4 class="name" id="fetchMethodChildren"><span class="type-signature">(async) </span>fetchMethodChildren<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
2435
2240
 
2436
2241
 
2437
2242
 
2438
2243
 
2439
2244
 
2440
2245
  <div class="description">
2441
- Fetch the latest new releases for a specific brand.
2246
+ Fetch all children of a specific method by Railcontent ID.
2442
2247
  </div>
2443
2248
 
2444
2249
 
@@ -2474,7 +2279,7 @@
2474
2279
 
2475
2280
  <dt class="tag-source">Source:</dt>
2476
2281
  <dd class="tag-source"><ul class="dummy"><li>
2477
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line320">line 320</a>
2282
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line691">line 691</a>
2478
2283
  </li></ul></dd>
2479
2284
 
2480
2285
 
@@ -2518,33 +2323,7 @@
2518
2323
 
2519
2324
  <tr>
2520
2325
 
2521
- <td class="name"><code>config</code></td>
2522
-
2523
-
2524
- <td class="type">
2525
-
2526
-
2527
- <span class="param-type"><code>Object</code></span>
2528
-
2529
-
2530
-
2531
- </td>
2532
-
2533
-
2534
-
2535
-
2536
-
2537
- <td class="description last">
2538
- Configuration object containing token, projectId, dataset, version, and debug.
2539
-
2540
- </td>
2541
- </tr>
2542
-
2543
-
2544
-
2545
- <tr>
2546
-
2547
- <td class="name"><code>brand</code></td>
2326
+ <td class="name"><code>railcontentId</code></td>
2548
2327
 
2549
2328
 
2550
2329
  <td class="type">
@@ -2561,7 +2340,7 @@
2561
2340
 
2562
2341
 
2563
2342
  <td class="description last">
2564
- The brand for which to fetch new releases.
2343
+ The Railcontent ID of the method.
2565
2344
 
2566
2345
  </td>
2567
2346
  </tr>
@@ -2594,7 +2373,7 @@
2594
2373
  </dt>
2595
2374
  <dd>
2596
2375
 
2597
- <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
2376
+ <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
2598
2377
 
2599
2378
 
2600
2379
  </dd>
@@ -2602,7 +2381,7 @@
2602
2381
 
2603
2382
 
2604
2383
  <div class="param-desc">
2605
- - The fetched new releases data or null if not found.
2384
+ - The fetched children data or null if not found.
2606
2385
  </div>
2607
2386
 
2608
2387
 
@@ -2617,14 +2396,14 @@
2617
2396
 
2618
2397
 
2619
2398
 
2620
- <h4 class="name" id="fetchNextPreviousLesson"><span class="type-signature"></span>fetchNextPreviousLesson<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2399
+ <h4 class="name" id="fetchMethodNextLesson"><span class="type-signature">(async) </span>fetchMethodNextLesson<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2621
2400
 
2622
2401
 
2623
2402
 
2624
2403
 
2625
2404
 
2626
2405
  <div class="description">
2627
- Fetch the next and previous lessons for a specific lesson by Railcontent ID.
2406
+ Fetch the next lesson for a specific method by Railcontent ID.
2628
2407
  </div>
2629
2408
 
2630
2409
 
@@ -2660,7 +2439,7 @@
2660
2439
 
2661
2440
  <dt class="tag-source">Source:</dt>
2662
2441
  <dd class="tag-source"><ul class="dummy"><li>
2663
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line582">line 582</a>
2442
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line670">line 670</a>
2664
2443
  </li></ul></dd>
2665
2444
 
2666
2445
 
@@ -2702,32 +2481,6 @@
2702
2481
  <tbody>
2703
2482
 
2704
2483
 
2705
- <tr>
2706
-
2707
- <td class="name"><code>config</code></td>
2708
-
2709
-
2710
- <td class="type">
2711
-
2712
-
2713
- <span class="param-type"><code>Object</code></span>
2714
-
2715
-
2716
-
2717
- </td>
2718
-
2719
-
2720
-
2721
-
2722
-
2723
- <td class="description last">
2724
- Configuration object containing token, projectId, dataset, version, and debug.
2725
-
2726
- </td>
2727
- </tr>
2728
-
2729
-
2730
-
2731
2484
  <tr>
2732
2485
 
2733
2486
  <td class="name"><code>railcontentId</code></td>
@@ -2788,7 +2541,7 @@
2788
2541
 
2789
2542
 
2790
2543
  <div class="param-desc">
2791
- - The fetched next and previous lesson data or null if found.
2544
+ - The fetched next lesson data or null if not found.
2792
2545
  </div>
2793
2546
 
2794
2547
 
@@ -2803,14 +2556,14 @@
2803
2556
 
2804
2557
 
2805
2558
 
2806
- <h4 class="name" id="fetchPackAll"><span class="type-signature"></span>fetchPackAll<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
2559
+ <h4 class="name" id="fetchNewReleases"><span class="type-signature">(async) </span>fetchNewReleases<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2807
2560
 
2808
2561
 
2809
2562
 
2810
2563
 
2811
2564
 
2812
2565
  <div class="description">
2813
- Fetch all content for a specific pack by Railcontent ID.
2566
+ Fetch the latest new releases for a specific brand.
2814
2567
  </div>
2815
2568
 
2816
2569
 
@@ -2846,7 +2599,7 @@
2846
2599
 
2847
2600
  <dt class="tag-source">Source:</dt>
2848
2601
  <dd class="tag-source"><ul class="dummy"><li>
2849
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line633">line 633</a>
2602
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line356">line 356</a>
2850
2603
  </li></ul></dd>
2851
2604
 
2852
2605
 
@@ -2890,33 +2643,7 @@
2890
2643
 
2891
2644
  <tr>
2892
2645
 
2893
- <td class="name"><code>config</code></td>
2894
-
2895
-
2896
- <td class="type">
2897
-
2898
-
2899
- <span class="param-type"><code>Object</code></span>
2900
-
2901
-
2902
-
2903
- </td>
2904
-
2905
-
2906
-
2907
-
2908
-
2909
- <td class="description last">
2910
- Configuration object containing token, projectId, dataset, version, and debug.
2911
-
2912
- </td>
2913
- </tr>
2914
-
2915
-
2916
-
2917
- <tr>
2918
-
2919
- <td class="name"><code>railcontentId</code></td>
2646
+ <td class="name"><code>brand</code></td>
2920
2647
 
2921
2648
 
2922
2649
  <td class="type">
@@ -2933,7 +2660,7 @@
2933
2660
 
2934
2661
 
2935
2662
  <td class="description last">
2936
- The Railcontent ID of the pack.
2663
+ The brand for which to fetch new releases.
2937
2664
 
2938
2665
  </td>
2939
2666
  </tr>
@@ -2966,7 +2693,7 @@
2966
2693
  </dt>
2967
2694
  <dd>
2968
2695
 
2969
- <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
2696
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
2970
2697
 
2971
2698
 
2972
2699
  </dd>
@@ -2974,7 +2701,7 @@
2974
2701
 
2975
2702
 
2976
2703
  <div class="param-desc">
2977
- - The fetched pack content data or null if not found.
2704
+ - The fetched new releases data or null if not found.
2978
2705
  </div>
2979
2706
 
2980
2707
 
@@ -2989,14 +2716,14 @@
2989
2716
 
2990
2717
 
2991
2718
 
2992
- <h4 class="name" id="fetchPackChildren"><span class="type-signature"></span>fetchPackChildren<span class="signature">(config, railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
2719
+ <h4 class="name" id="fetchNextPreviousLesson"><span class="type-signature">(async) </span>fetchNextPreviousLesson<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
2993
2720
 
2994
2721
 
2995
2722
 
2996
2723
 
2997
2724
 
2998
2725
  <div class="description">
2999
- Fetch all children of a specific pack by Railcontent ID.
2726
+ Fetch the next and previous lessons for a specific lesson by Railcontent ID.
3000
2727
  </div>
3001
2728
 
3002
2729
 
@@ -3032,7 +2759,7 @@
3032
2759
 
3033
2760
  <dt class="tag-source">Source:</dt>
3034
2761
  <dd class="tag-source"><ul class="dummy"><li>
3035
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line655">line 655</a>
2762
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line701">line 701</a>
3036
2763
  </li></ul></dd>
3037
2764
 
3038
2765
 
@@ -3076,13 +2803,13 @@
3076
2803
 
3077
2804
  <tr>
3078
2805
 
3079
- <td class="name"><code>config</code></td>
2806
+ <td class="name"><code>railcontentId</code></td>
3080
2807
 
3081
2808
 
3082
2809
  <td class="type">
3083
2810
 
3084
2811
 
3085
- <span class="param-type"><code>Object</code></span>
2812
+ <span class="param-type"><code>string</code></span>
3086
2813
 
3087
2814
 
3088
2815
 
@@ -3093,33 +2820,7 @@
3093
2820
 
3094
2821
 
3095
2822
  <td class="description last">
3096
- Configuration object containing token, projectId, dataset, version, and debug.
3097
-
3098
- </td>
3099
- </tr>
3100
-
3101
-
3102
-
3103
- <tr>
3104
-
3105
- <td class="name"><code>railcontentId</code></td>
3106
-
3107
-
3108
- <td class="type">
3109
-
3110
-
3111
- <span class="param-type"><code>string</code></span>
3112
-
3113
-
3114
-
3115
- </td>
3116
-
3117
-
3118
-
3119
-
3120
-
3121
- <td class="description last">
3122
- The Railcontent ID of the pack.
2823
+ The Railcontent ID of the current lesson.
3123
2824
 
3124
2825
  </td>
3125
2826
  </tr>
@@ -3152,7 +2853,7 @@
3152
2853
  </dt>
3153
2854
  <dd>
3154
2855
 
3155
- <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
2856
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
3156
2857
 
3157
2858
 
3158
2859
  </dd>
@@ -3160,7 +2861,7 @@
3160
2861
 
3161
2862
 
3162
2863
  <div class="param-desc">
3163
- - The fetched pack children data or null if not found.
2864
+ - The fetched next and previous lesson data or null if found.
3164
2865
  </div>
3165
2866
 
3166
2867
 
@@ -3175,14 +2876,14 @@
3175
2876
 
3176
2877
 
3177
2878
 
3178
- <h4 class="name" id="fetchRelatedLessons"><span class="type-signature"></span>fetchRelatedLessons<span class="signature">(config, railcontentId, type)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
2879
+ <h4 class="name" id="fetchPackAll"><span class="type-signature">(async) </span>fetchPackAll<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
3179
2880
 
3180
2881
 
3181
2882
 
3182
2883
 
3183
2884
 
3184
2885
  <div class="description">
3185
- Fetch related lessons for a specific lesson by Railcontent ID and type.
2886
+ Fetch all content for a specific pack by Railcontent ID.
3186
2887
  </div>
3187
2888
 
3188
2889
 
@@ -3218,7 +2919,7 @@
3218
2919
 
3219
2920
  <dt class="tag-source">Source:</dt>
3220
2921
  <dd class="tag-source"><ul class="dummy"><li>
3221
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line605">line 605</a>
2922
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line776">line 776</a>
3222
2923
  </li></ul></dd>
3223
2924
 
3224
2925
 
@@ -3262,13 +2963,13 @@
3262
2963
 
3263
2964
  <tr>
3264
2965
 
3265
- <td class="name"><code>config</code></td>
2966
+ <td class="name"><code>railcontentId</code></td>
3266
2967
 
3267
2968
 
3268
2969
  <td class="type">
3269
2970
 
3270
2971
 
3271
- <span class="param-type"><code>Object</code></span>
2972
+ <span class="param-type"><code>string</code></span>
3272
2973
 
3273
2974
 
3274
2975
 
@@ -3279,42 +2980,150 @@
3279
2980
 
3280
2981
 
3281
2982
  <td class="description last">
3282
- Configuration object containing token, projectId, dataset, version, and debug.
2983
+ The Railcontent ID of the pack.
3283
2984
 
3284
2985
  </td>
3285
2986
  </tr>
3286
2987
 
3287
2988
 
2989
+ </tbody>
2990
+ </table>
3288
2991
 
3289
- <tr>
3290
-
3291
- <td class="name"><code>railcontentId</code></td>
3292
-
3293
2992
 
3294
- <td class="type">
3295
-
3296
-
3297
- <span class="param-type"><code>string</code></span>
3298
2993
 
3299
2994
 
3300
-
3301
- </td>
3302
2995
 
3303
-
3304
2996
 
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+
3003
+
3004
+
3005
+ <div class="section-returns">
3006
+ <h5>Returns:</h5>
3007
+
3008
+
3009
+
3010
+ <dl class="param-type">
3011
+ <dt>
3012
+ Type:
3013
+ </dt>
3014
+ <dd>
3015
+
3016
+ <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
3017
+
3018
+
3019
+ </dd>
3020
+ </dl>
3021
+
3022
+
3023
+ <div class="param-desc">
3024
+ - The fetched pack content data or null if not found.
3025
+ </div>
3026
+
3027
+
3028
+ </div>
3029
+
3030
+
3031
+
3032
+ </div>
3033
+
3305
3034
 
3035
+ <div class="section-method">
3306
3036
 
3307
- <td class="description last">
3308
- The Railcontent ID of the current lesson.
3309
-
3310
- </td>
3311
- </tr>
3037
+
3038
+
3039
+ <h4 class="name" id="fetchPackChildren"><span class="type-signature">(async) </span>fetchPackChildren<span class="signature">(railcontentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+ <div class="description">
3046
+ Fetch all children of a specific pack by Railcontent ID.
3047
+ </div>
3048
+
3049
+
3050
+
3051
+
3052
+
3053
+ <dl class="details">
3054
+
3055
+
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+
3063
+
3064
+
3065
+
3066
+
3067
+
3068
+
3069
+
3070
+
3071
+
3072
+
3073
+
3312
3074
 
3075
+
3076
+
3077
+
3078
+
3079
+
3080
+ <dt class="tag-source">Source:</dt>
3081
+ <dd class="tag-source"><ul class="dummy"><li>
3082
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line797">line 797</a>
3083
+ </li></ul></dd>
3084
+
3085
+
3086
+
3087
+
3088
+
3089
+
3090
+
3091
+ </dl>
3092
+
3093
+
3094
+
3095
+
3096
+
3097
+
3098
+
3099
+
3100
+
3101
+ <h5>Parameters:</h5>
3102
+
3103
+
3104
+ <table class="params">
3105
+ <thead>
3106
+ <tr>
3107
+
3108
+ <th>Name</th>
3109
+
3110
+
3111
+ <th>Type</th>
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+ <th class="last">Description</th>
3118
+ </tr>
3119
+ </thead>
3120
+
3121
+ <tbody>
3313
3122
 
3314
3123
 
3315
3124
  <tr>
3316
3125
 
3317
- <td class="name"><code>type</code></td>
3126
+ <td class="name"><code>railcontentId</code></td>
3318
3127
 
3319
3128
 
3320
3129
  <td class="type">
@@ -3331,7 +3140,7 @@
3331
3140
 
3332
3141
 
3333
3142
  <td class="description last">
3334
- The type of related lessons to fetch.
3143
+ The Railcontent ID of the pack.
3335
3144
 
3336
3145
  </td>
3337
3146
  </tr>
@@ -3372,7 +3181,7 @@
3372
3181
 
3373
3182
 
3374
3183
  <div class="param-desc">
3375
- - The fetched related lessons data or null if not found.
3184
+ - The fetched pack children data or null if not found.
3376
3185
  </div>
3377
3186
 
3378
3187
 
@@ -3387,14 +3196,14 @@
3387
3196
 
3388
3197
 
3389
3198
 
3390
- <h4 class="name" id="fetchRelatedSongs"><span class="type-signature"></span>fetchRelatedSongs<span class="signature">(config, brand, songId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
3199
+ <h4 class="name" id="fetchRelatedLessons"><span class="type-signature">(async) </span>fetchRelatedLessons<span class="signature">(railContentId, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Array.&lt;Object>|null)>}</span></h4>
3391
3200
 
3392
3201
 
3393
3202
 
3394
3203
 
3395
3204
 
3396
3205
  <div class="description">
3397
- Fetch related songs for a specific brand and song ID.
3206
+ Fetch related lessons for a specific lesson by RailContent ID and type.
3398
3207
  </div>
3399
3208
 
3400
3209
 
@@ -3430,7 +3239,7 @@
3430
3239
 
3431
3240
  <dt class="tag-source">Source:</dt>
3432
3241
  <dd class="tag-source"><ul class="dummy"><li>
3433
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line50">line 50</a>
3242
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line755">line 755</a>
3434
3243
  </li></ul></dd>
3435
3244
 
3436
3245
 
@@ -3474,33 +3283,7 @@
3474
3283
 
3475
3284
  <tr>
3476
3285
 
3477
- <td class="name"><code>config</code></td>
3478
-
3479
-
3480
- <td class="type">
3481
-
3482
-
3483
- <span class="param-type"><code>Object</code></span>
3484
-
3485
-
3486
-
3487
- </td>
3488
-
3489
-
3490
-
3491
-
3492
-
3493
- <td class="description last">
3494
- Configuration object containing token, projectId, dataset, version, and debug.
3495
-
3496
- </td>
3497
- </tr>
3498
-
3499
-
3500
-
3501
- <tr>
3502
-
3503
- <td class="name"><code>brand</code></td>
3286
+ <td class="name"><code>railContentId</code></td>
3504
3287
 
3505
3288
 
3506
3289
  <td class="type">
@@ -3517,7 +3300,7 @@
3517
3300
 
3518
3301
 
3519
3302
  <td class="description last">
3520
- The brand for which to fetch related songs.
3303
+ The RailContent ID of the current lesson.
3521
3304
 
3522
3305
  </td>
3523
3306
  </tr>
@@ -3526,7 +3309,7 @@
3526
3309
 
3527
3310
  <tr>
3528
3311
 
3529
- <td class="name"><code>songId</code></td>
3312
+ <td class="name"><code>brand</code></td>
3530
3313
 
3531
3314
 
3532
3315
  <td class="type">
@@ -3543,7 +3326,7 @@
3543
3326
 
3544
3327
 
3545
3328
  <td class="description last">
3546
- The ID of the song to find related songs for.
3329
+ The current brand.
3547
3330
 
3548
3331
  </td>
3549
3332
  </tr>
@@ -3576,7 +3359,7 @@
3576
3359
  </dt>
3577
3360
  <dd>
3578
3361
 
3579
- <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
3362
+ <span class="param-type"><code>Promise.&lt;(Array.&lt;Object>|null)></code></span>
3580
3363
 
3581
3364
 
3582
3365
  </dd>
@@ -3584,7 +3367,7 @@
3584
3367
 
3585
3368
 
3586
3369
  <div class="param-desc">
3587
- - The fetched related songs data or null if not found.
3370
+ - The fetched related lessons data or null if not found.
3588
3371
  </div>
3589
3372
 
3590
3373
 
@@ -3599,14 +3382,14 @@
3599
3382
 
3600
3383
 
3601
3384
 
3602
- <h4 class="name" id="fetchSanity"><span class="type-signature">(async) </span>fetchSanity<span class="signature">(config, query)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
3385
+ <h4 class="name" id="fetchRelatedSongs"><span class="type-signature">(async) </span>fetchRelatedSongs<span class="signature">(brand, songId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
3603
3386
 
3604
3387
 
3605
3388
 
3606
3389
 
3607
3390
 
3608
3391
  <div class="description">
3609
- Fetch data from the Sanity API based on a provided query.
3392
+ Fetch related songs for a specific brand and song ID.
3610
3393
  </div>
3611
3394
 
3612
3395
 
@@ -3642,7 +3425,7 @@
3642
3425
 
3643
3426
  <dt class="tag-source">Source:</dt>
3644
3427
  <dd class="tag-source"><ul class="dummy"><li>
3645
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line670">line 670</a>
3428
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line84">line 84</a>
3646
3429
  </li></ul></dd>
3647
3430
 
3648
3431
 
@@ -3686,13 +3469,13 @@
3686
3469
 
3687
3470
  <tr>
3688
3471
 
3689
- <td class="name"><code>config</code></td>
3472
+ <td class="name"><code>brand</code></td>
3690
3473
 
3691
3474
 
3692
3475
  <td class="type">
3693
3476
 
3694
3477
 
3695
- <span class="param-type"><code>Object</code></span>
3478
+ <span class="param-type"><code>string</code></span>
3696
3479
 
3697
3480
 
3698
3481
 
@@ -3703,239 +3486,16 @@
3703
3486
 
3704
3487
 
3705
3488
  <td class="description last">
3706
- Configuration object containing the Sanity API settings.
3489
+ The brand for which to fetch related songs.
3707
3490
 
3708
-
3709
-
3710
- <table class="params">
3711
- <thead>
3712
- <tr>
3713
-
3714
- <th>Name</th>
3715
-
3716
-
3717
- <th>Type</th>
3718
-
3719
-
3720
- <th>Attributes</th>
3721
-
3722
-
3723
-
3724
- <th>Default</th>
3725
-
3726
-
3727
- <th class="last">Description</th>
3728
- </tr>
3729
- </thead>
3491
+ </td>
3492
+ </tr>
3730
3493
 
3731
- <tbody>
3732
3494
 
3733
3495
 
3734
3496
  <tr>
3735
3497
 
3736
- <td class="name"><code>token</code></td>
3737
-
3738
-
3739
- <td class="type">
3740
-
3741
-
3742
- <span class="param-type"><code>string</code></span>
3743
-
3744
-
3745
-
3746
- </td>
3747
-
3748
-
3749
- <td class="attributes">
3750
-
3751
-
3752
-
3753
-
3754
-
3755
- </td>
3756
-
3757
-
3758
-
3759
- <td class="default">
3760
-
3761
- </td>
3762
-
3763
-
3764
- <td class="description last">
3765
- The API token for authenticating with Sanity.
3766
-
3767
- </td>
3768
- </tr>
3769
-
3770
-
3771
-
3772
- <tr>
3773
-
3774
- <td class="name"><code>projectId</code></td>
3775
-
3776
-
3777
- <td class="type">
3778
-
3779
-
3780
- <span class="param-type"><code>string</code></span>
3781
-
3782
-
3783
-
3784
- </td>
3785
-
3786
-
3787
- <td class="attributes">
3788
-
3789
-
3790
-
3791
-
3792
-
3793
- </td>
3794
-
3795
-
3796
-
3797
- <td class="default">
3798
-
3799
- </td>
3800
-
3801
-
3802
- <td class="description last">
3803
- The project ID in Sanity.
3804
-
3805
- </td>
3806
- </tr>
3807
-
3808
-
3809
-
3810
- <tr>
3811
-
3812
- <td class="name"><code>dataset</code></td>
3813
-
3814
-
3815
- <td class="type">
3816
-
3817
-
3818
- <span class="param-type"><code>string</code></span>
3819
-
3820
-
3821
-
3822
- </td>
3823
-
3824
-
3825
- <td class="attributes">
3826
-
3827
-
3828
-
3829
-
3830
-
3831
- </td>
3832
-
3833
-
3834
-
3835
- <td class="default">
3836
-
3837
- </td>
3838
-
3839
-
3840
- <td class="description last">
3841
- The dataset name in Sanity.
3842
-
3843
- </td>
3844
- </tr>
3845
-
3846
-
3847
-
3848
- <tr>
3849
-
3850
- <td class="name"><code>version</code></td>
3851
-
3852
-
3853
- <td class="type">
3854
-
3855
-
3856
- <span class="param-type"><code>string</code></span>
3857
-
3858
-
3859
-
3860
- </td>
3861
-
3862
-
3863
- <td class="attributes">
3864
-
3865
-
3866
-
3867
-
3868
-
3869
- </td>
3870
-
3871
-
3872
-
3873
- <td class="default">
3874
-
3875
- </td>
3876
-
3877
-
3878
- <td class="description last">
3879
- The API version to use.
3880
-
3881
- </td>
3882
- </tr>
3883
-
3884
-
3885
-
3886
- <tr>
3887
-
3888
- <td class="name"><code>debug</code></td>
3889
-
3890
-
3891
- <td class="type">
3892
-
3893
-
3894
- <span class="param-type"><code>boolean</code></span>
3895
-
3896
-
3897
-
3898
- </td>
3899
-
3900
-
3901
- <td class="attributes">
3902
-
3903
- &lt;optional><br>
3904
-
3905
-
3906
-
3907
-
3908
-
3909
- </td>
3910
-
3911
-
3912
-
3913
- <td class="default">
3914
-
3915
- false
3916
-
3917
- </td>
3918
-
3919
-
3920
- <td class="description last">
3921
- Flag to enable debug mode, which logs the query and results.
3922
-
3923
- </td>
3924
- </tr>
3925
-
3926
-
3927
- </tbody>
3928
- </table>
3929
-
3930
-
3931
- </td>
3932
- </tr>
3933
-
3934
-
3935
-
3936
- <tr>
3937
-
3938
- <td class="name"><code>query</code></td>
3498
+ <td class="name"><code>songId</code></td>
3939
3499
 
3940
3500
 
3941
3501
  <td class="type">
@@ -3952,7 +3512,7 @@
3952
3512
 
3953
3513
 
3954
3514
  <td class="description last">
3955
- The GROQ query to execute against the Sanity API.
3515
+ The ID of the song to find related songs for.
3956
3516
 
3957
3517
  </td>
3958
3518
  </tr>
@@ -3993,7 +3553,7 @@
3993
3553
 
3994
3554
 
3995
3555
  <div class="param-desc">
3996
- - The first result from the query, or null if an error occurs or no results are found.
3556
+ - The fetched related songs data or null if not found.
3997
3557
  </div>
3998
3558
 
3999
3559
 
@@ -4008,14 +3568,14 @@
4008
3568
 
4009
3569
 
4010
3570
 
4011
- <h4 class="name" id="fetchSongById"><span class="type-signature"></span>fetchSongById<span class="signature">(config, documentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
3571
+ <h4 class="name" id="fetchSanity"><span class="type-signature">(async) </span>fetchSanity<span class="signature">(query, isList)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4012
3572
 
4013
3573
 
4014
3574
 
4015
3575
 
4016
3576
 
4017
3577
  <div class="description">
4018
- Fetch a song by its document ID from Sanity.
3578
+ Fetch data from the Sanity API based on a provided query.
4019
3579
  </div>
4020
3580
 
4021
3581
 
@@ -4051,7 +3611,7 @@
4051
3611
 
4052
3612
  <dt class="tag-source">Source:</dt>
4053
3613
  <dd class="tag-source"><ul class="dummy"><li>
4054
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line9">line 9</a>
3614
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line807">line 807</a>
4055
3615
  </li></ul></dd>
4056
3616
 
4057
3617
 
@@ -4095,13 +3655,13 @@
4095
3655
 
4096
3656
  <tr>
4097
3657
 
4098
- <td class="name"><code>config</code></td>
3658
+ <td class="name"><code>query</code></td>
4099
3659
 
4100
3660
 
4101
3661
  <td class="type">
4102
3662
 
4103
3663
 
4104
- <span class="param-type"><code>Object</code></span>
3664
+ <span class="param-type"><code>string</code></span>
4105
3665
 
4106
3666
 
4107
3667
 
@@ -4112,7 +3672,7 @@
4112
3672
 
4113
3673
 
4114
3674
  <td class="description last">
4115
- Configuration object containing token, projectId, dataset, version, and debug.
3675
+ The GROQ query to execute against the Sanity API.
4116
3676
 
4117
3677
  </td>
4118
3678
  </tr>
@@ -4121,13 +3681,13 @@
4121
3681
 
4122
3682
  <tr>
4123
3683
 
4124
- <td class="name"><code>documentId</code></td>
3684
+ <td class="name"><code>isList</code></td>
4125
3685
 
4126
3686
 
4127
3687
  <td class="type">
4128
3688
 
4129
3689
 
4130
- <span class="param-type"><code>string</code></span>
3690
+ <span class="param-type"><code>boolean</code></span>
4131
3691
 
4132
3692
 
4133
3693
 
@@ -4138,7 +3698,7 @@
4138
3698
 
4139
3699
 
4140
3700
  <td class="description last">
4141
- The ID of the document to fetch.
3701
+ Whether to return an array or single result
4142
3702
 
4143
3703
  </td>
4144
3704
  </tr>
@@ -4179,7 +3739,7 @@
4179
3739
 
4180
3740
 
4181
3741
  <div class="param-desc">
4182
- - The fetched song data or null if not found.
3742
+ - The first result from the query, or null if an error occurs or no results are found.
4183
3743
  </div>
4184
3744
 
4185
3745
 
@@ -4194,14 +3754,14 @@
4194
3754
 
4195
3755
 
4196
3756
 
4197
- <h4 class="name" id="fetchSongCount"><span class="type-signature"></span>fetchSongCount<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(number|null)>}</span></h4>
3757
+ <h4 class="name" id="fetchSongArtistCount"><span class="type-signature">(async) </span>fetchSongArtistCount<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(int|null)>}</span></h4>
4198
3758
 
4199
3759
 
4200
3760
 
4201
3761
 
4202
3762
 
4203
3763
  <div class="description">
4204
- Fetch the total count of songs for a specific brand.
3764
+ Fetch current number of artists for songs within a brand.
4205
3765
  </div>
4206
3766
 
4207
3767
 
@@ -4237,7 +3797,7 @@
4237
3797
 
4238
3798
  <dt class="tag-source">Source:</dt>
4239
3799
  <dd class="tag-source"><ul class="dummy"><li>
4240
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line288">line 288</a>
3800
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line73">line 73</a>
4241
3801
  </li></ul></dd>
4242
3802
 
4243
3803
 
@@ -4279,32 +3839,6 @@
4279
3839
  <tbody>
4280
3840
 
4281
3841
 
4282
- <tr>
4283
-
4284
- <td class="name"><code>config</code></td>
4285
-
4286
-
4287
- <td class="type">
4288
-
4289
-
4290
- <span class="param-type"><code>Object</code></span>
4291
-
4292
-
4293
-
4294
- </td>
4295
-
4296
-
4297
-
4298
-
4299
-
4300
- <td class="description last">
4301
- Configuration object containing token, projectId, dataset, version, and debug.
4302
-
4303
- </td>
4304
- </tr>
4305
-
4306
-
4307
-
4308
3842
  <tr>
4309
3843
 
4310
3844
  <td class="name"><code>brand</code></td>
@@ -4324,7 +3858,7 @@
4324
3858
 
4325
3859
 
4326
3860
  <td class="description last">
4327
- The brand for which to fetch the song count.
3861
+ The current brand.
4328
3862
 
4329
3863
  </td>
4330
3864
  </tr>
@@ -4357,7 +3891,7 @@
4357
3891
  </dt>
4358
3892
  <dd>
4359
3893
 
4360
- <span class="param-type"><code>Promise.&lt;(number|null)></code></span>
3894
+ <span class="param-type"><code>Promise.&lt;(int|null)></code></span>
4361
3895
 
4362
3896
 
4363
3897
  </dd>
@@ -4365,7 +3899,7 @@
4365
3899
 
4366
3900
 
4367
3901
  <div class="param-desc">
4368
- - The total count of songs or null if an error occurs.
3902
+ - The fetched count of artists.
4369
3903
  </div>
4370
3904
 
4371
3905
 
@@ -4380,14 +3914,14 @@
4380
3914
 
4381
3915
 
4382
3916
 
4383
- <h4 class="name" id="fetchUpcomingEvents"><span class="type-signature"></span>fetchUpcomingEvents<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
3917
+ <h4 class="name" id="fetchSongById"><span class="type-signature">(async) </span>fetchSongById<span class="signature">(documentId)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4384
3918
 
4385
3919
 
4386
3920
 
4387
3921
 
4388
3922
 
4389
3923
  <div class="description">
4390
- Fetch upcoming events for a specific brand.
3924
+ Fetch a song by its document ID from Sanity.
4391
3925
  </div>
4392
3926
 
4393
3927
 
@@ -4423,7 +3957,7 @@
4423
3957
 
4424
3958
  <dt class="tag-source">Source:</dt>
4425
3959
  <dd class="tag-source"><ul class="dummy"><li>
4426
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line349">line 349</a>
3960
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line34">line 34</a>
4427
3961
  </li></ul></dd>
4428
3962
 
4429
3963
 
@@ -4467,13 +4001,13 @@
4467
4001
 
4468
4002
  <tr>
4469
4003
 
4470
- <td class="name"><code>config</code></td>
4004
+ <td class="name"><code>documentId</code></td>
4471
4005
 
4472
4006
 
4473
4007
  <td class="type">
4474
4008
 
4475
4009
 
4476
- <span class="param-type"><code>Object</code></span>
4010
+ <span class="param-type"><code>string</code></span>
4477
4011
 
4478
4012
 
4479
4013
 
@@ -4484,40 +4018,14 @@
4484
4018
 
4485
4019
 
4486
4020
  <td class="description last">
4487
- Configuration object containing token, projectId, dataset, version, and debug.
4021
+ The ID of the document to fetch.
4488
4022
 
4489
4023
  </td>
4490
4024
  </tr>
4491
4025
 
4492
4026
 
4493
-
4494
- <tr>
4495
-
4496
- <td class="name"><code>brand</code></td>
4497
-
4498
-
4499
- <td class="type">
4500
-
4501
-
4502
- <span class="param-type"><code>string</code></span>
4503
-
4504
-
4505
-
4506
- </td>
4507
-
4508
-
4509
-
4510
-
4511
-
4512
- <td class="description last">
4513
- The brand for which to fetch upcoming events.
4514
-
4515
- </td>
4516
- </tr>
4517
-
4518
-
4519
- </tbody>
4520
- </table>
4027
+ </tbody>
4028
+ </table>
4521
4029
 
4522
4030
 
4523
4031
 
@@ -4551,7 +4059,7 @@
4551
4059
 
4552
4060
 
4553
4061
  <div class="param-desc">
4554
- - The fetched upcoming events data or null if not found.
4062
+ - The fetched song data or null if not found.
4555
4063
  </div>
4556
4064
 
4557
4065
 
@@ -4566,14 +4074,14 @@
4566
4074
 
4567
4075
 
4568
4076
 
4569
- <h4 class="name" id="fetchWorkouts"><span class="type-signature"></span>fetchWorkouts<span class="signature">(config, brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4077
+ <h4 class="name" id="fetchSongCount"><span class="type-signature">(async) </span>fetchSongCount<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(number|null)>}</span></h4>
4570
4078
 
4571
4079
 
4572
4080
 
4573
4081
 
4574
4082
 
4575
4083
  <div class="description">
4576
- Fetch the latest workouts for the home page of a specific brand.
4084
+ Fetch the total count of songs for a specific brand.
4577
4085
  </div>
4578
4086
 
4579
4087
 
@@ -4609,7 +4117,7 @@
4609
4117
 
4610
4118
  <dt class="tag-source">Source:</dt>
4611
4119
  <dd class="tag-source"><ul class="dummy"><li>
4612
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line299">line 299</a>
4120
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line326">line 326</a>
4613
4121
  </li></ul></dd>
4614
4122
 
4615
4123
 
@@ -4653,13 +4161,13 @@
4653
4161
 
4654
4162
  <tr>
4655
4163
 
4656
- <td class="name"><code>config</code></td>
4164
+ <td class="name"><code>brand</code></td>
4657
4165
 
4658
4166
 
4659
4167
  <td class="type">
4660
4168
 
4661
4169
 
4662
- <span class="param-type"><code>Object</code></span>
4170
+ <span class="param-type"><code>string</code></span>
4663
4171
 
4664
4172
 
4665
4173
 
@@ -4670,12 +4178,146 @@
4670
4178
 
4671
4179
 
4672
4180
  <td class="description last">
4673
- Configuration object containing token, projectId, dataset, version, and debug.
4181
+ The brand for which to fetch the song count.
4674
4182
 
4675
4183
  </td>
4676
4184
  </tr>
4677
4185
 
4678
4186
 
4187
+ </tbody>
4188
+ </table>
4189
+
4190
+
4191
+
4192
+
4193
+
4194
+
4195
+
4196
+
4197
+
4198
+
4199
+
4200
+
4201
+
4202
+
4203
+ <div class="section-returns">
4204
+ <h5>Returns:</h5>
4205
+
4206
+
4207
+
4208
+ <dl class="param-type">
4209
+ <dt>
4210
+ Type:
4211
+ </dt>
4212
+ <dd>
4213
+
4214
+ <span class="param-type"><code>Promise.&lt;(number|null)></code></span>
4215
+
4216
+
4217
+ </dd>
4218
+ </dl>
4219
+
4220
+
4221
+ <div class="param-desc">
4222
+ - The total count of songs or null if an error occurs.
4223
+ </div>
4224
+
4225
+
4226
+ </div>
4227
+
4228
+
4229
+
4230
+ </div>
4231
+
4232
+
4233
+ <div class="section-method">
4234
+
4235
+
4236
+
4237
+ <h4 class="name" id="fetchSongFilterOptions"><span class="type-signature">(async) </span>fetchSongFilterOptions<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4238
+
4239
+
4240
+
4241
+
4242
+
4243
+ <div class="description">
4244
+ Fetch filter options for a specific brand.
4245
+ </div>
4246
+
4247
+
4248
+
4249
+
4250
+
4251
+ <dl class="details">
4252
+
4253
+
4254
+
4255
+
4256
+
4257
+
4258
+
4259
+
4260
+
4261
+
4262
+
4263
+
4264
+
4265
+
4266
+
4267
+
4268
+
4269
+
4270
+
4271
+
4272
+
4273
+
4274
+
4275
+
4276
+
4277
+
4278
+ <dt class="tag-source">Source:</dt>
4279
+ <dd class="tag-source"><ul class="dummy"><li>
4280
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line297">line 297</a>
4281
+ </li></ul></dd>
4282
+
4283
+
4284
+
4285
+
4286
+
4287
+
4288
+
4289
+ </dl>
4290
+
4291
+
4292
+
4293
+
4294
+
4295
+
4296
+
4297
+
4298
+
4299
+ <h5>Parameters:</h5>
4300
+
4301
+
4302
+ <table class="params">
4303
+ <thead>
4304
+ <tr>
4305
+
4306
+ <th>Name</th>
4307
+
4308
+
4309
+ <th>Type</th>
4310
+
4311
+
4312
+
4313
+
4314
+
4315
+ <th class="last">Description</th>
4316
+ </tr>
4317
+ </thead>
4318
+
4319
+ <tbody>
4320
+
4679
4321
 
4680
4322
  <tr>
4681
4323
 
@@ -4696,7 +4338,7 @@
4696
4338
 
4697
4339
 
4698
4340
  <td class="description last">
4699
- The brand for which to fetch workouts.
4341
+ The brand for which to fetch filter options.
4700
4342
 
4701
4343
  </td>
4702
4344
  </tr>
@@ -4737,14 +4379,750 @@
4737
4379
 
4738
4380
 
4739
4381
  <div class="param-desc">
4740
- - The fetched workout data or null if not found.
4382
+ - The fetched filter options or null if not found.
4383
+ </div>
4384
+
4385
+
4386
+ </div>
4387
+
4388
+
4389
+
4741
4390
  </div>
4391
+
4392
+
4393
+ <div class="section-method">
4394
+
4395
+
4396
+
4397
+ <h4 class="name" id="fetchUpcomingEvents"><span class="type-signature">(async) </span>fetchUpcomingEvents<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4742
4398
 
4743
4399
 
4400
+
4401
+
4402
+
4403
+ <div class="description">
4404
+ Fetch upcoming events for a specific brand.
4744
4405
  </div>
4745
4406
 
4746
4407
 
4747
4408
 
4409
+
4410
+
4411
+ <dl class="details">
4412
+
4413
+
4414
+
4415
+
4416
+
4417
+
4418
+
4419
+
4420
+
4421
+
4422
+
4423
+
4424
+
4425
+
4426
+
4427
+
4428
+
4429
+
4430
+
4431
+
4432
+
4433
+
4434
+
4435
+
4436
+
4437
+
4438
+ <dt class="tag-source">Source:</dt>
4439
+ <dd class="tag-source"><ul class="dummy"><li>
4440
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line384">line 384</a>
4441
+ </li></ul></dd>
4442
+
4443
+
4444
+
4445
+
4446
+
4447
+
4448
+
4449
+ </dl>
4450
+
4451
+
4452
+
4453
+
4454
+
4455
+
4456
+
4457
+
4458
+
4459
+ <h5>Parameters:</h5>
4460
+
4461
+
4462
+ <table class="params">
4463
+ <thead>
4464
+ <tr>
4465
+
4466
+ <th>Name</th>
4467
+
4468
+
4469
+ <th>Type</th>
4470
+
4471
+
4472
+
4473
+
4474
+
4475
+ <th class="last">Description</th>
4476
+ </tr>
4477
+ </thead>
4478
+
4479
+ <tbody>
4480
+
4481
+
4482
+ <tr>
4483
+
4484
+ <td class="name"><code>brand</code></td>
4485
+
4486
+
4487
+ <td class="type">
4488
+
4489
+
4490
+ <span class="param-type"><code>string</code></span>
4491
+
4492
+
4493
+
4494
+ </td>
4495
+
4496
+
4497
+
4498
+
4499
+
4500
+ <td class="description last">
4501
+ The brand for which to fetch upcoming events.
4502
+
4503
+ </td>
4504
+ </tr>
4505
+
4506
+
4507
+ </tbody>
4508
+ </table>
4509
+
4510
+
4511
+
4512
+
4513
+
4514
+
4515
+
4516
+
4517
+
4518
+
4519
+
4520
+
4521
+
4522
+
4523
+ <div class="section-returns">
4524
+ <h5>Returns:</h5>
4525
+
4526
+
4527
+
4528
+ <dl class="param-type">
4529
+ <dt>
4530
+ Type:
4531
+ </dt>
4532
+ <dd>
4533
+
4534
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
4535
+
4536
+
4537
+ </dd>
4538
+ </dl>
4539
+
4540
+
4541
+ <div class="param-desc">
4542
+ - The fetched upcoming events data or null if not found.
4543
+ </div>
4544
+
4545
+
4546
+ </div>
4547
+
4548
+
4549
+
4550
+ </div>
4551
+
4552
+
4553
+ <div class="section-method">
4554
+
4555
+
4556
+
4557
+ <h4 class="name" id="fetchWorkouts"><span class="type-signature">(async) </span>fetchWorkouts<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;(Object|null)>}</span></h4>
4558
+
4559
+
4560
+
4561
+
4562
+
4563
+ <div class="description">
4564
+ Fetch the latest workouts for the home page of a specific brand.
4565
+ </div>
4566
+
4567
+
4568
+
4569
+
4570
+
4571
+ <dl class="details">
4572
+
4573
+
4574
+
4575
+
4576
+
4577
+
4578
+
4579
+
4580
+
4581
+
4582
+
4583
+
4584
+
4585
+
4586
+
4587
+
4588
+
4589
+
4590
+
4591
+
4592
+
4593
+
4594
+
4595
+
4596
+
4597
+
4598
+ <dt class="tag-source">Source:</dt>
4599
+ <dd class="tag-source"><ul class="dummy"><li>
4600
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line336">line 336</a>
4601
+ </li></ul></dd>
4602
+
4603
+
4604
+
4605
+
4606
+
4607
+
4608
+
4609
+ </dl>
4610
+
4611
+
4612
+
4613
+
4614
+
4615
+
4616
+
4617
+
4618
+
4619
+ <h5>Parameters:</h5>
4620
+
4621
+
4622
+ <table class="params">
4623
+ <thead>
4624
+ <tr>
4625
+
4626
+ <th>Name</th>
4627
+
4628
+
4629
+ <th>Type</th>
4630
+
4631
+
4632
+
4633
+
4634
+
4635
+ <th class="last">Description</th>
4636
+ </tr>
4637
+ </thead>
4638
+
4639
+ <tbody>
4640
+
4641
+
4642
+ <tr>
4643
+
4644
+ <td class="name"><code>brand</code></td>
4645
+
4646
+
4647
+ <td class="type">
4648
+
4649
+
4650
+ <span class="param-type"><code>string</code></span>
4651
+
4652
+
4653
+
4654
+ </td>
4655
+
4656
+
4657
+
4658
+
4659
+
4660
+ <td class="description last">
4661
+ The brand for which to fetch workouts.
4662
+
4663
+ </td>
4664
+ </tr>
4665
+
4666
+
4667
+ </tbody>
4668
+ </table>
4669
+
4670
+
4671
+
4672
+
4673
+
4674
+
4675
+
4676
+
4677
+
4678
+
4679
+
4680
+
4681
+
4682
+
4683
+ <div class="section-returns">
4684
+ <h5>Returns:</h5>
4685
+
4686
+
4687
+
4688
+ <dl class="param-type">
4689
+ <dt>
4690
+ Type:
4691
+ </dt>
4692
+ <dd>
4693
+
4694
+ <span class="param-type"><code>Promise.&lt;(Object|null)></code></span>
4695
+
4696
+
4697
+ </dd>
4698
+ </dl>
4699
+
4700
+
4701
+ <div class="param-desc">
4702
+ - The fetched workout data or null if not found.
4703
+ </div>
4704
+
4705
+
4706
+ </div>
4707
+
4708
+
4709
+
4710
+ </div>
4711
+
4712
+
4713
+ <div class="section-method">
4714
+
4715
+
4716
+
4717
+ <h4 class="name" id="initializeSanityService"><span class="type-signature"></span>initializeSanityService<span class="signature">(config)</span><span class="type-signature"></span></h4>
4718
+
4719
+
4720
+
4721
+
4722
+
4723
+ <div class="description">
4724
+ Initializes the Sanity service with the given configuration.
4725
+ This function must be called before using any other functions in this library.
4726
+ </div>
4727
+
4728
+
4729
+
4730
+
4731
+
4732
+ <dl class="details">
4733
+
4734
+
4735
+
4736
+
4737
+
4738
+
4739
+
4740
+
4741
+
4742
+
4743
+
4744
+
4745
+
4746
+
4747
+
4748
+
4749
+
4750
+
4751
+
4752
+
4753
+
4754
+
4755
+
4756
+
4757
+
4758
+
4759
+ <dt class="tag-source">Source:</dt>
4760
+ <dd class="tag-source"><ul class="dummy"><li>
4761
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line25">line 25</a>
4762
+ </li></ul></dd>
4763
+
4764
+
4765
+
4766
+
4767
+
4768
+
4769
+
4770
+ </dl>
4771
+
4772
+
4773
+
4774
+
4775
+
4776
+
4777
+
4778
+
4779
+
4780
+ <h5>Parameters:</h5>
4781
+
4782
+
4783
+ <table class="params">
4784
+ <thead>
4785
+ <tr>
4786
+
4787
+ <th>Name</th>
4788
+
4789
+
4790
+ <th>Type</th>
4791
+
4792
+
4793
+
4794
+
4795
+
4796
+ <th class="last">Description</th>
4797
+ </tr>
4798
+ </thead>
4799
+
4800
+ <tbody>
4801
+
4802
+
4803
+ <tr>
4804
+
4805
+ <td class="name"><code>config</code></td>
4806
+
4807
+
4808
+ <td class="type">
4809
+
4810
+
4811
+ <span class="param-type"><code>Object</code></span>
4812
+
4813
+
4814
+
4815
+ </td>
4816
+
4817
+
4818
+
4819
+
4820
+
4821
+ <td class="description last">
4822
+ Configuration object containing Sanity API settings.
4823
+
4824
+
4825
+
4826
+ <table class="params">
4827
+ <thead>
4828
+ <tr>
4829
+
4830
+ <th>Name</th>
4831
+
4832
+
4833
+ <th>Type</th>
4834
+
4835
+
4836
+ <th>Attributes</th>
4837
+
4838
+
4839
+
4840
+ <th>Default</th>
4841
+
4842
+
4843
+ <th class="last">Description</th>
4844
+ </tr>
4845
+ </thead>
4846
+
4847
+ <tbody>
4848
+
4849
+
4850
+ <tr>
4851
+
4852
+ <td class="name"><code>token</code></td>
4853
+
4854
+
4855
+ <td class="type">
4856
+
4857
+
4858
+ <span class="param-type"><code>string</code></span>
4859
+
4860
+
4861
+
4862
+ </td>
4863
+
4864
+
4865
+ <td class="attributes">
4866
+
4867
+
4868
+
4869
+
4870
+
4871
+ </td>
4872
+
4873
+
4874
+
4875
+ <td class="default">
4876
+
4877
+ </td>
4878
+
4879
+
4880
+ <td class="description last">
4881
+ The API token for authenticating with Sanity.
4882
+
4883
+ </td>
4884
+ </tr>
4885
+
4886
+
4887
+
4888
+ <tr>
4889
+
4890
+ <td class="name"><code>projectId</code></td>
4891
+
4892
+
4893
+ <td class="type">
4894
+
4895
+
4896
+ <span class="param-type"><code>string</code></span>
4897
+
4898
+
4899
+
4900
+ </td>
4901
+
4902
+
4903
+ <td class="attributes">
4904
+
4905
+
4906
+
4907
+
4908
+
4909
+ </td>
4910
+
4911
+
4912
+
4913
+ <td class="default">
4914
+
4915
+ </td>
4916
+
4917
+
4918
+ <td class="description last">
4919
+ The project ID in Sanity.
4920
+
4921
+ </td>
4922
+ </tr>
4923
+
4924
+
4925
+
4926
+ <tr>
4927
+
4928
+ <td class="name"><code>dataset</code></td>
4929
+
4930
+
4931
+ <td class="type">
4932
+
4933
+
4934
+ <span class="param-type"><code>string</code></span>
4935
+
4936
+
4937
+
4938
+ </td>
4939
+
4940
+
4941
+ <td class="attributes">
4942
+
4943
+
4944
+
4945
+
4946
+
4947
+ </td>
4948
+
4949
+
4950
+
4951
+ <td class="default">
4952
+
4953
+ </td>
4954
+
4955
+
4956
+ <td class="description last">
4957
+ The dataset name in Sanity.
4958
+
4959
+ </td>
4960
+ </tr>
4961
+
4962
+
4963
+
4964
+ <tr>
4965
+
4966
+ <td class="name"><code>version</code></td>
4967
+
4968
+
4969
+ <td class="type">
4970
+
4971
+
4972
+ <span class="param-type"><code>string</code></span>
4973
+
4974
+
4975
+
4976
+ </td>
4977
+
4978
+
4979
+ <td class="attributes">
4980
+
4981
+
4982
+
4983
+
4984
+
4985
+ </td>
4986
+
4987
+
4988
+
4989
+ <td class="default">
4990
+
4991
+ </td>
4992
+
4993
+
4994
+ <td class="description last">
4995
+ The API version to use.
4996
+
4997
+ </td>
4998
+ </tr>
4999
+
5000
+
5001
+
5002
+ <tr>
5003
+
5004
+ <td class="name"><code>debug</code></td>
5005
+
5006
+
5007
+ <td class="type">
5008
+
5009
+
5010
+ <span class="param-type"><code>boolean</code></span>
5011
+
5012
+
5013
+
5014
+ </td>
5015
+
5016
+
5017
+ <td class="attributes">
5018
+
5019
+ &lt;optional><br>
5020
+
5021
+
5022
+
5023
+
5024
+
5025
+ </td>
5026
+
5027
+
5028
+
5029
+ <td class="default">
5030
+
5031
+ false
5032
+
5033
+ </td>
5034
+
5035
+
5036
+ <td class="description last">
5037
+ Optional flag to enable debug mode, which logs the query and results.
5038
+
5039
+ </td>
5040
+ </tr>
5041
+
5042
+
5043
+
5044
+ <tr>
5045
+
5046
+ <td class="name"><code>useCachedAPI</code></td>
5047
+
5048
+
5049
+ <td class="type">
5050
+
5051
+
5052
+ <span class="param-type"><code>boolean</code></span>
5053
+
5054
+
5055
+
5056
+ </td>
5057
+
5058
+
5059
+ <td class="attributes">
5060
+
5061
+ &lt;optional><br>
5062
+
5063
+
5064
+
5065
+
5066
+
5067
+ </td>
5068
+
5069
+
5070
+
5071
+ <td class="default">
5072
+
5073
+ true
5074
+
5075
+ </td>
5076
+
5077
+
5078
+ <td class="description last">
5079
+ Optional flag to disable cached API. *
5080
+
5081
+ </td>
5082
+ </tr>
5083
+
5084
+
5085
+ </tbody>
5086
+ </table>
5087
+
5088
+
5089
+ </td>
5090
+ </tr>
5091
+
5092
+
5093
+ </tbody>
5094
+ </table>
5095
+
5096
+
5097
+
5098
+
5099
+
5100
+
5101
+
5102
+
5103
+
5104
+
5105
+
5106
+
5107
+
5108
+
5109
+
5110
+
5111
+ <div class="section-examples">
5112
+ <h5>Example</h5>
5113
+
5114
+ <pre class="prettyprint"><code>// Initialize the Sanity service in your app.js
5115
+ initializeSanityService({
5116
+ token: 'your-sanity-api-token',
5117
+ projectId: 'your-sanity-project-id',
5118
+ dataset: 'your-dataset-name',
5119
+ version: '2021-06-07',
5120
+ debug: true // Optional: Enable debug mode
5121
+ useCachedAPI: true // Optional: Use cached API
5122
+ });</code></pre>
5123
+
5124
+ </div>
5125
+
4748
5126
  </div>
4749
5127
 
4750
5128
 
@@ -4764,7 +5142,7 @@
4764
5142
  <br class="clear">
4765
5143
 
4766
5144
  <footer>
4767
- Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Aug 09 2024 20:57:53 GMT+0000 (Coordinated Universal Time) using the Minami theme.
5145
+ Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 12 2024 13:37:15 GMT+0000 (Coordinated Universal Time) using the Minami theme.
4768
5146
  </footer>
4769
5147
 
4770
5148
  <script>prettyPrint();</script>