samiaraboglu / alotech-api-bundle
Symfony AloTech Api Bundle
1.0.4
2019-03-06 16:10 UTC
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-08-29 04:54:38 UTC
README
下载包
$ composer require samiaraboglu/alotech-api-bundle
启用包
在项目的 app/AppKernel.php
文件中注册包
<?php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Samiax\AloTechApiBundle\SamiaxAloTechApiBundle(), ); // ... } // ... }
配置
将以下内容添加到 config.yml
samiax_alo_tech_api: username: "{USERNAME}" app_token: "{APP_TOKEN}"
示例 - 点击通话
/** * @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(); }