Welcome to the ChristmasJoy API, a festive and open-source REST API designed to bring the joy of Christmas to your applications. This API, crafted with NextJS 14 and TailwindCSS, offers a variety of Christmas-themed data, perfect for creating holiday websites, apps, and more.
- Endpoints: Access jokes, images, facts, songs, greetings, and more through easy-to-use API endpoints.
- Frontend Website: A user-friendly website showcasing the capabilities of the API.
- Documentation: Detailed documentation to get you started quickly.
- Open Source: Free to use and contribute to, licensed under AGPL-3.0.
- NextJS 14: For a robust and scalable backend.
- TailwindCSS & TailwindCSS Components: For a sleek and responsive frontend design.
- TypeScript: Ensuring type safety and improving developer experience.
- /api/jokes: Returns a list of Christmas-themed jokes.
- /api/images: Returns a list of Christmas-themed images.
- /api/facts: Returns a list of Christmas-themed facts.
- /api/songs: Returns a list of Christmas-themed songs.
- /api/greetings: Returns a list of Christmas-themed greetings.
- /api/recipes: Returns a list of Christmas-themed recipes. (Currently only one recipe is available)
- /api/cookies: Returns what type of cookies Santa wants this year.
- /api/countdown: Returns the number of months, days, hours, minutes, and seconds until Christmas. And the day of the week that Christmas falls on.
Some endpoints have optional query parameters that can be used to filter the results, such as getting a random joke or image.
For more information, visit our website and check out the API documentation.
Getting started with the ChristmasJoy API is easy. Here's a quick guide to making your first request:
Start with the base URL of the API:
https://christmasjoy.dev/api/
Select the endpoint you want to access. Here are a few examples:
/api/jokes
for Christmas jokes./api/images
for festive images./api/songs
for Christmas songs.- Visit the API documentation for a full list of endpoints.
Use a tool like curl
or any HTTP client in your preferred programming language.
Here's an example using curl:
curl https://christmasjoy.dev/api/jokes
The API will return a JSON response. Here’s a simple example in JavaScript using fetch
:
fetch('https://christmasjoy.dev/api/jokes')
.then(response => response.json())
.then(data => console.log(data));
Next Steps This is just the beginning! To explore more endpoints and learn about additional parameters and response formats, please visit the website.
To use the ChristmasJoy API, visit our website and check out the API documentation.
- Basic knowledge of REST APIs
- Familiarity with JavaScript/TypeScript
- Clone the repository
git clone https://github.com/mariamills/christmasjoy.git
- Navigate to the project directory
cd christmasjoy-api
- Install dependencies
- Start the development server
To run this project, you will need to add the following environment variables to your .env file
REACT_APP_API_URL=https://christmasjoy.dev/api
Contributions are very welcomed from everyone! Whether you're fixing bugs, adding new features, or improving documentation, your help makes this project better.
To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.