Coder Social home page Coder Social logo

intra-api's Introduction

NPM

intra-api

An Epitech Intranet API Node Wrapper that works. All of the others I found where not maintained anymore, so I hope this ones with last. At least, it is the only one working with the new authentification systels

Installation

Just a npm install

Usage

const Intra = new Intranet(autologinToken, login);

Intra
  .planning
  .get()
  .then((res) => {
    // Display your planning
    console.log(res);
  })
  .catch((err) => {
    console.error(err);
  });

Yes, you have to provide your autologin-token, as it is not possible to connect with combo login/pswd anymore. If you don't know where to find your autologin token, go to this page, and copy paste the value after https://intra.epitech.eu/

Testing

We use Facebook's jest, so npm test will be enough to test the application. Note that to ensure you are logged, please fill a .env file at the project's root with the following content:

AUTOLOGIN_TOKEN=your_token
[email protected]

where your_token is, of course, your autologin token. In order to avoid an overload of the original Intranet, the API calls are proxied so that the results from the JSON files in the test directory are returned instead of making a real API call

intra-api's People

Contributors

lodi-g avatar wats0ns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

intra-api's Issues

Add event support

Add support to the Events API.
There is several methods to implement (non-exhaustive list):

  • Fetch Events
  • Suscribe/Unsuscribe
  • Enter token for event

This should be of course done in events.js

Add projects support

Add support to the Projects API.
There is several methods to implement (non-exhaustive list):

  • Fetch projects
  • Register
  • Unregister
  • Fetch documents

This should be of course done in projects.js

Add Users support

Add support to the Users API.
There is several methods to implement (non-exhaustive list):

  • Fetch User profile
  • Fecth Users documents
  • Fetch log time information

This should be of course done in user.js

Add Units support

Add support to the Units API.
There is several methods to implement (non-exhaustive list):

  • Fetch Units
  • Register/Unregister

This should be of course done in units.js

Add husky support

I think husky would be appropriate to add github hooks such as prepush & precommit.
Those hooks would run npm run lint and npm run test before allowing users to commit / push.

Add Elearning support

Add support to the ELearning API.
There is several methods to implement (non-exhaustive list):

  • Fetch Elearning courses
  • Fecth Elearning documents

This should be of course done in elarning.js

Add a max number of concurrent requests

The intranet servers are really fragile. We should use a Promise Library that allows us to limit the number of concurrent request in order to not overload the intranet servers

Add a logger

This project could use a logger with different verbose levels for debugging purpose.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.