@polarsquad/cinode-api
v0.13.2
Published
Cinode API for the Cinode platform
Downloads
6
Readme
@polarsquad/cinode-api
Unofficial Node.js API client for Cinode.
🚧 This client is still very much in development and might change drastically 🚧
This client has support for:
- Interacting with skills
- Interacting with project assignments
- More to follow...
Installation
npm install --save @polarsquad/cinode-api
Configuration
Enable the Cinode REST API for your company (docs)
Create a Cinode user and give it the roles "Api" and "Manager" in https://app.cinode.com/polarsquad/administration/users/employees/
- The
yourcompany
part of the URL is your company name in the configuration
- The
Create a Cinode token for the bot user in https://app.cinode.com/polarsquad/administration/integrations/tokens
- Name & expiration: anything you like
- Mimic user: your bot user
- Token claims: Manager & Admin
Import and configure the client:
import { Api } from '@polarsquad/cinode-api/api' import clientBuilder from '@polarsquad/cinode-api/client' import { CinodeService } from '@polarsquad/cinode-api/service' const api = new Api( { id: 1234, // Company ID name: 'yourcompany' // Company name }, clientBuilder( 'cinodeapitoken', // Cinode API token ) ) const service = new CinodeService(api)
Development
Useful commands
🚀 Run tests: npm run test
🔧 Lint code: npm run lint-fix
🖌️ Autoformat code: npm run prettier-fix
Releasing
- Create new branch
- Update version in
package.json
based on changes (we follow semantic versioning) - Run
npm install
to updatepackage-lock.json
- Create Pull Request with title "Release x.y.z" and description for changelog
- Merge changes to
main
- Tag & release with the format "vX.Y.Z" (e.g.
0.3.0
inpackage.json
becomesv0.3.0
as tag title) - GitHub Actions publishes the version in npm
Links
License
See LICENSE for more details.