Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Requirements #1

Open
Leone25 opened this issue Oct 26, 2023 · 0 comments
Open

API Requirements #1

Leone25 opened this issue Oct 26, 2023 · 0 comments

Comments

@Leone25
Copy link
Collaborator

Leone25 commented Oct 26, 2023

[this is just a draft, I probably forgot stuff]

The API should be able to:

  • Get current user info, including roles (having the key is also a role), if the user is not logged in it should return an error message and a link to the login page (this last bit should be for all api endpoints)
  • Allow users to logout
  • Show the current status of the lab, with an endpoint that gives info whether the lab is open or not (or soon to open), who is currently in the lab (or is going to open it), when the lab is going to open/close next
  • Show who is going to the lab on a per week basis (defaults to current week), week selection can happen on a date basis (even if asking for just a single day it will still return the full week that contains that day), week selection can be also by week number, both absolute (week 1, week 2, week 3, ecc.) or as a relative number (+1, +2, +3, -1, -2, -3, ecc.), when showing who is going, you should also send their roles (which include if the person has the key, these can be used to show what the user's main job is eg. computer repair, electronics, coding, ecc.)
  • Allow to book to go to the lab (with an option for admins to book other people) and also to delete bookings
  • Allow to mark as in lab (this feature I'm still not sure if we are going to allow anyone to mark them selfs or if we are going to have a separate ui only when you are in lab or something, maybe we can make some fancy network detection idk yet, but an api endpoint should still be defined)
  • Allow to mark when leaving the lab, including a description of the activities done in the time passed
  • Allow to ring the WEEEtofono, maybe with an option to specify the door, optional support for multiple WEEEtofoni would be nice
  • Allow to view and edit (admins only) logs of people, with date in and out, and description, within a specified timeframe (could be specified just start, just end, or both), and optionally filtered for just some people
  • Show stats of people aka amount of total hours, within a timeframe (just as above), and optionally filtered for just some people
  • Receive notifications, with an option to specify an timeframe (eg. new, modified and deleted notifications since yesterday), notifications should include title, body, icon, image (optional), action (what happens when the notification is clicked, just a string), expiration (optional)
  • Allow admins to create, edit and publish notifications
  • Allow to create/delete api tokens with descriptions (maybe editable)

Would be nice to have:

  • Events, which show up in the calendar, and can either be at just a specific time or on a time range, that can be assigned to specific role(s) meaning only those (and admin) would be able to see them

Most endpoints should be able to be accessible both with a user token/cookie and with an api token

Notes:

  • lab bookings should be kept at least one week after their date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant