From a1e53cd4e3a75bbaa4e36a0d192d46ea828e40e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 12 Apr 2022 11:36:03 +0000 Subject: [PATCH 1/5] Properly crop images in avatars API --- app/controllers/api/avatars.php | 32 +++++++++++++++++++++----------- composer.lock | 2 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 9d483bf2b7..83b3d0bccd 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -91,8 +91,8 @@ App::get('/v1/avatars/credit-cards/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-credit-cards'))), 'Credit Card Code. Possible values: ' . \implode(', ', \array_keys(Config::getParam('avatar-credit-cards'))) . '.') - ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('credit-cards', $code, $width, $height, $quality, $response)); @@ -109,8 +109,8 @@ App::get('/v1/avatars/browsers/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-browsers'))), 'Browser Code.') - ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('browsers', $code, $width, $height, $quality, $response)); @@ -127,8 +127,8 @@ App::get('/v1/avatars/flags/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-flags'))), 'Country Code. ISO Alpha-2 country code format.') - ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('flags', $code, $width, $height, $quality, $response)); @@ -145,8 +145,8 @@ App::get('/v1/avatars/image') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) ->param('url', '', new URL(['http', 'https']), 'Image URL which you want to crop.') - ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) - ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) + ->param('width', 0, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) + ->param('height', 0, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) ->inject('response') ->action(function ($url, $width, $height, $response) { /** @var Appwrite\Utopia\Response $response */ @@ -367,7 +367,7 @@ App::get('/v1/avatars/qr') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('text', '', new Text(512), 'Plain text to be converted to QR code image.') - ->param('size', 400, new Range(0, 1000), 'QR code size. Pass an integer between 0 to 1000. Defaults to 400.', true) + ->param('size', 400, new Range(1, 1000), 'QR code size. Pass an integer between 1 to 1000. Defaults to 400.', true) ->param('margin', 1, new Range(0, 10), 'Margin from edge. Pass an integer between 0 to 10. Defaults to 1.', true) ->param('download', false, new Boolean(true), 'Return resulting image with \'Content-Disposition: attachment \' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.', true) ->inject('response') @@ -410,8 +410,8 @@ App::get('/v1/avatars/initials') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('name', '', new Text(128), 'Full Name. When empty, current user name or email will be used. Max length: 128 chars.', true) - ->param('width', 500, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 500, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('color', '', new HexColor(), 'Changes text color. By default a random color will be picked and stay will persistent to the given name.', true) ->param('background', '', new HexColor(), 'Changes background color. By default a random color will be picked and stay will persistent to the given name.', true) ->inject('response') @@ -420,6 +420,16 @@ App::get('/v1/avatars/initials') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ + // Default to 100x100 pixels + if($width === 0 && $height === 0) { + $width = 100; + $height = 100; + } + + // Default to square + $width = $width === 0 ? $height : $width; + $height = $height === 0 ? $width : $height; + $themes = [ ['color' => '#27005e', 'background' => '#e1d2f6'], // VIOLET ['color' => '#5e2700', 'background' => '#f3d9c6'], // ORANGE diff --git a/composer.lock b/composer.lock index 866dec5cec..d9d2f30b2b 100644 --- a/composer.lock +++ b/composer.lock @@ -6584,5 +6584,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From 69a5dd886c5780db9e713a31388ed33ce6cda0fd Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 20 Apr 2022 10:27:28 +0200 Subject: [PATCH 2/5] Revert changes --- app/controllers/api/avatars.php | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 83b3d0bccd..03ecf2d4da 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -91,8 +91,8 @@ App::get('/v1/avatars/credit-cards/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-credit-cards'))), 'Credit Card Code. Possible values: ' . \implode(', ', \array_keys(Config::getParam('avatar-credit-cards'))) . '.') - ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('credit-cards', $code, $width, $height, $quality, $response)); @@ -109,8 +109,8 @@ App::get('/v1/avatars/browsers/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-browsers'))), 'Browser Code.') - ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('browsers', $code, $width, $height, $quality, $response)); @@ -145,8 +145,8 @@ App::get('/v1/avatars/image') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) ->param('url', '', new URL(['http', 'https']), 'Image URL which you want to crop.') - ->param('width', 0, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) - ->param('height', 0, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) + ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) + ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) ->inject('response') ->action(function ($url, $width, $height, $response) { /** @var Appwrite\Utopia\Response $response */ @@ -410,8 +410,8 @@ App::get('/v1/avatars/initials') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('name', '', new Text(128), 'Full Name. When empty, current user name or email will be used. Max length: 128 chars.', true) - ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 500, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 500, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('color', '', new HexColor(), 'Changes text color. By default a random color will be picked and stay will persistent to the given name.', true) ->param('background', '', new HexColor(), 'Changes background color. By default a random color will be picked and stay will persistent to the given name.', true) ->inject('response') @@ -420,16 +420,6 @@ App::get('/v1/avatars/initials') /** @var Appwrite\Utopia\Response $response */ /** @var Utopia\Database\Document $user */ - // Default to 100x100 pixels - if($width === 0 && $height === 0) { - $width = 100; - $height = 100; - } - - // Default to square - $width = $width === 0 ? $height : $width; - $height = $height === 0 ? $width : $height; - $themes = [ ['color' => '#27005e', 'background' => '#e1d2f6'], // VIOLET ['color' => '#5e2700', 'background' => '#f3d9c6'], // ORANGE From 69051a54f142381242608594cad7ded48e393343 Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 20 Apr 2022 10:31:12 +0200 Subject: [PATCH 3/5] Update docs --- app/controllers/api/avatars.php | 8 ++++---- docs/references/avatars/get-browser.md | 4 +++- docs/references/avatars/get-credit-card.md | 4 +++- docs/references/avatars/get-flag.md | 4 +++- docs/references/avatars/get-image.md | 4 +++- docs/references/avatars/get-initials.md | 4 +++- docs/references/avatars/get-qr.md | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 03ecf2d4da..939b5ef96f 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -127,8 +127,8 @@ App::get('/v1/avatars/flags/:code') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE_PNG) ->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-flags'))), 'Country Code. ISO Alpha-2 country code format.') - ->param('width', 0, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) - ->param('height', 0, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true) + ->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true) ->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true) ->inject('response') ->action(fn($code, $width, $height, $quality, $response) => $avatarCallback('flags', $code, $width, $height, $quality, $response)); @@ -145,8 +145,8 @@ App::get('/v1/avatars/image') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_IMAGE) ->param('url', '', new URL(['http', 'https']), 'Image URL which you want to crop.') - ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000.', true) - ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000.', true) + ->param('width', 400, new Range(0, 2000), 'Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.', true) + ->param('height', 400, new Range(0, 2000), 'Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.', true) ->inject('response') ->action(function ($url, $width, $height, $response) { /** @var Appwrite\Utopia\Response $response */ diff --git a/docs/references/avatars/get-browser.md b/docs/references/avatars/get-browser.md index 8bc41911e8..7cc841e9da 100644 --- a/docs/references/avatars/get-browser.md +++ b/docs/references/avatars/get-browser.md @@ -1 +1,3 @@ -You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. \ No newline at end of file +You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. + +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. diff --git a/docs/references/avatars/get-credit-card.md b/docs/references/avatars/get-credit-card.md index 8e7fb59bbd..5cf76176d3 100644 --- a/docs/references/avatars/get-credit-card.md +++ b/docs/references/avatars/get-credit-card.md @@ -1 +1,3 @@ -The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. \ No newline at end of file +The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. + +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. diff --git a/docs/references/avatars/get-flag.md b/docs/references/avatars/get-flag.md index ba7f230e14..04a8bbca64 100644 --- a/docs/references/avatars/get-flag.md +++ b/docs/references/avatars/get-flag.md @@ -1 +1,3 @@ -You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. \ No newline at end of file +You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. + +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. diff --git a/docs/references/avatars/get-image.md b/docs/references/avatars/get-image.md index 508ece8a34..efd654b362 100644 --- a/docs/references/avatars/get-image.md +++ b/docs/references/avatars/get-image.md @@ -1 +1,3 @@ -Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. \ No newline at end of file +Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol. + +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px. diff --git a/docs/references/avatars/get-initials.md b/docs/references/avatars/get-initials.md index 87dafd3afb..610e2611e8 100644 --- a/docs/references/avatars/get-initials.md +++ b/docs/references/avatars/get-initials.md @@ -1,3 +1,5 @@ Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned. -You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. \ No newline at end of file +You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials. + +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. diff --git a/docs/references/avatars/get-qr.md b/docs/references/avatars/get-qr.md index 54c6c3588a..3218d28cf9 100644 --- a/docs/references/avatars/get-qr.md +++ b/docs/references/avatars/get-qr.md @@ -1 +1 @@ -Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. \ No newline at end of file +Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image. From ff28d0d2a190355fdc5f3efa00dbb4319fd48725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 25 Apr 2022 09:26:38 +0000 Subject: [PATCH 4/5] PR review changes --- composer.lock | 34 ++++++++++---------------- docs/references/avatars/get-browser.md | 4 +-- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index d9d2f30b2b..4cb16a1266 100644 --- a/composer.lock +++ b/composer.lock @@ -2250,16 +2250,16 @@ }, { "name": "utopia-php/framework", - "version": "0.19.8", + "version": "0.19.9", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d" + "reference": "4af9fc866edce1b8cff94731fb26c27599118e87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d", - "reference": "8c3b3e330546fd6cd65bd1f8d8d08882ff3abb7d", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/4af9fc866edce1b8cff94731fb26c27599118e87", + "reference": "4af9fc866edce1b8cff94731fb26c27599118e87", "shasum": "" }, "require": { @@ -2293,9 +2293,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.19.8" + "source": "https://github.com/utopia-php/framework/tree/0.19.9" }, - "time": "2022-04-12T00:28:15+00:00" + "time": "2022-04-14T15:39:47+00:00" }, { "name": "utopia-php/image", @@ -3551,16 +3551,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.66", + "version": "1.3.67", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" + "reference": "acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9", + "reference": "acaee1b7ca3cd67a39d7f98673cacd7e4739a8d9", "shasum": "" }, "require": { @@ -3609,23 +3609,15 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.67" }, "funding": [ { - "url": "https://github.com/[user1", - "type": "github" - }, - { - "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", - "type": "github" - }, - { - "url": "https://github.com/user2", + "url": "https://github.com/matthiasmullie", "type": "github" } ], - "time": "2021-01-06T15:18:10+00:00" + "time": "2022-03-24T08:54:59+00:00" }, { "name": "matthiasmullie/path-converter", diff --git a/docs/references/avatars/get-browser.md b/docs/references/avatars/get-browser.md index 7cc841e9da..616439a470 100644 --- a/docs/references/avatars/get-browser.md +++ b/docs/references/avatars/get-browser.md @@ -1,3 +1,3 @@ -You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings. +You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings. -When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. +When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. \ No newline at end of file From fe646e808d147db8db1db2dcce95b03cd48e778b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Apr 2022 10:32:38 +0000 Subject: [PATCH 5/5] Post-merge lockfile fix --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 6d052aed1c..ea07e51fea 100644 --- a/composer.lock +++ b/composer.lock @@ -6576,5 +6576,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" }