import 'package:blockfrost/api.dart';All URIs are relative to https://cardano-mainnet.blockfrost.io/api/v0
| Method | HTTP request | Description |
|---|---|---|
| ipfsAddPost | POST /ipfs/add | Add a file to IPFS |
IpfsAddPost200Response ipfsAddPost()
Add a file to IPFS
You need to /ipfs/pin/add an object to avoid it being garbage collected. This usage is being counted in your user account quota.
import 'package:blockfrost/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
final api = Blockfrost().getIPFSAddApi();
try {
final response = api.ipfsAddPost();
print(response);
} catch on DioError (e) {
print('Exception when calling IPFSAddApi->ipfsAddPost: $e\n');
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]