Skip to content

polarsquad/cinode-api

Repository files navigation

@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

  1. Enable the Cinode REST API for your company (docs)

  2. 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
  3. 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
  4. 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

  1. Create new branch
  2. Update version in package.json based on changes (we follow semantic versioning)
  3. Run npm install to update package-lock.json
  4. Create Pull Request with title "Release x.y.z" and description for changelog
  5. Merge changes to main
  6. Tag & release with the format "vX.Y.Z" (e.g. 0.3.0 in package.json becomes v0.3.0 as tag title)
  7. GitHub Actions publishes the version in npm

Links

License

See LICENSE for more details.

About

Unofficial Node.js API client for Cinode

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6