42api-client 中文文档教程
42api-client
About The Project
这个项目是一个 42api 客户端包装器 api。 它将允许您在未来的应用程序中轻松连接 42API。 42api 客户端是用 nodeJS 编写的,因此在后端和前端都兼容。
Built With
- Nodejs
- Axios
- dotenv
- eslint
(返回页首)
Getting Started
要在您的项目中安装 42api-client 这非常简单,您可以通过 NPM 或下载库并将其放入您的项目模块中。
Installation
- Install the paquet
npm install 42api-client
- Configure your env with the necessary variables as following
CLIENT_ID=GET_YOURS_FROM_INTRA
CLIENT_SECRET=GET_YOURS_FROM_INTRA
ENDPOINT_API=https://api.intra.42.fr/v2
SCOPES_API=profile public projects elearning tig forum
SLEEP_TIME=330
- Invoke the module as following:
const IntraClient = require('42api-client');
- TADAM :D
(返回顶部)
Usage
为了让您了解如何使用该库,您可以查看examples
文件夹或以下示例:
const payload = {
'filter[campus_id]': 40,
sort: 'begin_at',
};
const res = await ic.get('exams', {}, payload);
console.log(res.data);
Roadmap
- [] Use retry variable instead of sleep
- [] Improve error handling
- [] ???
如果您有任何建议,请在官方存储库上打开一个问题。
(返回顶部)
License
根据 MIT 许可证分发。
Contact
Salim Aouas (@Signal) - signal@42madrid.com
(返回顶部)
42api-client
About The Project
This project is a 42api client wrapper api. It will allow you to interface 42API easily in your future applications. The 42api client is written in nodeJS so will be compatible on backend side but also in front end side.
Built With
- Nodejs
- Axios
- dotenv
- eslint
Getting Started
To install the 42api-client in your project this is very easy, you can do it through NPM or download the library and put it on your project modules.
Installation
- Install the paquet
npm install 42api-client
- Configure your env with the necessary variables as following
CLIENT_ID=GET_YOURS_FROM_INTRA
CLIENT_SECRET=GET_YOURS_FROM_INTRA
ENDPOINT_API=https://api.intra.42.fr/v2
SCOPES_API=profile public projects elearning tig forum
SLEEP_TIME=330
- Invoke the module as following:
const IntraClient = require('42api-client');
- TADAM :D
Usage
To give you an idea about how to use the library you can check the examples
folder or the following example:
const payload = {
'filter[campus_id]': 40,
sort: 'begin_at',
};
const res = await ic.get('exams', {}, payload);
console.log(res.data);
Roadmap
- [] Use retry variable instead of sleep
- [] Improve error handling
- [] ???
If you have any suggestion, please open an issue on the offical repository.
License
Distributed under the MIT License.
Contact
Salim Aouas (@Signal) - signal@42madrid.com
你可能也喜欢
- @0x-lerna-fork/diff 中文文档教程
- @0x-lerna-fork/list 中文文档教程
- @0xcert/wanchain-order-gateway 中文文档教程
- @4geit/rct-collapsible-component 中文文档教程
- @4geit/rct-right-side-menu-component 中文文档教程
- @4geit/rct-todo-store 中文文档教程
- @667/near-api-js 中文文档教程
- @768bit/msi-packager 中文文档教程
- @aaa-backend-stack/graphql 中文文档教程
- @aaroneous/my-test-library 中文文档教程