An IPFS Pinning Service HTTP Client
This repo contains an implementation of a client for the IPFS Pinning Services API Spec
This client uses the typescript-axios OpenAPI generator.
See example.
const JsPinningServiceHttpClient = require("./openapi/dist");
// Pinata Pinning Services API: https://pinata.cloud/documentation#PinningServicesAPI
// Set env var ACCESS_TOKEN
const client = JsPinningServiceHttpClient.PinsApiFactory({
basePath: "https://api.pinata.cloud/psa",
accessToken: process.env.ACCESS_TOKEN,
});
let result = await client.pinsGet();
console.log(result.data);
The client can be updated with the latest spec by running:
npx @openapitools/openapi-generator-cli generate -i https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/master/ipfs-pinning-service.yaml -g typescript-axios -o ./openapi -c config.json
There may be some type issues in PinsApiAxiosParamCreator.pinsGet
that requires manual changes.