GithubHelp home page GithubHelp logo

bde-esiee / api-calendar Goto Github PK

View Code? Open in Web Editor NEW
1.0 6.0 0.0 35 KB

๐ŸŽ“๐Ÿ“†๐Ÿ”ŒAPI for ESIEE Paris's Calendar (Classes, Room availability...)

License: MIT License

JavaScript 100.00%
nodejs javascript ical

api-calendar's Introduction

ESIEE API

An exhaustive API for ESIEE's calendar Codeship Badge

Reference

The base URI for the API is /api/calendar/

Querying upcoming activities

An activity is composed of:

  • The name of the activity (mainly the subject name).
  • A description containing most of the time the groups concerned, the name of the subject, the name of the teacher and the export date.
  • The starting time of the avtivity.
  • The ending time of the activity.
  • The rooms where the avtivity take place.

This result in the following JSON template:

{
	"name"       : "String",
	"description": "String",
	"start"      : "Date",
	"end"        : "Date",
	"rooms"      : [
		"String"
	]
}
URI Description
/api/calendar/activities Query all upcoming activities.
/api/calendar/activities/n Query n upcoming activities.
/api/calendar/activities/n/s Query n upcoming activities and skip the s first ones.

Querying upcoming tests

A test is an activity and therefore has the same template.

URI Description
/api/calendar/tests Query all upcoming tests.
/api/calendar/tests/promotion Query all upcoming tests for this promotion. (Currently support only tests with a name of type AAA-0000:CTRL)

Querying free rooms

A room is only a String, which means that the result will be like:

[
	"Room1",
	"Room2",
	"Room3",
	"โ€ฆ"
]
URI Description
/api/calendar/rooms Query all rooms that are currently free.
/api/calendar/rooms/time Query all rooms that are free at time.

api-calendar's People

Contributors

minijackson avatar mininao avatar kevin-ta avatar

Stargazers

Emmanuel Haguet avatar

Watchers

Naji Astier avatar James Cloos avatar  avatar  avatar  avatar Benoit Lubrano di Sbaraglione avatar

api-calendar's Issues

Memory Leak

I suspect the server is keeping the whole calendar in memory, generating ~150mb of data constantly in memory

Switch the API to jsonp

Basically switch all the res.json to res.jsonp in order to allow cross-domain requests (required for a cordova app i believe)

Limit the number of activities sent by /activities

In order to avoid wasting resources, we should add query params that allows to specify a number of activities to request, limit it, and add an offset query param.

We could use something like

db.collection.find().skip(20).limit(10)

Free rooms API adjustments

Do you think we should adjust the api in /app/roomfinder/index.js to give a more "human interpretable" output, eg don't include rooms that will be unavailable in 5 minutes

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.