Last updated:
0 purchases
filecoin storage
FilecoinStorage #
This documentation describes the HTTP API Wrapper Client for web3.storage, which allows you to quickly and easily build applications using decentralized data storage persisted by Filecoin and available over IPFS.
API endpoint URL #
The main public API endpoint URL for web3.storage is https://api.web3.storage. All endpoints described in this document is made relative to this root URL.
Rate limits #
This API imposes rate limits to ensure quality of service. You may receive a 429 "Too many requests" error if you make more than 30 requests with the same API token within a ten second window. Upon receiving a response with a 429 status, you should retry the failed request after a small delay. To avoid 429 responses, you may wish to implement client-side request throttling to stay within the limits.
Requirements #
Dart 2.12 or later
Installation & Usage #
Add to your project's pubspec file.
Tests #
TODO
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:FilecoinStorage/api.dart';
final api_instance = Web3StorageHTTPAPIApi();
final cid = cid_example; // String |
try {
final result = api_instance.getCarCid(cid);
print(result);
} catch (e) {
print('Exception when calling Web3StorageHTTPAPIApi->getCarCid: $e\n');
}
copied to clipboard
Documentation for API Endpoints #
All URIs are relative to https://api.web3.storage
Class
Method
HTTP request
Description
Web3StorageHTTPAPIApi
getCarCid
GET /car/{cid}
Retrieve a CAR
Web3StorageHTTPAPIApi
getStatusCid
GET /status/{cid}
Retrieve information about an upload
Web3StorageHTTPAPIApi
getUserUpload
GET /user/uploads/{cid}
Returns a single upload
Web3StorageHTTPAPIApi
getUserUploads
GET /user/uploads
List previous uploads
Web3StorageHTTPAPIApi
headCarCid
HEAD /car/{cid}
Retrieve HTTP headers regarding a CAR
Web3StorageHTTPAPIApi
postCar
POST /car
Upload a CAR
Web3StorageHTTPAPIApi
postUpload
POST /upload
Upload and store one or more files
Documentation For Models #
Deal
ErrorResponse
ForbiddenErrorResponse
Pin
PinStatus
Status
UnauthorizedErrorResponse
UploadResponse
Documentation For Authorization #
// Get your token from web3.storage.
String aToken = "";
OAuth _oauth = OAuth(accessToken: aToken);
ApiClient _apiClient = ApiClient(authentication: _oauth,);
final api_instance = Web3StorageHTTPAPIApi(_apiClient);
Author #
Ray Okaah.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.