Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 153 forks source link

Add head functionality in Generic Factory and Image Factory #462

Closed sanctusmob closed 1 year ago

sanctusmob commented 1 year ago

You can check if ID exists for entities and for images via head request.

ex. blExists = manufacturerFactory.CheckIfExists(lngManufacturerID); blExists = productFactory.CheckIfExists(lngProductID); blExists = imageFactory.CheckIfExistsCategoryImage(lngCategoryID); blExists = imageFactory.CheckIfExistsManufacturerImage(lngManufacturerID); blExists = imageFactory.CheckIfExistsProductImage(lngProductID, lngImageID); blExists = imageFactory.CheckIfExistsProductImage(lngProductID, null);

LameuleFR commented 1 year ago

Hi @sanctusmob

I approve this PR. Cool & efficient idea to check if an entity exists using the HEAD method LGTM🚀