estuary-client
EstuaryClient - JavaScript client for estuary-client This is the API for the Estuary application. This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.0.0
- Package version: 1.0.1
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://docs.estuary.tech/feedback
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install estuary-client --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your estuary-client from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('estuary-client')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix['Authorization'] = "Token"
var api = new EstuaryClient.AdminApi()
var body = [new EstuaryClient.[String]()]; // {[String]} Peer ids
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.adminPeeringPeersDelete(body, callback);
Documentation for API Endpoints
All URIs are relative to https://api.estuary.tech
Class | Method | HTTP request | Description |
---|---|---|---|
EstuaryClient.AdminApi | adminPeeringPeersDelete | DELETE /admin/peering/peers | Remove peers on Peering Service |
EstuaryClient.AdminApi | adminPeeringPeersGet | GET /admin/peering/peers | List all Peering peers |
EstuaryClient.AdminApi | adminPeeringPeersPost | POST /admin/peering/peers | Add peers on Peering Service |
EstuaryClient.AdminApi | adminPeeringStartPost | POST /admin/peering/start | Start Peering |
EstuaryClient.AdminApi | adminPeeringStatusGet | GET /admin/peering/status | Check Peering Status |
EstuaryClient.AdminApi | adminPeeringStopPost | POST /admin/peering/stop | Stop Peering |
EstuaryClient.AdminApi | adminSystemConfigGet | GET /admin/system/config | Get systems(estuary/shuttle) config |
EstuaryClient.AdminApi | adminUsersGet | GET /admin/users | Get all users |
EstuaryClient.AutoretrieveApi | adminAutoretrieveInitPost | POST /admin/autoretrieve/init | Register autoretrieve server |
EstuaryClient.AutoretrieveApi | adminAutoretrieveListGet | GET /admin/autoretrieve/list | List autoretrieve servers |
EstuaryClient.AutoretrieveApi | autoretrieveHeartbeatPost | POST /autoretrieve/heartbeat | Marks autoretrieve server as up |
EstuaryClient.CollectionsApi | collectionsColuuidCommitPost | POST /collections/{coluuid}/commit | Produce a CID of the collection contents |
EstuaryClient.CollectionsApi | collectionsColuuidContentsDelete | DELETE /collections/{coluuid}/contents | Deletes a content from a collection |
EstuaryClient.CollectionsApi | collectionsColuuidDelete | DELETE /collections/{coluuid} | Deletes a collection |
EstuaryClient.CollectionsApi | collectionsColuuidGet | GET /collections/{coluuid} | Get contents in a collection |
EstuaryClient.CollectionsApi | collectionsColuuidPost | POST /collections/{coluuid} | Add contents to a collection |
EstuaryClient.CollectionsApi | collectionsFsAddPost | POST /collections/fs/add | Add a file to a collection |
EstuaryClient.CollectionsApi | collectionsGet | GET /collections/ | List all collections |
EstuaryClient.CollectionsApi | collectionsPost | POST /collections/ | Create a new collection |
EstuaryClient.ContentApi | contentAddCarPost | POST /content/add-car | Add Car object |
EstuaryClient.ContentApi | contentAddIpfsPost | POST /content/add-ipfs | Add IPFS object |
EstuaryClient.ContentApi | contentAddPost | POST /content/add | Add new content |
EstuaryClient.ContentApi | contentAggregatedContentGet | GET /content/aggregated/{content} | Get aggregated content stats |
EstuaryClient.ContentApi | contentAllDealsGet | GET /content/all-deals | Get all deals for a user |
EstuaryClient.ContentApi | contentBwUsageContentGet | GET /content/bw-usage/{content} | Get content bandwidth |
EstuaryClient.ContentApi | contentCreatePost | POST /content/create | Add a new content |
EstuaryClient.ContentApi | contentDealsGet | GET /content/deals | Content with deals |
EstuaryClient.ContentApi | contentEnsureReplicationDatacidGet | GET /content/ensure-replication/{datacid} | Ensure Replication |
EstuaryClient.ContentApi | contentFailuresContentGet | GET /content/failures/{content} | List all failures for a content |
EstuaryClient.ContentApi | contentIdGet | GET /content/{id} | Content |
EstuaryClient.ContentApi | contentImportdealPost | POST /content/importdeal | Import a deal |
EstuaryClient.ContentApi | contentListGet | GET /content/list | List all pinned content |
EstuaryClient.ContentApi | contentReadContGet | GET /content/read/{cont} | Read content |
EstuaryClient.ContentApi | contentStagingZonesGet | GET /content/staging-zones | Get staging zone for user |
EstuaryClient.ContentApi | contentStatsGet | GET /content/stats | Get content statistics |
EstuaryClient.ContentApi | contentStatusIdGet | GET /content/status/{id} | Content Status |
EstuaryClient.DealsApi | dealEstimatePost | POST /deal/estimate | Estimate the cost of a deal |
EstuaryClient.DealsApi | dealInfoDealidGet | GET /deal/info/{dealid} | Get Deal Info |
EstuaryClient.DealsApi | dealProposalPropcidGet | GET /deal/proposal/{propcid} | Get Proposal |
EstuaryClient.DealsApi | dealQueryMinerGet | GET /deal/query/{miner} | Query Ask |
EstuaryClient.DealsApi | dealStatusByProposalPropcidGet | GET /deal/status-by-proposal/{propcid} | Get Deal Status by PropCid |
EstuaryClient.DealsApi | dealStatusMinerPropcidGet | GET /deal/status/{miner}/{propcid} | Deal Status |
EstuaryClient.DealsApi | dealTransferInProgressGet | GET /deal/transfer/in-progress | Transfer In Progress |
EstuaryClient.DealsApi | dealsFailuresGet | GET /deals/failures | Get storage failures for user |
EstuaryClient.DealsApi | dealsMakeMinerPost | POST /deals/make/{miner} | Make Deal |
EstuaryClient.DealsApi | dealsStatusDealGet | GET /deals/status/{deal} | Get Deal Status |
EstuaryClient.DealsApi | publicDealsFailuresGet | GET /public/deals/failures | Get storage failures |
EstuaryClient.DealsApi | publicMinersStorageQueryMinerGet | GET /public/miners/storage/query/{miner} | Query Ask |
EstuaryClient.DefaultApi | dealTransferStatusPost | POST /deal/transfer/status | |
EstuaryClient.MetricsApi | publicMetricsDealsOnChainGet | GET /public/metrics/deals-on-chain | Get deal metrics |
EstuaryClient.MinerApi | publicMinersDealsMinerGet | GET /public/miners/deals/{miner} | Get all miners deals |
EstuaryClient.MinerApi | publicMinersStatsMinerGet | GET /public/miners/stats/{miner} | Get miner stats |
EstuaryClient.NetApi | netAddrsGet | GET /net/addrs | Net Addrs |
EstuaryClient.NetApi | publicMinersFailuresMinerGet | GET /public/miners/failures/{miner} | Get all miners |
EstuaryClient.NetApi | publicMinersGet | GET /public/miners | Get all miners |
EstuaryClient.NetApi | publicNetAddrsGet | GET /public/net/addrs | Net Addrs |
EstuaryClient.NetApi | publicNetPeersGet | GET /public/net/peers | Net Peers |
EstuaryClient.PeeringApi | adminPeeringPeersDelete | DELETE /admin/peering/peers | Remove peers on Peering Service |
EstuaryClient.PeeringApi | adminPeeringPeersGet | GET /admin/peering/peers | List all Peering peers |
EstuaryClient.PeeringApi | adminPeeringPeersPost | POST /admin/peering/peers | Add peers on Peering Service |
EstuaryClient.PeeringApi | adminPeeringStartPost | POST /admin/peering/start | Start Peering |
EstuaryClient.PeeringApi | adminPeeringStatusGet | GET /admin/peering/status | Check Peering Status |
EstuaryClient.PeeringApi | adminPeeringStopPost | POST /admin/peering/stop | Stop Peering |
EstuaryClient.PeersApi | adminPeeringPeersDelete | DELETE /admin/peering/peers | Remove peers on Peering Service |
EstuaryClient.PeersApi | adminPeeringPeersGet | GET /admin/peering/peers | List all Peering peers |
EstuaryClient.PeersApi | adminPeeringPeersPost | POST /admin/peering/peers | Add peers on Peering Service |
EstuaryClient.PeersApi | adminPeeringStartPost | POST /admin/peering/start | Start Peering |
EstuaryClient.PeersApi | adminPeeringStatusGet | GET /admin/peering/status | Check Peering Status |
EstuaryClient.PeersApi | adminPeeringStopPost | POST /admin/peering/stop | Stop Peering |
EstuaryClient.PinningApi | pinningPinsGet | GET /pinning/pins | List all pin status objects |
EstuaryClient.PinningApi | pinningPinsPinidDelete | DELETE /pinning/pins/{pinid} | Delete a pinned object |
EstuaryClient.PinningApi | pinningPinsPinidGet | GET /pinning/pins/{pinid} | Get a pin status object |
EstuaryClient.PinningApi | pinningPinsPinidPost | POST /pinning/pins/{pinid} | Replace a pinned object |
EstuaryClient.PinningApi | pinningPinsPost | POST /pinning/pins | Add and pin object |
EstuaryClient.PublicApi | publicByCidCidGet | GET /public/by-cid/{cid} | Get Content by Cid |
EstuaryClient.PublicApi | publicInfoGet | GET /public/info | Get public node info |
EstuaryClient.PublicApi | publicMetricsDealsOnChainGet | GET /public/metrics/deals-on-chain | Get deal metrics |
EstuaryClient.PublicApi | publicMinersDealsMinerGet | GET /public/miners/deals/{miner} | Get all miners deals |
EstuaryClient.PublicApi | publicMinersFailuresMinerGet | GET /public/miners/failures/{miner} | Get all miners |
EstuaryClient.PublicApi | publicMinersGet | GET /public/miners | Get all miners |
EstuaryClient.PublicApi | publicMinersStatsMinerGet | GET /public/miners/stats/{miner} | Get miner stats |
EstuaryClient.PublicApi | publicNetAddrsGet | GET /public/net/addrs | Net Addrs |
EstuaryClient.PublicApi | publicNetPeersGet | GET /public/net/peers | Net Peers |
EstuaryClient.PublicApi | publicStatsGet | GET /public/stats | Public stats |
EstuaryClient.UserApi | userApiKeysGet | GET /user/api-keys | Get API keys for a user |
EstuaryClient.UserApi | userApiKeysKeyDelete | DELETE /user/api-keys/{key} | Revoke a User API Key. |
EstuaryClient.UserApi | userApiKeysPost | POST /user/api-keys | Create API keys for a user |
EstuaryClient.UserApi | userExportGet | GET /user/export | Export user data |
EstuaryClient.UserApi | userStatsGet | GET /user/stats | Create API keys for a user |
Documentation for Models
- EstuaryClient.CollectionsCollection
- EstuaryClient.MainCreateCollectionBody
- EstuaryClient.MainDeleteContentFromCollectionBody
- EstuaryClient.MainEstimateDealBody
- EstuaryClient.MainGetApiKeysResp
- EstuaryClient.MainImportDealBody
- EstuaryClient.MainUserStatsResponse
- EstuaryClient.UtilContentAddIpfsBody
- EstuaryClient.UtilContentAddResponse
- EstuaryClient.UtilContentCreateBody
- EstuaryClient.UtilHttpError
Documentation for Authorization
bearerAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header