These API scripts are designed to allow users to manage events, contacts, images and signupforms through a set of RESTful APIs. The script provides the ability to create, read, update, and delete events and contacts, to add and delete images and to save event signup information in a database.
This API script is built using PHP and uses MySQL as the database.
To run this project, you will need to have PHP and MySQL installed on your system. Here are the steps to get started:
-
Clone this repository to your local machine:
git clone https://github.com/queuing4oranges/lesbotoc-backend-api.git
-
Navigate to the project directory:
cd your-repo
-
Set up your database and database tables.
-
Configure the database connection by updating the corresponding values.
-
Start the server by running the following command:
php -S localhost:8000
-
You should now be able to access the APIs at:
http://localhost:8000/api/{endpoint}
Here are the available endpoints for this API script:
Route | Functionality |
GET /api/events/read | Retrieve a list of all events |
GET /api/events/single_read{id} | Retrieve a single event |
POST api/events/create | Create an event |
PUT api/events/update{id} | Update an event |
DELETE api/events/delete{id} | Delete an event |
Route | Functionality |
GET /api/contacts/read | Retrieve a list of all contacts |
GET /api/events/single_read{id} | Retrieve a single contact |
POST api/contacts/create | Create a contact |
PUT api/contacts/update{id} | Update a contact |
DELETE api/contacts/delete{id} | Delete a contact |
Route | Functionality |
GET /api/images/read | Retrieve a list of all images |
GET /api/images/single_pic{id} | Retrieve a single image |
POST api/contacts/upload | Upload an image |
DELETE api/images/delete{id} | Delete an image |
Route | Functionality |
GET /api/speeddating/read | Retrieve a list of all speed dating participants |
POST api/speeddating/create | Create a speed dating participant |
DELETE api/speeddating/delete{id} | Delete a speed dating participant |