Page 1 of 1

New vicidial api wrapper

PostPosted: Wed Mar 03, 2021 10:24 am
by fperdomo
Hello all,

I was looking into an API wrapper for Vicidial API and I saw that is out of update (the last update was on Oct 24, 2017) so create my own version so will make it easy to integrate any PHP application. On this version, I added support to all Vicidial API functions.

Features:
- Added HTTPS support
- All Vicidial Agent API support
- Created documentation based on Vicidial on a Markdown page instead of a text file so gonna be easy to read it.
- Composer installation support
- Easy to integrate any CRM, Ticket system, or PHP based application
- Focus on simplicity and easy to use

Repository
https://github.com/masterfermin02/vicidial-api-wrapper

Code: Select all
<?php

require_once 'vendor/autoload.php';

use Vicidial\Api\Wrapper\Agent\Client;

try {
     $vicidialAPI = new Client("127.0.0.1", "6666", "123");
     $agent_user = '1000';
     $vicidialAPI->ra_call_control($agent_user, [
        'stage' => 'INGROUPTRANSFER',
        'ingroup_choices' => 'DEFAULTINGROUP',
        'value' => 'Y0316001655000402028'
     ]);
} catch (Exception $e) {
     echo 'Exception: ',  $e->getMessage(), "\n";
}

Re: New vicidial api wrapper

PostPosted: Wed Mar 03, 2021 10:30 am
by mflorell
Thanks for posting!

Re: New vicidial api wrapper

PostPosted: Wed Mar 03, 2021 12:30 pm
by carpenox
Good shit, great post

Re: New vicidial api wrapper

PostPosted: Sun Mar 07, 2021 4:45 pm
by fperdomo
Thanks @mflorell and @carpenox. I also added support to the no agent API or admin API.

https://github.com/masterfermin02/vicid ... -agent-api

Example:
Code: Select all
<?php
   
    require_once 'vendor/autoload.php';
   
    use Vicidial\Api\Wrapper\Admin\Client;
   
    try {
        $admin = new Client("viciexperts.com/admin_demo/", "12345", "12345");
        echo $admin->moh_list([
            'format' => 'selectframe',
            'comments' => 'fieldname',
            'stage' => 'date'
        ]);
    } catch (Exception $e) {
        echo 'Exception: ',  $e->getMessage(), "\n";
    }

Re: New vicidial api wrapper

PostPosted: Mon Mar 20, 2023 11:14 pm
by martinch
Really nice! Thank you!