Yo-back is a mini-framework written in PHP. It will allow you to deploy a Yo-enabled service in minutes.
- Clone this repository somewhere on your web server
- Run
composer update
- Make sure your web server is configured to expose the www folder
- Go to your Yo dashboard and grap your API token.
- Configure a callback URL for your account, routing to the www folder
- Rename the file
config/config.php.dist
inconfig/config.php
- Open it and paste your API token
- Write an "handler" closure as indicated in the header. This IS the only logic required. The handler is used to create a payload to send with your Yo.
Done! You're welcome.
A demo YoApp is available, courtesy of Emmanuel Pelletier. If you Yo to JEDEPRIME, it will Yo you back a random page from http://jedepri.me. jedepri.me is a French site which will definitely cheer you up when you feel a little bit depressed.
The demo consists in the following configuration:
return [
'api_token' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
'http' => new \Yo\HTTP\Client\LightCurl(),
'handler' => function($username, \Yo\Payload $payload = null) {
return new \Yo\Link('http://jedepri.me/toujours/');
}
];
Yo-back is licensed under BSD-2-Clause.