Explore With Me is a Java-based application designed to facilitate the exploration of events among users. This documentation provides an overview of the project, installation instructions, usage guidelines, and details on the API endpoints.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/LetaTreiden/java-explore-with-me.git cd java-shareit -
Build the project:
Ensure you have Maven installed. Run the following command to build the project:
mvn clean install
-
Run the application:
Use the following command to run the application:
java -jar target/shareit-0.0.1-SNAPSHOT.jar
To use the Explore With Me application, you need to interact with its API. Below are some examples of how to use the API.
Creating a new event:
POST /events
Content-Type: application/json
{
"title": "Hiking Adventure",
"description": "A fun hiking event",
"date": "2024-06-15T09:00:00",
"location": "Mountain Trail",
"organizerId": 1
}
Listing all events:
GET /events
Adding a new user:
POST /users
Content-Type: application/json
{
"name": "Alice Smith",
"email": "[email protected]"
}
Event Endpoints
Create an Event
POST /events
Request Body: { "title": "string", "description": "string", "date": "string", "location": "string", "organizerId": number }
Get All Events
GET /events
Get Event by ID
GET /events/{id}
Update Event
PUT /events/{id}
Request Body: { "title": "string", "description": "string", "date": "string", "location": "string" }
Delete Event
DELETE /events/{id}
User Endpolints
Create a User
POST /users
Request Body: { "name": "string", "email": "string" }
Get All Users
GET /users
Get User by ID
GET /users/{id}
Update User
PUT /users/{id}
Request Body: { "name": "string", "email": "string" }
Delete User
DELETE /users/{id}
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.
This project is licensed under the MIT License