Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An IPFS Pinning Service HTTP Client for TypeScript / Javascript

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

ipfs-shipyard/js-pinning-service-http-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This client was generated usingOpenAPI Generator from theIPFS Pinning Service API spec.

You can see the commands used to generate the client in thegen:fetch npm script.

Usage

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'importtype{PinsGetRequest,PinResults}from'@ipfs-shipyard/pinning-service-client'constconfig=newConfiguration({  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.})constclient=newRemotePinningServiceClient(config)(async()=>{// Get 10 failed PinsconstpinsGetOptions:PinsGetRequest={limit:10,status:[Status.Failed]}const{count, results}:PinResults=awaitclient.pinsGet(pinsGetOptions)console.log(count,results)})()

Developing

Building

To build and compile the typescript sources to javascript use:

npm installnpm run build

Updating the generated client

To update the client, you need tonpm 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 ingenerated/fetch/** directly, or justgit checkout -p to remove the invalid import path changes.

It also usesSets for all collection types though it cannot serialize or deserialize these types to/from JSON. They must be manually changed to beArrays.

If you need to modify the generated code's import paths, you will have to runnpm run postgen manually.

Contributing

SeeCONTRIBUTING.md.

Publishing

First build the package then runnpm publish

License

Licensed under either of

Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the work by you, as defined in the Apache-2.0 license, shallbe dual licensed as above, without any additional terms or conditions.

About

An IPFS Pinning Service HTTP Client for TypeScript / Javascript

Topics

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp