samiaraboglu / alotech-api-bundle
Symfony AloTech Api Bundle
Installs: 13 484
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5
- samiaraboglu/alotech-php-api: ^1.0.4
- symfony/framework-bundle: ^3.0|^4.0
This package is auto-updated.
Last update: 2024-11-29 05:38:46 UTC
README
Use the AloTech PHP API.
Download the Bundle
$ composer require samiaraboglu/alotech-api-bundle
Enable the Bundle
Registered bundles in the app/AppKernel.php
file of your project:
<?php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Samiax\AloTechApiBundle\SamiaxAloTechApiBundle(), ); // ... } // ... }
Config
Add this to config.yml:
samiax_alo_tech_api: username: "{USERNAME}" app_token: "{APP_TOKEN}"
Example - Click 2 Call
/** * @Route("/alotech/click2/call", name="alotech/click2/call") */ public function callAction(Request $request) { $service = $this->get('samiax_alo_tech_api.alotech'); $service->login('{EMAIL}'); $service->click2->call([ 'phonenumber' => '{PHONE_NUMBER}', 'hangup_url' => '{YOUR_HANGUP_URL}' ]); return new Response(); }