@@ -369,10 +369,10 @@ export class Avatars extends Service {
369
369
* @param {number } height
370
370
* @param {number } quality
371
371
* @throws {AppwriteException }
372
- * @returns ArrayBuffer
372
+ * @returns { URL }
373
373
374
374
*/
375
- getBrowserURL ( code : Browser , width ?: number , height ?: number , quality ?: number ) : Promise < ArrayBuffer > {
375
+ getBrowserURL ( code : Browser , width ?: number , height ?: number , quality ?: number ) : URL {
376
376
const apiPath = '/avatars/browsers/{code}' . replace ( '{code}' , code ) ;
377
377
const payload : Payload = { } ;
378
378
@@ -390,8 +390,7 @@ export class Avatars extends Service {
390
390
391
391
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
392
392
393
- return this . client . call ( 'get' , uri , {
394
- } , payload ) ;
393
+ return uri ;
395
394
}
396
395
397
396
/**
@@ -410,10 +409,10 @@ export class Avatars extends Service {
410
409
* @param {number } height
411
410
* @param {number } quality
412
411
* @throws {AppwriteException }
413
- * @returns ArrayBuffer
412
+ * @returns { URL }
414
413
415
414
*/
416
- getCreditCardURL ( code : CreditCard , width ?: number , height ?: number , quality ?: number ) : Promise < ArrayBuffer > {
415
+ getCreditCardURL ( code : CreditCard , width ?: number , height ?: number , quality ?: number ) : URL {
417
416
const apiPath = '/avatars/credit-cards/{code}' . replace ( '{code}' , code ) ;
418
417
const payload : Payload = { } ;
419
418
@@ -431,8 +430,7 @@ export class Avatars extends Service {
431
430
432
431
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
433
432
434
- return this . client . call ( 'get' , uri , {
435
- } , payload ) ;
433
+ return uri ;
436
434
}
437
435
438
436
/**
@@ -443,10 +441,10 @@ export class Avatars extends Service {
443
441
*
444
442
* @param {string } url
445
443
* @throws {AppwriteException }
446
- * @returns ArrayBuffer
444
+ * @returns { URL }
447
445
448
446
*/
449
- getFaviconURL ( url : string ) : Promise < ArrayBuffer > {
447
+ getFaviconURL ( url : string ) : URL {
450
448
const apiPath = '/avatars/favicon' ;
451
449
const payload : Payload = { } ;
452
450
@@ -456,8 +454,7 @@ export class Avatars extends Service {
456
454
457
455
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
458
456
459
- return this . client . call ( 'get' , uri , {
460
- } , payload ) ;
457
+ return uri ;
461
458
}
462
459
463
460
/**
@@ -477,10 +474,10 @@ export class Avatars extends Service {
477
474
* @param {number } height
478
475
* @param {number } quality
479
476
* @throws {AppwriteException }
480
- * @returns ArrayBuffer
477
+ * @returns { URL }
481
478
482
479
*/
483
- getFlagURL ( code : Flag , width ?: number , height ?: number , quality ?: number ) : Promise < ArrayBuffer > {
480
+ getFlagURL ( code : Flag , width ?: number , height ?: number , quality ?: number ) : URL {
484
481
const apiPath = '/avatars/flags/{code}' . replace ( '{code}' , code ) ;
485
482
const payload : Payload = { } ;
486
483
@@ -498,8 +495,7 @@ export class Avatars extends Service {
498
495
499
496
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
500
497
501
- return this . client . call ( 'get' , uri , {
502
- } , payload ) ;
498
+ return uri ;
503
499
}
504
500
505
501
/**
@@ -519,10 +515,10 @@ export class Avatars extends Service {
519
515
* @param {number } width
520
516
* @param {number } height
521
517
* @throws {AppwriteException }
522
- * @returns ArrayBuffer
518
+ * @returns { URL }
523
519
524
520
*/
525
- getImageURL ( url : string , width ?: number , height ?: number ) : Promise < ArrayBuffer > {
521
+ getImageURL ( url : string , width ?: number , height ?: number ) : URL {
526
522
const apiPath = '/avatars/image' ;
527
523
const payload : Payload = { } ;
528
524
@@ -540,8 +536,7 @@ export class Avatars extends Service {
540
536
541
537
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
542
538
543
- return this . client . call ( 'get' , uri , {
544
- } , payload ) ;
539
+ return uri ;
545
540
}
546
541
547
542
/**
@@ -567,10 +562,10 @@ export class Avatars extends Service {
567
562
* @param {number } height
568
563
* @param {string } background
569
564
* @throws {AppwriteException }
570
- * @returns ArrayBuffer
565
+ * @returns { URL }
571
566
572
567
*/
573
- getInitialsURL ( name ?: string , width ?: number , height ?: number , background ?: string ) : Promise < ArrayBuffer > {
568
+ getInitialsURL ( name ?: string , width ?: number , height ?: number , background ?: string ) : URL {
574
569
const apiPath = '/avatars/initials' ;
575
570
const payload : Payload = { } ;
576
571
@@ -592,8 +587,7 @@ export class Avatars extends Service {
592
587
593
588
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
594
589
595
- return this . client . call ( 'get' , uri , {
596
- } , payload ) ;
590
+ return uri ;
597
591
}
598
592
599
593
/**
@@ -606,10 +600,10 @@ export class Avatars extends Service {
606
600
* @param {number } margin
607
601
* @param {boolean } download
608
602
* @throws {AppwriteException }
609
- * @returns ArrayBuffer
603
+ * @returns { URL }
610
604
611
605
*/
612
- getQRURL ( text : string , size ?: number , margin ?: number , download ?: boolean ) : Promise < ArrayBuffer > {
606
+ getQRURL ( text : string , size ?: number , margin ?: number , download ?: boolean ) : URL {
613
607
const apiPath = '/avatars/qr' ;
614
608
const payload : Payload = { } ;
615
609
@@ -631,7 +625,6 @@ export class Avatars extends Service {
631
625
632
626
const uri = new URL ( this . client . config . endpoint + apiPath ) ;
633
627
634
- return this . client . call ( 'get' , uri , {
635
- } , payload ) ;
628
+ return uri ;
636
629
}
637
630
} ;
0 commit comments