mirror of
https://github.com/kevin-DL/scraps.git
synced 2026-01-11 09:54:32 +00:00
27 lines
672 B
PHP
27 lines
672 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Http\Integrations\Spoonacular\Requests\FindRecipesByIngredients;
|
|
use App\Http\Integrations\Spoonacular\SpoonacularConnector;
|
|
use Illuminate\Console\Command;
|
|
|
|
class TestSpoonacularCommand extends Command
|
|
{
|
|
protected $signature = 'test:spoonacular';
|
|
|
|
protected $description = 'Command description';
|
|
|
|
public function handle(): void
|
|
{
|
|
$connector = new SpoonacularConnector();
|
|
$request = new FindRecipesByIngredients(
|
|
ingredients: ['salmon', 'cheese', 'tomato'],
|
|
ranking: 2
|
|
);
|
|
|
|
$response = $connector->send($request);
|
|
dd($response->json());
|
|
}
|
|
}
|