PHP code example of apsg / da-gallery-fetcher

1. Go to this page and download the library: Download apsg/da-gallery-fetcher 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/ */

    

apsg / da-gallery-fetcher example snippets


return [
    'username' => env('DA_USERNAME'),
    'cache'    => true,

    'oauth' => [
        'token_url' => 'https://www.deviantart.com/oauth2/token',
        'client_id' => env('DA_CLIENT_ID'),
        'secret'    => env('DA_SECRET'),
    ],
];

$dafetcher = new Apsg\Dafetcher();
$collection = $dafetcher->fetch();
 
$collection = $dafetcher->forUser('other-user')->fetch();
 
$dafetcher = new Apsg\Dafetcher();
$freshResults = $dafetcher->noCache()->fetch(); 

$transformedResults = $dafetcher->fetchTransformed();
bash
php artisan vendor:publish --provider="Apsg\Dafetcher\DafetcherServiceProvider" --tag="dafetcher-config"