<commit_before><?php
include __DIR__ . '/../../vendor/autoload.php';

/**
 * This example shows how to insert or delete products to the ProductsUp API if you used the content API for shopping
 * before and have already a site to upload to.
 *
 * You need to have a site to upload products to. On how to create and enable sites
 * @see /examples/migrateContentAPI/addingSites.php and @see /examples/Service/Sites.php
 */

// authorization provided at http://platform.productsup.com/
$client = new \Productsup\Client();
$client->id = 1234;
$client->secret = 'simsalabim';

$productsService = new \Productsup\Service\ProductData($client);
// reference to the site you want to add or delete products for, for a more detailed description @see /examples/Service/Sites.php
$reference = new \Productsup\Platform\Site\Reference();
$reference->setKey('MyTestReference');
$reference->setValue('TestId');
$productsService->setReference($reference);

/**
 * one example with all fields supported by the content API for shopping. Not all of the fields are required,
 * only the "id" column is mandatory.
 *
 * note: the field names are similar to the content API, but may be slightly different
 */
$product = array(
    'id' => 1,
    'additionalImageLinks' => 'http://example.com/img/1.jpg,http://example.com/img/2.jpg',
    'adult' => 1,
    'adwords_grouping' => '',
    'adwords_labels' => '',
    'adwords_redirect' => '',
    'age_group' => 'adult',
    'availability' => 'in stock',
    'availability_date' => '2014-12-01',
    'brand' => 'my brand',
    'color' => 'red',<commit_msg>using singular for additionalImageLink<commit_after><?php
include __DIR__ . '/../../vendor/autoload.php';

/**
 * This example shows how to insert or delete products to the ProductsUp API if you used the content API for shopping
 * before and have already a site to upload to.
 *
 * You need to have a site to upload products to. On how to create and enable sites
 * @see /examples/migrateContentAPI/addingSites.php and @see /examples/Service/Sites.php
 */

// authorization provided at http://platform.productsup.com/
$client = new \Productsup\Client();
$client->id = 1234;
$client->secret = 'simsalabim';

$productsService = new \Productsup\Service\ProductData($client);
// reference to the site you want to add or delete products for, for a more detailed description @see /examples/Service/Sites.php
$reference = new \Productsup\Platform\Site\Reference();
$reference->setKey('MyTestReference');
$reference->setValue('TestId');
$productsService->setReference($reference);

/**
 * one example with all fields supported by the content API for shopping. Not all of the fields are required,
 * only the "id" column is mandatory.
 *
 * note: the field names are similar to the content API, but may be slightly different
 */
$product = array(
    'id' => 1,
    'additionalImageLink' => 'http://example.com/img/1.jpg,http://example.com/img/2.jpg',
    'adult' => 1,
    'adwords_grouping' => '',
    'adwords_labels' => '',
    'adwords_redirect' => '',
    'age_group' => 'adult',
    'availability' => 'in stock',
    'availability_date' => '2014-12-01',
    'brand' => 'my brand',
    'color' => 'red',
{'fraction_non_alphanumeric': 0.14159848961611077, 'fraction_numerical': 0.010069225928256766, 'mean_word_length': 3.9517133956386292, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, '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': '6262210', 'n_tokens_mistral': 962, 'n_tokens_neox': 929, 'n_words': 318}