https://github.com/shimbhu77/deepthought_backend_assignment
This GitHub repository provides an API for managing events. It offers various endpoints to perform operations such as retrieving events by ID, fetching the latest events, creating new events, updating existing events, and deleting events. The API supports pagination for retrieving a specific number of events per page.
https://github.com/shimbhu77/deepthought_backend_assignment
hibernate java lombok maven mysql spring-boot springdata-jpa
Last synced: 2 months ago
JSON representation
This GitHub repository provides an API for managing events. It offers various endpoints to perform operations such as retrieving events by ID, fetching the latest events, creating new events, updating existing events, and deleting events. The API supports pagination for retrieving a specific number of events per page.
- Host: GitHub
- URL: https://github.com/shimbhu77/deepthought_backend_assignment
- Owner: Shimbhu77
- Created: 2023-05-16T10:58:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T16:34:43.000Z (over 1 year ago)
- Last Synced: 2023-10-12T11:02:16.503Z (over 1 year ago)
- Topics: hibernate, java, lombok, maven, mysql, spring-boot, springdata-jpa
- Language: Java
- Homepage: http://localhost:8888/api/v3/app/**
- Size: 176 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Event API Documentation
### Get Event by ID
```
GET /api/v3/app/events?id=:event_id
```
Returns an event based on its unique ID.
### Get Latest Events
```
GET /api/v3/app/event?type=latest&limit=5&page=1
```
Returns the latest events, paginated by page number and limit of events per page.### Create Event
```
POST /api/v3/app/events
```
Creates a new event and returns the ID of the created event. Requires the following payload parameters:
- `name`: Name of the event
- `tagline`: A proper tag-line for the event
- `schedule`: Date and time of the event
- `description`: Description of the event
- `moderator`: User who is hosting the event
- `category`: Category of the event
- `sub_category`: Subcategory of the event
- `rigor_rank`: Integer value representing the rigor level of the event
- `files[image]`: Image file for the event (file upload)### Update Event
```
PUT /api/v3/app/events/:id
```
Updates an existing event based on its ID. Requires the same payload parameters as the Create Event endpoint.### Delete Event
```
DELETE /api/v3/app/events/:id
```
Deletes an event based on its unique ID.#### Event Object Data Model
- `type`: "event"
- `uid`: User ID (integer)
- `name`: Name of the event (string)
- `tagline`: A proper tag-line for the event (string)
- `schedule`: Date and time of the event (timestamp)
- `description`: Description of the event (string)
- `files[image]`: Image file for the event (file upload)
- `moderator`: User who is hosting the event (string)
- `category`: Category of the event (string)
- `sub_category`: Subcategory of the event (string)
- `rigor_rank`: Integer value representing the rigor level of the event
- `attendees`: Array of user IDs who are attending the event