A simple API built using Go.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
A simple REST API is built for scheduling meetings as a starter project for Go. This has routes such as /meetings
and /meeting
to add meetings, and get meetings by their id
. You can also filter meetings for a participant and by the start time and end time of the meeting.
To get a local copy up and running follow these simple steps.
- Go
- MongoDB
- Clone the Repo
git clone https://github.com/roerohan/MeetingsAPI.git
- Install Go packages
go mod tidy
To run the project, you can use:
go run src/main.go
- POST
/meetings
: This route accepts a JSON of the following format:
{
"title": "something",
"participants": [
{
"name": "something",
"email": "something",
"rsvp": "Yes"
}
],
"startTime": 1603059170289,
"endTime": 1603059290289
}
Note: This route ensures that a new meeting can't be added if a participant of the new meeting has already RSVP-ed "Yes" or "Maybe" to a different meeting. If it does, the list of meetings which conflict with the current meeting is returned.
-
GET
/meetings?participant=<email>
: This route takes the email ID of the participant and a list of meetings which the participant is included in, irrespective of the RSVP status. -
GET
/meetings?start=<startTimestamp>&end=<endTimestamp>
: This route returns a list of all meetings that occur in the time duration betweenstart
andend
. -
GET
/meeting/<id>
: This route returns the meeting containing the ID as specified in the request parameter.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
You are requested to follow the contribution guidelines specified in CONTRIBUTING.md while contributing to the project 😄.
Distributed under the MIT License. See LICENSE
for more information.