-
Notifications
You must be signed in to change notification settings - Fork 1
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
Endpoint for study room availability #2
Comments
5 tasks
ecxyzzy
added a commit
that referenced
this issue
Nov 24, 2024
## Description Created GraphQL and REST endpoints to provide study room data, namely: - allStudyRooms: Returns the id, name, capacity, location, and techEnhanced fields for each study room in the database. - studyRoomById: Returns the id, name, capacity, location, techEnhanced, description, and directions for a specific room, if available. - studyRoomsByFilters: Filters and returns study rooms based on query parameters (location, capacityMin, capacityMax, isTechEnhanced), providing the same fields as allStudyRooms. Added description and directions fields to the studyRoomById endpoint to provide more details for each specific room. ## Related Issue resolves issue #2 ## Motivation and Context These endpoints provide structured access to study room data in both REST and GraphQL formats, fulfilling the requirements outlined in issue #2. These changes allow users to access study room details as a whole, retrieve data for a specific room, or filter rooms based on criteria like location and capacity. This functionality is essential for making study room data available through the API in a scalable and flexible way. ## How Has This Been Tested? Tested locally on a development server using Postman. Verified: REST Endpoints: Access to /v2/rest/study-rooms/all returns all rooms. Access to /v2/rest/study-rooms/{id} returns data for a specific room by ID. Access to /v2/rest/study-rooms with query parameters returns filtered results. GraphQL Queries: Querying allStudyRooms returns a list of all study rooms with the expected fields. Querying studyRoom(id: "<room_id>") returns details for a specific room, including description and directions if they are present. Querying studyRooms(query: { location: "Science Library", capacityMin: 4 }) returns filtered results based on location and capacity. ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - [ ] My code involves a change to the database schema. - [X] My code requires a change to the documentation. --------- Co-authored-by: Sanskar Mishra <[email protected]> Co-authored-by: Sanskar Mishra <[email protected]> Co-authored-by: Eddy Chen <[email protected]> Co-authored-by: Andrew Wang <[email protected]>
Wooo nice! Also are we not yet returning availability? Tried a couple ids and didn't get the slots field. |
Yeah we're not returning availability yet - tracking the follow-up in #46 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Create endpoints for
study_room
datastudy_room
datastudy_room
dataThe text was updated successfully, but these errors were encountered: