PHP code example of padosoft / askmydocs-connector-freshdesk

1. Go to this page and download the library: Download padosoft/askmydocs-connector-freshdesk 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/ */

    

padosoft / askmydocs-connector-freshdesk example snippets


use Padosoft\AskMyDocsConnectorFreshdesk\Tools\FreshdeskTools;

// Il middleware o il job dell'host ha già attivato il tenant corretto.
$tools = app(FreshdeskTools::class);
$catalog = $tools->catalog('support');
$result = $tools->execute('freshdesk_42_get_ticket', ['id' => 123], 'support');
// result: data/error, physical_request_count e provenance.
bash
php scripts/install-freshdesk-local.php
COMPOSER=composer.local.json composer update padosoft/askmydocs-connector-freshdesk --no-interaction
php artisan vendor:publish --tag=connector-freshdesk-assets
php artisan migrate
http
PATCH /api/admin/connectors/42
Content-Type: application/json

{
  "settings": {
    "ingestion": { "enabled": true },
    "chat_tools": { "enabled": false },
    "case_studies": { "enabled": true }
  }
}
http
PATCH /api/admin/connectors/{installationId}
Content-Type: application/json

{"settings":{"history":{"start_date":"2024-01-01"}}}
bash
php artisan vendor:publish --tag=connector-freshdesk-config
php artisan queue:work --queue=connectors,default --timeout=600 --tries=3