@@ -87,9 +87,43 @@ module.exports = class FortniteAPI {
8787 return Endpoints . Language ;
8888 } ;
8989
90+ async BRMap ( language ) {
91+ language = this . CheckLanguage ( language ) ;
92+ const res = await this . PreRequest ( Endpoints . BR_Map , { language : language } ) ;
93+ const result = await fetch ( res , this . headers ) ;
94+ const data = await result . json ( ) ;
95+ return data ;
96+
97+ } ;
98+
99+ async Playlists ( language ) {
100+ language = this . CheckLanguage ( language ) ;
101+ const res = await this . PreRequest ( Endpoints . Playlists , { language : language } ) ;
102+ const result = await fetch ( res , this . headers ) ;
103+ const data = await result . json ( ) ;
104+ return data ;
105+
106+ } ;
107+
108+ async PlaylistsID ( ID , language ) {
109+ language = this . CheckLanguage ( language ) ;
110+ if ( ! ID ) {
111+ if ( this . debug ) { console . log ( "[FortniteAPI.js] Missing 'ID' parameter." ) ; } ;
112+ return false ;
113+ } else if ( ID == "" ) {
114+ if ( this . debug ) { console . log ( "[FortniteAPI.js] 'ID' parameter is empty." ) ; } ;
115+ return false ;
116+ } else {
117+ const res = await this . PreRequest ( Endpoints . Playlists_ID + ID , { language : language } ) ;
118+ const result = await fetch ( res , this . headers ) ;
119+ const data = await result . json ( ) ;
120+ return data ;
121+ } ;
122+ } ;
123+
90124 async Banners ( language ) {
91125 language = this . CheckLanguage ( language ) ;
92- const res = await this . PreRequest ( Endpoints . Banners , { language : language } ) ;
126+ const res = await this . PreRequest ( Endpoints . Banners , { language : language } ) ;
93127 const result = await fetch ( res , this . headers ) ;
94128 const data = await result . json ( ) ;
95129 return data ;
@@ -136,15 +170,15 @@ module.exports = class FortniteAPI {
136170
137171 async BRShop ( language ) {
138172 language = this . CheckLanguage ( language ) ;
139- const res = await this . PreRequest ( Endpoints . BR_Shop , { language : language } ) ;
173+ const res = await this . PreRequest ( Endpoints . BR_Shop , { language : language } ) ;
140174 const result = await fetch ( res , this . headers ) ;
141175 const data = await result . json ( ) ;
142176 return data ;
143177 } ;
144178
145179 async BRShopCombined ( language ) {
146180 language = this . CheckLanguage ( language ) ;
147- const res = await this . PreRequest ( Endpoints . BR_ShopCombined , { language : language } ) ;
181+ const res = await this . PreRequest ( Endpoints . BR_ShopCombined , { language : language } ) ;
148182 const result = await fetch ( res , this . headers ) ;
149183 const data = await result . json ( ) ;
150184 return data ;
@@ -158,7 +192,7 @@ module.exports = class FortniteAPI {
158192 if ( this . debug ) { console . log ( "[FortniteAPI.js] Missing 'Name' parameter." ) ; } ;
159193 return false ;
160194 } else {
161- const res = await this . PreRequest ( Endpoints . Creator_Code , { name : name } ) ;
195+ const res = await this . PreRequest ( Endpoints . Creator_Code , { name : name } ) ;
162196 const result = await fetch ( res , this . headers ) ;
163197 const data = await result . json ( ) ;
164198 return data ;
@@ -173,7 +207,7 @@ module.exports = class FortniteAPI {
173207 if ( this . debug ) { console . log ( "[FortniteAPI.js] Missing 'Name' parameter." ) ; } ;
174208 return false ;
175209 } else {
176- const res = await this . PreRequest ( Endpoints . Creator_CodeSearch , { name : name } ) ;
210+ const res = await this . PreRequest ( Endpoints . Creator_CodeSearch , { name : name } ) ;
177211 const result = await fetch ( res , this . headers ) ;
178212 const data = await result . json ( ) ;
179213 return data ;
@@ -188,7 +222,7 @@ module.exports = class FortniteAPI {
188222 if ( this . debug ) { console . log ( "[FortniteAPI.js] Missing 'Name' parameter." ) ; } ;
189223 return false ;
190224 } else {
191- const res = await this . PreRequest ( Endpoints . Creator_CodeSearchAll , { name : name } ) ;
225+ const res = await this . PreRequest ( Endpoints . Creator_CodeSearchAll , { name : name } ) ;
192226 const result = await fetch ( res , this . headers ) ;
193227 const data = await result . json ( ) ;
194228 return data ;
@@ -197,15 +231,15 @@ module.exports = class FortniteAPI {
197231
198232 async CosmeticsNew ( language ) {
199233 language = this . CheckLanguage ( language ) ;
200- const res = await this . PreRequest ( Endpoints . Cosmetics_New , { language : language } ) ;
234+ const res = await this . PreRequest ( Endpoints . Cosmetics_New , { language : language } ) ;
201235 const result = await fetch ( res , this . headers ) ;
202236 const data = await result . json ( ) ;
203237 return data ;
204238 } ;
205239
206240 async CosmeticsList ( language ) {
207241 language = this . CheckLanguage ( language ) ;
208- const res = await this . PreRequest ( Endpoints . Cosmetics_List , { language : language } ) ;
242+ const res = await this . PreRequest ( Endpoints . Cosmetics_List , { language : language } ) ;
209243 const result = await fetch ( res , this . headers ) ;
210244 const data = await result . json ( ) ;
211245 return data ;
@@ -250,7 +284,7 @@ module.exports = class FortniteAPI {
250284 if ( this . debug ) { console . log ( "[FortniteAPI.js] 'ID' parameter is empty." ) ; } ;
251285 return false ;
252286 } else {
253- const res = await this . PreRequest ( Endpoints . Cosmetics_SearchByID + ID , { language : language } ) ;
287+ const res = await this . PreRequest ( Endpoints . Cosmetics_SearchByID + ID , { language : language } ) ;
254288 const result = await fetch ( res , this . headers ) ;
255289 const data = await result . json ( ) ;
256290 return data ;
@@ -266,7 +300,7 @@ module.exports = class FortniteAPI {
266300 if ( this . debug ) { console . log ( "[FortniteAPI.js] 'IDs' parameter is empty." ) ; } ;
267301 return false ;
268302 } else {
269- const res = await this . PreRequest ( Endpoints . Cosmetics_SearchByIDs , { id : ID , language : language } ) ;
303+ const res = await this . PreRequest ( Endpoints . Cosmetics_SearchByIDs , { id : ID , language : language } ) ;
270304 const result = await fetch ( res , this . headers ) ;
271305 const data = await result . json ( ) ;
272306 return data ;
@@ -275,31 +309,31 @@ module.exports = class FortniteAPI {
275309
276310 async News ( language ) {
277311 language = this . CheckLanguage ( language ) ;
278- const res = await this . PreRequest ( Endpoints . News , { language : language } ) ;
312+ const res = await this . PreRequest ( Endpoints . News , { language : language } ) ;
279313 const result = await fetch ( res , this . headers ) ;
280314 const data = await result . json ( ) ;
281315 return data ;
282316 } ;
283317
284318 async NewsBR ( language ) {
285319 language = this . CheckLanguage ( language ) ;
286- const res = await this . PreRequest ( Endpoints . News_BR , { language : language } ) ;
320+ const res = await this . PreRequest ( Endpoints . News_BR , { language : language } ) ;
287321 const result = await fetch ( res , this . headers ) ;
288322 const data = await result . json ( ) ;
289323 return data ;
290324 } ;
291325
292326 async NewsSTW ( language ) {
293327 language = this . CheckLanguage ( language ) ;
294- const res = await this . PreRequest ( Endpoints . News_STW , { language : language } ) ;
328+ const res = await this . PreRequest ( Endpoints . News_STW , { language : language } ) ;
295329 const result = await fetch ( res , this . headers ) ;
296330 const data = await result . json ( ) ;
297331 return data ;
298332 } ;
299333
300334 async NewsCreative ( language ) {
301335 language = this . CheckLanguage ( language ) ;
302- const res = await this . PreRequest ( Endpoints . News_Creative , { language : language } ) ;
336+ const res = await this . PreRequest ( Endpoints . News_Creative , { language : language } ) ;
303337 const result = await fetch ( res , this . headers ) ;
304338 const data = await result . json ( ) ;
305339 return data ;
0 commit comments