# 42api-client

> 42client api wrapper

Latest version **1.0.5** (published 2021-11-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install 42api-client
pnpm add 42api-client
yarn add 42api-client
bun add 42api-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-11-12 |
| First published | 2021-11-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | signal |
| Maintainers | saouas |

## Links

- npm: https://www.npmjs.com/package/42api-client
- npm.io page: https://npm.io/package/42api-client

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.24.0
- [dotenv](https://npm.io/package/dotenv.md) ^10.0.0

## Recent versions

- 1.0.5 (latest) — 2021-11-12
- 1.0.4 — 2021-11-12
- 1.0.3 — 2021-11-12
- 1.0.2 — 2021-11-12
- 1.0.1 — 2021-11-12
- 1.0.0 — 2021-11-12

## README

<div id="top"></div>
<h1 align="center">42api-client</h3>




<!-- ABOUT THE PROJECT -->
## 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

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- GETTING STARTED -->
## 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

1. Install the paquet `npm install 42api-client`
2. 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
```

3. Invoke the module as following: `const IntraClient = require('42api-client');`
4. TADAM :D

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- USAGE EXAMPLES -->
## 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 -->
## Roadmap

- [] Use retry variable instead of sleep
- [] Improve error handling
- [] ???

If you have any suggestion, please open an issue on the offical repository.

<p align="right">(<a href="#top">back to top</a>)</p>




<!-- LICENSE -->
## License

Distributed under the MIT License.



<!-- CONTACT -->
## Contact

Salim Aouas (@Signal) - signal@42madrid.com

<p align="right">(<a href="#top">back to top</a>)</p>

---
_Source: https://npm.io/package/42api-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
