musee/pinata-laravel is a Laravel package for the laravel provider for pinata api..
It currently has 0 GitHub stars and 23 downloads on Packagist (latest version v0.1.2).
Install it with composer require musee/pinata-laravel.
Discover more Laravel packages by musee
or browse all Laravel packages to compare alternatives.
Last updated
This is a Laravel/Lumen provider for interacting with Pinata API.
Require this package with composer using the following command:
composer require danielcrt/pinata-laravel
Add your API credentials to pinata array in the config/services.php config file as follows:
return [
...
'pinata' => [
'api_key' => env('PINATA_API_KEY'),
'secret_key' => env('PINATA_API_SECRET')
]
]
Add the service provider to the providers array in the config/app.php config file as follows:
'providers' => [
...
\Pinata\Providers\PinataServiceProvider::class,
]
Add the following snippet to the bootstrap/app.php file under the providers section as follows:
$app->configure('services');
$app->register(Pinata\Providers\PinataServiceProvider::class);
Pin a File to IPFS
use Pinata\Facades\Pinata;
$file_path = '';
$response = Pinata::pinFileToIPFS($file_path);
Pin a JSON to IPFS
use Pinata\Facades\Pinata;
$json = [];
$response = Pinata::pinJSONToIPFS($json);
Unpin
use Pinata\Facades\Pinata;
$ipfs_hash = '';
$response = Pinata::removePinFromIPFS($ipfs_hash);
For more details about request parameters and responses please visit the official documentation: https://docs.pinata.cloud
addHashToPinQueue
pinFileToIPFS
pinHashToIPFS
pinJobs
pinJSONToIPFS
removePinFromIPFS
userPinnedDataTotal
userPinList