1.0.5 • Published 3 years ago

deploy-api-client v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Deploy-api-client

Generate new api

How to use api

  • Add api to dependencies.
  • Create api object:
const api = new Api({
  baseURL: URL_TO_DEPLOY_API
});
  • Call endpoint (for example to get content):
api.content.content(ORG_ID, DEPLOYMENT_ID, {token: TOKEN, "for-path": "topic2"})
.then(r => {
  console.log(r.data);
})
  • For endpoints which url starts with "/org", use api.org, for bookmarks - api.bookmarks

templates catalog

According to https://www.npmjs.com/package/swagger-typescript-api class for api will be always "Api". To have the class DeployApi https://github.com/acacode/swagger-typescript-api/blob/next/templates/default/api.eta was copied to templates/api.eta and modified to have name DeployApi instead of Api.

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago