PHP code example of sharpapi / laravel-tth-ta-product-categories

1. Go to this page and download the library: Download sharpapi/laravel-tth-ta-product-categories library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sharpapi / laravel-tth-ta-product-categories example snippets


return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];

use SharpAPI\TthTaProductCategories\TthTaProductCategoriesService;

$service = new TthTaProductCategoriesService();

// Categorize a tours & activities product
$categories = $service->toursAndActivitiesProductCategories(
    'Guided Hiking Tour of the Grand Canyon with Lunch',
    'Grand Canyon Village', // optional city
    'United States', // optional country
    'English', // optional language
    5, // optional max quantity of categories
    'professional', // optional voice tone
    'Full-day guided hiking tour with experienced guides, 
bash
php artisan vendor:publish --tag="sharpapi-tth-ta-product-categories"