Skip to content

Latest commit

 

History

History
209 lines (143 loc) · 6.81 KB

File metadata and controls

209 lines (143 loc) · 6.81 KB

blockfrost.api.IPFSPinsApi

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
ipfsPinAddIPFSPathPost POST /ipfs/pin/add/{IPFS_path} Pin an object
ipfsPinListGet GET /ipfs/pin/list List pinned objects
ipfsPinListIPFSPathGet GET /ipfs/pin/list/{IPFS_path} Get details about pinned object
ipfsPinRemoveIPFSPathPost POST /ipfs/pin/remove/{IPFS_path}

ipfsPinAddIPFSPathPost

IpfsPinAddIPFSPathPost200Response ipfsPinAddIPFSPathPost(iPFSPath)

Pin an object

Pinned objects are counted in your user storage 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().getIPFSPinsApi();
final String iPFSPath = iPFSPath_example; // String | 

try {
    final response = api.ipfsPinAddIPFSPathPost(iPFSPath);
    print(response);
} catch on DioError (e) {
    print('Exception when calling IPFSPinsApi->ipfsPinAddIPFSPathPost: $e\n');
}

Parameters

Name Type Description Notes
iPFSPath String

Return type

IpfsPinAddIPFSPathPost200Response

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]

ipfsPinListGet

BuiltList ipfsPinListGet(count, page, order)

List pinned objects

List objects pinned to local storage

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().getIPFSPinsApi();
final int count = 56; // int | The number of results displayed on one page.
final int page = 56; // int | The page number for listing the results.
final String order = order_example; // String | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. 

try {
    final response = api.ipfsPinListGet(count, page, order);
    print(response);
} catch on DioError (e) {
    print('Exception when calling IPFSPinsApi->ipfsPinListGet: $e\n');
}

Parameters

Name Type Description Notes
count int The number of results displayed on one page. [optional] [default to 100]
page int The page number for listing the results. [optional] [default to 1]
order String The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. [optional] [default to 'asc']

Return type

BuiltList<IpfsPinListGet200ResponseInner>

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]

ipfsPinListIPFSPathGet

IpfsPinListIPFSPathGet200Response ipfsPinListIPFSPathGet(iPFSPath)

Get details about pinned object

Get information about locally pinned IPFS object

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().getIPFSPinsApi();
final String iPFSPath = iPFSPath_example; // String | 

try {
    final response = api.ipfsPinListIPFSPathGet(iPFSPath);
    print(response);
} catch on DioError (e) {
    print('Exception when calling IPFSPinsApi->ipfsPinListIPFSPathGet: $e\n');
}

Parameters

Name Type Description Notes
iPFSPath String

Return type

IpfsPinListIPFSPathGet200Response

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]

ipfsPinRemoveIPFSPathPost

IpfsPinRemoveIPFSPathPost200Response ipfsPinRemoveIPFSPathPost(iPFSPath)

Remove pinned objects from local storage

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().getIPFSPinsApi();
final String iPFSPath = iPFSPath_example; // String | 

try {
    final response = api.ipfsPinRemoveIPFSPathPost(iPFSPath);
    print(response);
} catch on DioError (e) {
    print('Exception when calling IPFSPinsApi->ipfsPinRemoveIPFSPathPost: $e\n');
}

Parameters

Name Type Description Notes
iPFSPath String

Return type

IpfsPinRemoveIPFSPathPost200Response

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]