ampedradio / alexa-streaming-php
Simple base package to create a streaming audio Alexa skill in PHP
v0.1
2019-10-03 14:29 UTC
Requires
- php: ^7.2
- ext-json: *
- nomisoft/php-alexa-helper: ^1.2
- ramsey/uuid: ^3.8
- vlucas/phpdotenv: ^3.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- jakub-onderka/php-parallel-lint: ^1.0
- phpstan/phpstan: ^0.11.16
- phpunit/phpunit: ^8.3
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-11-26 06:45:27 UTC
README
Alexa Streaming in PHP
This library provides a simple way to create a streaming audio skill for the Amazon Alexa platform.
Installation
The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json
:
composer require ampedradio/alexa-streaming-php
Alexa Skill Setup
Coming soon. Stay tuned.
Example Usage
use AmpedRadio\AlexaStreamingPHP\AlexaStreaming; use AmpedRadio\AlexaStreamingPHP\AlexaStreamingConfig; use Ramsey\Uuid\Uuid; $config = new AlexaStreamingConfig(); $config->app_id = 'amzn1.ask.skill.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; $config->stream_url = 'https://<stream-url>'; $config->title = 'Amped Radio'; $config->subtitle = 'Fueling The Original Social Network'; $config->art = 'https://<domain>/art.png'; $config->background_image = 'https://<domain>/background.png'; $config->stream_token = Uuid::uuid4(); $alexa = new AlexaStreaming($config); $response = $alexa->execute(); header('Content-Type: application/json'); echo json_encode($response);
Credits
- Created by Bill Condo
- Logo by Caneco