1. Go to this page and download the library: Download cobwebinfo/shrek-api-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cobwebinfo / shrek-api-client example snippets
$provider = new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET
]);
$this->app->singleton(\Cobwebinfo\ShrekApiClient\ShrekServiceProvider::class, function() {
return new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET
]);
});
$provider = new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET,
'cache_driver' => 'memcache' OR 'apc'
]);
$provider = new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET,
'cache_driver' => '\Your\Namespace\ClassName'
]);
$provider = new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET,
'http_client' => 'asika'
]);
$provider = new \Cobwebinfo\ShrekApiClient\ShrekServiceProvider([
'client_id' => YOUR ID,
'client_secret'=> YOUR SECRET,
'http_client' => '\Your\Namespace\ClassName'
]);