This API serves as the backend for the EcoEcho platform, a social media platform designed for US National Park enthusiasts. Built with Python Flask and SMOREst, and utilizing Marshmallow for schema validation, this API provides endpoints to manage user data, park information, activity reviews, and more.
To run the EcoEcho API locally, follow these steps:
- Clone the Repository:
git clone https://github.com/your/repository.git
cd eco-echo-api
- Install Dependencies:
pip install -r requirements.txt
-
Database Configuration: Set up your MySQL database and configure the connection details in config.py.
-
Run the Application:
flask run --reload
Note that the --reload flag enables automatic reloading of the application when changes are detected.
The EcoEcho API provides the following endpoints:
/api/users
: CRUD operations for managing user accounts./api/users/<user_id>
: Retrieve, update, or delete a specific user.
/api/parks
: CRUD operations for managing park information./api/parks/<park_id>
: Retrieve, update, or delete a specific park.
/api/activities
: CRUD operations for managing park activities./api/activities/<activity_id>
: Retrieve, update, or delete a specific activity.
/api/activity_reviews
: CRUD operations for managing activity reviews./api/park_reviews
: CRUD operations for managing park reviews./api/user_activity_reviews
: CRUD operations for managing user activity reviews./api/user_park_reviews
: CRUD operations for managing user park reviews.
/api/wishlists
: CRUD operations for managing user wishlists.
/api/auth/login
: Endpoint for user authentication and obtaining access tokens./api/auth/register
: Endpoint for user registration.
The EcoEcho API will use JWT (JSON Web Tokens) for securing endpoints that require user authentication. Users can obtain an access token by logging in or registering through the appropriate authentication endpoints.
Marshmallow is utilized for schema validation, ensuring that data sent to the API adheres to predefined schemas. This helps maintain data integrity and consistency throughout the application.
Contributions to the EcoEcho API are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub. Thank you for using the EcoEcho API! Happy coding and happy exploring! 🌲�