0.1.3 • Published 3 years ago
ids_api v0.1.3
ids_api
This is a simple node api for ids of wisedu.
Recommend to use the lib with typescript, you can get type annotation and code auto completion and many other cool benefits.
How to use it.
- npm i -S ids_api
- set
IDS_BASE_URL,IDS_APP_IDandIDS_APP_SECRETenvironments or you can create.envfile which contains these envs or you can invokeinitmethod to config them. - import the lib via
const { init, getAttributes, saveUser, updateAttributes, updatePassword, updateManagerPassword, addUserToGroup, removeUserOfGroup, sendMessage, setBindingUserDefault, setUidSwitchDefault } = require('ids_api')(for CommonJS) orimport { init, getAttributes, saveUser, updateAttributes, updatePassword, updateManagerPassword, addUserToGroup, removeUserOfGroup, sendMessage, setBindingUserDefault, setUidSwitchDefault } from 'ids_api'(for ESM); - use the imported api as you need.
Todos
- finish initial code.
- add unit tests
- add docs
License
MIT License
Copyright (c) 2023 liudonghua
references
- https://blog.appsignal.com/2022/01/19/how-to-set-up-a-nodejs-project-with-typescript.html
- https://khalilstemmler.com/blogs/typescript/node-starter-project/
- https://www.digitalocean.com/community/tutorials/setting-up-a-node-project-with-typescript
- https://mikbry.com/blog/javascript/npm/best-practices-npm-package
- https://mochajs.org/#-require-module-r-module
- https://axios-http.com/docs/urlencoded#automatic-serialization
- https://jestjs.io/docs/getting-started
- https://testing-library.com/docs/