Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.56 KB

File metadata and controls

57 lines (38 loc) · 1.56 KB

blockfrost.api.IPFSAddApi

Load the API package

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

ipfsAddPost

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.

Example

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');
}

Parameters

This endpoint does not need any parameter.

Return type

IpfsAddPost200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]