Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@ipfs-shipyard/pinning-service-client
Advanced tools
A lightweight client generated from the ipfs-pinning-service-spec defined at https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/main/ipfs-pinning-service.yaml
This client was generated using OpenAPI Generator from the IPFS Pinning Service API spec.
You can see the commands used to generate the client in the gen:fetch
npm script.
npm install @ipfs-shipyard/pinning-service-client --save
This client only has a programmatic API at the moment (no CLI). You use it like so:
import { Configuration, RemotePinningServiceClient, Status } from '@ipfs-shipyard/pinning-service-client'
import type { PinsGetRequest, PinResults } from '@ipfs-shipyard/pinning-service-client'
const config = new Configuration({
endpointUrl, // the URI for your pinning provider, e.g. `http://localhost:3000`
accessToken, // the secret token/key given to you by your pinning provider
// fetchApi: fetch, // You can pass your own fetchApi implementation, but we use NodeJS fetch by default.
})
const client = new RemotePinningServiceClient(config)
(async () => {
// Get 10 failed Pins
const pinsGetOptions: PinsGetRequest = {
limit: 10,
status: [Status.Failed]
}
const {count, results}: PinResults = await client.pinsGet(pinsGetOptions)
console.log(count, results)
})()
To build and compile the typescript sources to javascript use:
npm install
npm run build
To update the client, you need to npm run gen
npm script. This will fetch the latest version of the OpenAPI spec and generate the client. However, openapi-generator-cli does not currently generate the client code with proper import syntax. So you must modify the imports in generated/fetch/**
directly, or just git checkout -p
to remove the invalid import path changes.
It also uses Set
s for all collection types though it cannot serialize or deserialize these types to/from JSON. They must be manually changed to be Array
s.
If you need to modify the generated code's import paths, you will have to run npm run postgen
manually.
See CONTRIBUTING.md.
First build the package then run npm publish
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
A lightweight client generated from the ipfs-pinning-service-spec defined at https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/main/ipfs-pinning-service.yaml
We found that @ipfs-shipyard/pinning-service-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.