<commit_before><?php
/**
 * [RO] Listeaza produsele live dintr-o categorie precizata prin parametru (https://github.com/celdotro/marketplace/wiki/Preluare-produse-live-din-categorie)
 * [EN] List all live products from a category (https://github.com/celdotro/marketplace/wiki/Retrieve-live-products-from-category)
 */
include __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'api_include.php';




use celmarket\Products\ProductsList;

#0#
#FUNCTION#
function getLiveProductsFromCategory($category, $start = null, $limit = null){
    $object = new ProductsList();

    try{
        $response = $object->getLiveProductsFromCategory($category, $start, $limit);
        print_r($response);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}

#EXAMPLE#
$category = 1;
$start = 0;
$limit = 10;
getLiveProductsFromCategory($category, $start, $limit);<commit_msg>Added keyword to live product listing<commit_after><?php
/**
 * [RO] Listeaza produsele live dintr-o categorie precizata prin parametru (https://github.com/celdotro/marketplace/wiki/Preluare-produse-live-din-categorie)
 * [EN] List all live products from a category (https://github.com/celdotro/marketplace/wiki/Retrieve-live-products-from-category)
 */
include __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'api_include.php';




use celmarket\Products\ProductsList;

#0#
#FUNCTION#
function getLiveProductsFromCategory($category, $keyword = null, $start = null, $limit = null){
    $object = new ProductsList();

    try{
        $response = $object->getLiveProductsFromCategory($category, $start, $limit);
        print_r($response);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
}

#EXAMPLE#
$category = 91;
$keyword = 'product_name';
$start = 0;
$limit = 10;
getLiveProductsFromCategory($category, $keyword, $start, $limit);
{'fraction_non_alphanumeric': 0.14494321254732287, 'fraction_numerical': 0.005949161709031909, 'mean_word_length': 4.425219941348973, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '922305', 'n_tokens_mistral': 626, 'n_tokens_neox': 596, 'n_words': 127}