samiaraboglu / one-signal-api-bundle
Symfony OneSignal Api Bundle
Installs: 4 467
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 4
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=5.5
- guzzlehttp/guzzle: ^6.0
- norkunas/onesignal-php-api: ^1.2
- php-http/guzzle6-adapter: ^1.0
- symfony/framework-bundle: ^3.0|^4.0
README
Use the OneSignal PHP API made by Norkunas.
Download the Bundle
$ composer require samiaraboglu/one-signal-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\OneSignalApiBundle\SamiaxOneSignalApiBundle(), ); // ... } // ... }
Config
Add this to config.yml:
samiax_one_signal_api: app_id: "{ONE_SIGNAL_API_APP_ID}" app_auth_key: "{ONE_SIGNAL_API_APP_AUTH_KEY}" user_auth_key: "{ONE_SIGNAL_API_USER_AUTH_KEY}"
Basic Use
Gets all apps:
$service = $this->get('samiax_one_signal_api.service'); $myApps = $service->apps->getAll();