berkaybeyaz1 / one-signal-api-bundle

OneSignal API Symfony Bundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

one-signal-api-bundle

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 samiaraboglu\OneSignalApiBundle\OneSignalApiBundle(),
        );
        // ...
    }
    // ...
}

Config

Add this to config.yml:

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('one_signal_api.service');

$myApps = $service->apps->getAll();

About

OneSignal API Symfony Bundle

License:MIT License


Languages

Language:PHP 100.0%