ids_api
v0.1.3
Published
node api for ids of wisedu
Downloads
5
Readme
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_ID
andIDS_APP_SECRET
environments or you can create.env
file which contains these envs or you can invokeinit
method 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
- [x] finish initial code.
- [x] add unit tests
- [x] 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/