Download the PHP package skollro/alexa-php-sdk without Composer

On this page you can find all versions of the php package skollro/alexa-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package alexa-php-sdk

Amazon Alexa SDK for PHP

Latest Version Build Status StyleCI

This package provides a framework-agnostic expressive SDK for developing Alexa skills in PHP based on https://github.com/maxbeckers/amazon-alexa-php.

Disclaimer

This package is no official Amazon Alexa SDK.

Until now this package does not support every operation which might be needed for writing Alexa skills but is a solid foundation. So feel free to PR missing features.

Install

You can install this package via composer:

Usage

Create a skill and handle requests

Use the following code as starting point for your own skill. First you have to create a Request object from the POST request's data. Then create a new skill with Alexa::skill($applicationId), passing your application id. Finally define your request handers and call handle($request) which handles the request and creates a response.

Middlewares

All requests are piped through several middlewares before the request handler is invoked. Remember to return $next($request, $response) to invoke the next middleware in the chain. If you return a $response from a middleware no other handlers are invoked and $response is returned immediately.

Automatically attached middlewares

When creating a skill with Alexa::skill($applicationId) we automatically attach the following two middlewares.

Before middleware

Checking for an access token is a typical use case for a middleware which runs before the request handler.

After middleware

To run a middleware after the request handler, store the result of $next($request, $response) in a temporary variable and return the response later.

Request handlers

Amazon Echo API sends different types of requests to your application. Use those callbacks to implement your skill's logic. You can use invokable classes for better encapsulation.

Responses

You can make use of a fluent and natural syntax for creating responses.

Exceptions

If you throw an exception in a request handler we invoke this callback so you can handle exceptions there.

License

The MIT License (MIT). Please see License File for more information.


All versions of alexa-php-sdk with dependencies

PHP Build Version
Package Version
Requires maxbeckers/amazon-alexa-php Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package skollro/alexa-php-sdk contains the following files

Loading the files please wait ....