Schedule Meetings with API. Built with Golang
This is a basic version of API managing and scheduling meetings. This is my task done for appointy internship using golang and mongodb.
A few of the things you can do with MeetAPI:
- Schedules Meetings
- Lists all meetings within a time frame
- Create non overlapping meetings
- List all meetings of a participant
- Thread Safe
Make sure you have Go and the Mongodb installed.
git clone https://github.com/SreemanthG/Meetings-API-Appointy.git
cd meetings-api-appointy
go get
go run main.go
- Schedule a meeting:
- Get a meeting using id:
- List all meetings within a time frame:
- List all meetings of a participant:
- Schedule a meeting:
- Get a meeting using id:
- List all meetings within a time frame:
- List all meetings of a participant:
- POST /meetings
- GET /meetings/[id]
- GET /meetings?start=start=[start time here]&end=[end time here]
- GET /meetings?participant=[email]
Example: http://localhost/meetings Note: start_Time, end_Time should be in UNIX format Request body(JSON):
{
"title": "My new Meeting",
"participants": [
{"name":"sreemanth1","email":"sreemanth1@gmail.com","rsvp":"yes"},
{"name":"sreemanth2","email":"sreemanth2@gmail.com","rsvp":"yes"}
],
"start_Time": 1603188000,
"end_Time": 1603202400
}
Response body:
Success:
{
"InsertedID":"5f8d36b26199472986f1a690"
}
Failure:
One of the participants with email sreemanth1@gmail.com timings are clashing
Example: http://localhost/meeting/5f8d36b26199472986f1a690
Response body:
{
"_id": "5f8d36b26199472986f1a690",
"title": "My new Meeting",
"participants": [
{
"name": "sreemanth1",
"email": "sreemanth1@gmail.com",
"rsvp": "yes"
},
{
"name": "sreemanth2",
"email": "sreemanth2@gmail.com",
"rsvp": "yes"
}
],
"start_Time": 1603188000,
"end_Time": 1603202400,
"creation_Timestamp": "2020-10-19T06:48:18.325Z"
}
Example: http://localhost/meetings?start=1602255600&end=1603202400
Response body:
[
{
"_id": "5f8c81b85fe813d139bcb1bf",
"title": "My new test Meeting",
"participants": [
{
"name": "sreemanth",
"email": "sreemanth@gmail.com",
"rsvp": "yes"
},
{
"name": "daksh",
"email": "daksh@gmail.com",
"rsvp": "no"
},
{
"name": "pranav",
"email": "pranav@gmail.com",
"rsvp": "maybe"
}
],
"start_Time": 1602255600,
"end_Time": 1602273600,
"creation_Timestamp": "2020-10-18T17:56:08.676Z"
},
{
"_id": "5f8c88ed089352ae924e7c84",
"title": "My new test2 Meeting",
"participants": [
{
"name": "daksh",
"email": "daksh@gmail.com",
"rsvp": "no"
},
{
"name": "pranav",
"email": "pranav@gmail.com",
"rsvp": "maybe"
}
],
"start_Time": 1602255600,
"end_Time": 1602273600,
"creation_Timestamp": "2020-10-18T18:26:53.235Z"
},
{
"_id": "5f8ca61c67bd98c1c301d19b",
"title": "My new test2 Meeting",
"participants": [
{
"name": "daksh",
"email": "daksh@gmail.com",
"rsvp": "yes"
},
{
"name": "pranav",
"email": "pranav@gmail.com",
"rsvp": "yes"
}
],
"start_Time": 1602255600,
"end_Time": 1602273600,
"creation_Timestamp": "2020-10-18T20:31:23.395Z"
},
{
"_id": "5f8d36b26199472986f1a690",
"title": "My new Meeting",
"participants": [
{
"name": "sreemanth1",
"email": "sreemanth1@gmail.com",
"rsvp": "yes"
},
{
"name": "sreemanth2",
"email": "sreemanth2@gmail.com",
"rsvp": "yes"
}
],
"start_Time": 1603188000,
"end_Time": 1603202400,
"creation_Timestamp": "2020-10-19T06:48:18.325Z"
}
]
Example: http://localhost/meetings?participant=[email]
Response body:
[
{
"_id": "5f8c81b85fe813d139bcb1bf",
"title": "My new test Meeting",
"participants": [
{
"name": "sreemanth",
"email": "sreemanth@gmail.com",
"rsvp": "yes"
},
{
"name": "daksh",
"email": "daksh@gmail.com",
"rsvp": "no"
},
{
"name": "pranav",
"email": "pranav@gmail.com",
"rsvp": "maybe"
}
],
"start_Time": 1602255600,
"end_Time": 1602273600,
"creation_Timestamp": "2020-10-18T17:56:08.676Z"
}
]
Example: http://localhost/meetings?participant=[email]&limit=1&offset=0
Response body:
[
{
"_id": "5f8c81b85fe813d139bcb1bf",
"title": "My new test Meeting",
"participants": [
{
"name": "sreemanth",
"email": "sreemanth@gmail.com",
"rsvp": "yes"
},
{
"name": "daksh",
"email": "daksh@gmail.com",
"rsvp": "no"
},
{
"name": "pranav",
"email": "pranav@gmail.com",
"rsvp": "maybe"
}
],
"start_Time": 1602255600,
"end_Time": 1602273600,
"creation_Timestamp": "2020-10-18T17:56:08.676Z"
}
]
Feel free to send feedback on Twitter or file an issue. Feature requests are always welcome. You can contact me at sreemanth2001@gmail.com