1.0.1 • Published 2 years ago

estuary-client v1.0.1

Weekly downloads
-
License
Apache 2.0 Apache...
Repository
-
Last release
2 years ago

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

ClassMethodHTTP requestDescription
EstuaryClient.AdminApiadminPeeringPeersDeleteDELETE /admin/peering/peersRemove peers on Peering Service
EstuaryClient.AdminApiadminPeeringPeersGetGET /admin/peering/peersList all Peering peers
EstuaryClient.AdminApiadminPeeringPeersPostPOST /admin/peering/peersAdd peers on Peering Service
EstuaryClient.AdminApiadminPeeringStartPostPOST /admin/peering/startStart Peering
EstuaryClient.AdminApiadminPeeringStatusGetGET /admin/peering/statusCheck Peering Status
EstuaryClient.AdminApiadminPeeringStopPostPOST /admin/peering/stopStop Peering
EstuaryClient.AdminApiadminSystemConfigGetGET /admin/system/configGet systems(estuary/shuttle) config
EstuaryClient.AdminApiadminUsersGetGET /admin/usersGet all users
EstuaryClient.AutoretrieveApiadminAutoretrieveInitPostPOST /admin/autoretrieve/initRegister autoretrieve server
EstuaryClient.AutoretrieveApiadminAutoretrieveListGetGET /admin/autoretrieve/listList autoretrieve servers
EstuaryClient.AutoretrieveApiautoretrieveHeartbeatPostPOST /autoretrieve/heartbeatMarks autoretrieve server as up
EstuaryClient.CollectionsApicollectionsColuuidCommitPostPOST /collections/{coluuid}/commitProduce a CID of the collection contents
EstuaryClient.CollectionsApicollectionsColuuidContentsDeleteDELETE /collections/{coluuid}/contentsDeletes a content from a collection
EstuaryClient.CollectionsApicollectionsColuuidDeleteDELETE /collections/{coluuid}Deletes a collection
EstuaryClient.CollectionsApicollectionsColuuidGetGET /collections/{coluuid}Get contents in a collection
EstuaryClient.CollectionsApicollectionsColuuidPostPOST /collections/{coluuid}Add contents to a collection
EstuaryClient.CollectionsApicollectionsFsAddPostPOST /collections/fs/addAdd a file to a collection
EstuaryClient.CollectionsApicollectionsGetGET /collections/List all collections
EstuaryClient.CollectionsApicollectionsPostPOST /collections/Create a new collection
EstuaryClient.ContentApicontentAddCarPostPOST /content/add-carAdd Car object
EstuaryClient.ContentApicontentAddIpfsPostPOST /content/add-ipfsAdd IPFS object
EstuaryClient.ContentApicontentAddPostPOST /content/addAdd new content
EstuaryClient.ContentApicontentAggregatedContentGetGET /content/aggregated/{content}Get aggregated content stats
EstuaryClient.ContentApicontentAllDealsGetGET /content/all-dealsGet all deals for a user
EstuaryClient.ContentApicontentBwUsageContentGetGET /content/bw-usage/{content}Get content bandwidth
EstuaryClient.ContentApicontentCreatePostPOST /content/createAdd a new content
EstuaryClient.ContentApicontentDealsGetGET /content/dealsContent with deals
EstuaryClient.ContentApicontentEnsureReplicationDatacidGetGET /content/ensure-replication/{datacid}Ensure Replication
EstuaryClient.ContentApicontentFailuresContentGetGET /content/failures/{content}List all failures for a content
EstuaryClient.ContentApicontentIdGetGET /content/{id}Content
EstuaryClient.ContentApicontentImportdealPostPOST /content/importdealImport a deal
EstuaryClient.ContentApicontentListGetGET /content/listList all pinned content
EstuaryClient.ContentApicontentReadContGetGET /content/read/{cont}Read content
EstuaryClient.ContentApicontentStagingZonesGetGET /content/staging-zonesGet staging zone for user
EstuaryClient.ContentApicontentStatsGetGET /content/statsGet content statistics
EstuaryClient.ContentApicontentStatusIdGetGET /content/status/{id}Content Status
EstuaryClient.DealsApidealEstimatePostPOST /deal/estimateEstimate the cost of a deal
EstuaryClient.DealsApidealInfoDealidGetGET /deal/info/{dealid}Get Deal Info
EstuaryClient.DealsApidealProposalPropcidGetGET /deal/proposal/{propcid}Get Proposal
EstuaryClient.DealsApidealQueryMinerGetGET /deal/query/{miner}Query Ask
EstuaryClient.DealsApidealStatusByProposalPropcidGetGET /deal/status-by-proposal/{propcid}Get Deal Status by PropCid
EstuaryClient.DealsApidealStatusMinerPropcidGetGET /deal/status/{miner}/{propcid}Deal Status
EstuaryClient.DealsApidealTransferInProgressGetGET /deal/transfer/in-progressTransfer In Progress
EstuaryClient.DealsApidealsFailuresGetGET /deals/failuresGet storage failures for user
EstuaryClient.DealsApidealsMakeMinerPostPOST /deals/make/{miner}Make Deal
EstuaryClient.DealsApidealsStatusDealGetGET /deals/status/{deal}Get Deal Status
EstuaryClient.DealsApipublicDealsFailuresGetGET /public/deals/failuresGet storage failures
EstuaryClient.DealsApipublicMinersStorageQueryMinerGetGET /public/miners/storage/query/{miner}Query Ask
EstuaryClient.DefaultApidealTransferStatusPostPOST /deal/transfer/status
EstuaryClient.MetricsApipublicMetricsDealsOnChainGetGET /public/metrics/deals-on-chainGet deal metrics
EstuaryClient.MinerApipublicMinersDealsMinerGetGET /public/miners/deals/{miner}Get all miners deals
EstuaryClient.MinerApipublicMinersStatsMinerGetGET /public/miners/stats/{miner}Get miner stats
EstuaryClient.NetApinetAddrsGetGET /net/addrsNet Addrs
EstuaryClient.NetApipublicMinersFailuresMinerGetGET /public/miners/failures/{miner}Get all miners
EstuaryClient.NetApipublicMinersGetGET /public/minersGet all miners
EstuaryClient.NetApipublicNetAddrsGetGET /public/net/addrsNet Addrs
EstuaryClient.NetApipublicNetPeersGetGET /public/net/peersNet Peers
EstuaryClient.PeeringApiadminPeeringPeersDeleteDELETE /admin/peering/peersRemove peers on Peering Service
EstuaryClient.PeeringApiadminPeeringPeersGetGET /admin/peering/peersList all Peering peers
EstuaryClient.PeeringApiadminPeeringPeersPostPOST /admin/peering/peersAdd peers on Peering Service
EstuaryClient.PeeringApiadminPeeringStartPostPOST /admin/peering/startStart Peering
EstuaryClient.PeeringApiadminPeeringStatusGetGET /admin/peering/statusCheck Peering Status
EstuaryClient.PeeringApiadminPeeringStopPostPOST /admin/peering/stopStop Peering
EstuaryClient.PeersApiadminPeeringPeersDeleteDELETE /admin/peering/peersRemove peers on Peering Service
EstuaryClient.PeersApiadminPeeringPeersGetGET /admin/peering/peersList all Peering peers
EstuaryClient.PeersApiadminPeeringPeersPostPOST /admin/peering/peersAdd peers on Peering Service
EstuaryClient.PeersApiadminPeeringStartPostPOST /admin/peering/startStart Peering
EstuaryClient.PeersApiadminPeeringStatusGetGET /admin/peering/statusCheck Peering Status
EstuaryClient.PeersApiadminPeeringStopPostPOST /admin/peering/stopStop Peering
EstuaryClient.PinningApipinningPinsGetGET /pinning/pinsList all pin status objects
EstuaryClient.PinningApipinningPinsPinidDeleteDELETE /pinning/pins/{pinid}Delete a pinned object
EstuaryClient.PinningApipinningPinsPinidGetGET /pinning/pins/{pinid}Get a pin status object
EstuaryClient.PinningApipinningPinsPinidPostPOST /pinning/pins/{pinid}Replace a pinned object
EstuaryClient.PinningApipinningPinsPostPOST /pinning/pinsAdd and pin object
EstuaryClient.PublicApipublicByCidCidGetGET /public/by-cid/{cid}Get Content by Cid
EstuaryClient.PublicApipublicInfoGetGET /public/infoGet public node info
EstuaryClient.PublicApipublicMetricsDealsOnChainGetGET /public/metrics/deals-on-chainGet deal metrics
EstuaryClient.PublicApipublicMinersDealsMinerGetGET /public/miners/deals/{miner}Get all miners deals
EstuaryClient.PublicApipublicMinersFailuresMinerGetGET /public/miners/failures/{miner}Get all miners
EstuaryClient.PublicApipublicMinersGetGET /public/minersGet all miners
EstuaryClient.PublicApipublicMinersStatsMinerGetGET /public/miners/stats/{miner}Get miner stats
EstuaryClient.PublicApipublicNetAddrsGetGET /public/net/addrsNet Addrs
EstuaryClient.PublicApipublicNetPeersGetGET /public/net/peersNet Peers
EstuaryClient.PublicApipublicStatsGetGET /public/statsPublic stats
EstuaryClient.UserApiuserApiKeysGetGET /user/api-keysGet API keys for a user
EstuaryClient.UserApiuserApiKeysKeyDeleteDELETE /user/api-keys/{key}Revoke a User API Key.
EstuaryClient.UserApiuserApiKeysPostPOST /user/api-keysCreate API keys for a user
EstuaryClient.UserApiuserExportGetGET /user/exportExport user data
EstuaryClient.UserApiuserStatsGetGET /user/statsCreate API keys for a user

Documentation for Models

Documentation for Authorization

bearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header