Skip to content

Commit 93a79ef

Browse files
committed
Update
0 parents  commit 93a79ef

File tree

10 files changed

+1112
-0
lines changed

10 files changed

+1112
-0
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PORT=5000

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
env
2+
node_modules
3+
.vercel

README

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
![image](https://avatars.githubusercontent.com/u/196493390?s=200&v=4)
2+
3+
# Welcome to JKRecipeAPI
4+
5+
Hello for All Developers, this is API developed for Fetching data as food recipes
6+
7+
## About JKRecipeAPI
8+
9+
### base URL
10+
11+
https://jkrecipeapi.vercel.app/api/
12+
13+
### endPoints
14+
15+
```
16+
/get
17+
```
18+
19+
### full API
20+
21+
https://jkrecipeapi.vercel.app/api/alldata
22+
23+
24+
## How to use
25+
26+
- Visit the RapidAPI page to explore available plans.
27+
- Currently, only the free plan is available.
28+
- More features and paid plans will be added in future releases.
29+
30+
31+
## Authentication
32+
33+
- No authentication is required for the free version.
34+
- Future versions may introduce API keys for advanced features.
35+
36+
37+
## Example Request
38+
39+
`curl -X GET "https://jkrecipeapi.vercel.app/api/alldata"`
40+
41+
## Example Response
42+
43+
`{
44+
"Status": "Success",
45+
"Result": [
46+
{
47+
"id": 1,
48+
"name": "Pizza Dough",
49+
"cuisine": "Italian",
50+
"ingredients": [
51+
{
52+
"name": "All-Purpose Flour",
53+
"quantity": "3.5 cups"
54+
},
55+
{
56+
"name": "Warm Water",
57+
"quantity": "1.25 cups (110°F/45°C)"
58+
},
59+
{
60+
"name": "Active Dry Yeast",
61+
"quantity": "1 packet (2.25 tsp)"
62+
},
63+
{
64+
"name": "Sugar",
65+
"quantity": "1 tsp"
66+
},
67+
{
68+
"name": "Salt",
69+
"quantity": "1 tsp"
70+
},
71+
{
72+
"name": "Olive Oil",
73+
"quantity": "2 tbsp"
74+
}
75+
],
76+
"instructions": "In a small bowl, combine warm water, sugar, and yeast. Let it sit for 5-10 minutes until frothy. In a large mixing bowl, combine flour and salt. Add the yeast mixture and olive oil to the flour and mix until a dough forms. Knead the dough on a floured surface for about 8-10 minutes until smooth and elastic. Place the dough in a lightly oiled bowl, cover with a damp cloth, and let it rise in a warm place for 1-2 hours, or until doubled in size. Once risen, punch down the dough, divide it into two balls, and roll out as needed for pizzas.",
77+
"prepTime": 15,
78+
"cookTime": 0,
79+
"totalTime": 75,
80+
"servings": 2,
81+
"category": "Basics",
82+
"nutrition": {
83+
"calories": 200,
84+
"protein": "5g",
85+
"fat": "4g",
86+
"carbohydrates": "35g"
87+
},
88+
"createdAt": "2025-01-28T00:00:00.000Z"
89+
},
90+
}`
91+
92+
or simly copy the exmple request and past in to address bar on the browser
93+
94+
95+
## Test on Postman
96+
97+
- Open Postman and create a new request.
98+
- Set the request type to **GET**.
99+
- Enter the API URL:
100+
`https://jkrecipeapi.vercel.app/api/alldata`
101+
- Click Send to fetch the recipes.
102+
- You should see a JSON response with the available recipes.
103+
104+
## Versions
105+
106+
### v1.0.0-beta1
107+
108+
- initial release of the API
109+
- only few data can fetch from this api
110+
- no paid plans (free for all)
111+
- paid plans will add in future releases
112+
- release at: 31 January 2025
113+
114+
115+
## Future Updates
116+
117+
- More recipes and categories.
118+
- Authentication and API key support.
119+
- Advanced search and filtering options.
120+
- Paid plans with premium features.
121+
122+
123+
For more updates, stay tuned! 🚀

controllers/APIController.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const APIController = {
2+
alldata: async(req, res) => {
3+
try{
4+
return res.json({ Status: "Success all data"})
5+
}
6+
catch(err){
7+
console.log(err)
8+
}
9+
},
10+
onedata: async(req, res) => {
11+
try{
12+
return res.json({ Status: "Success one Data"})
13+
}
14+
catch(err){
15+
console.log(err)
16+
}
17+
}
18+
};
19+
20+
module.exports = APIController;

jsonData/api.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[
2+
{
3+
"id": 1,
4+
"name": "Pizza Dough",
5+
"cuisine": "Italian",
6+
"ingredients": [
7+
{ "name": "All-Purpose Flour", "quantity": "3.5 cups" },
8+
{ "name": "Warm Water", "quantity": "1.25 cups (110°F/45°C)" },
9+
{ "name": "Active Dry Yeast", "quantity": "1 packet (2.25 tsp)" },
10+
{ "name": "Sugar", "quantity": "1 tsp" },
11+
{ "name": "Salt", "quantity": "1 tsp" },
12+
{ "name": "Olive Oil", "quantity": "2 tbsp" }
13+
],
14+
"instructions": "In a small bowl, combine warm water, sugar, and yeast. Let it sit for 5-10 minutes until frothy. In a large mixing bowl, combine flour and salt. Add the yeast mixture and olive oil to the flour and mix until a dough forms. Knead the dough on a floured surface for about 8-10 minutes until smooth and elastic. Place the dough in a lightly oiled bowl, cover with a damp cloth, and let it rise in a warm place for 1-2 hours, or until doubled in size. Once risen, punch down the dough, divide it into two balls, and roll out as needed for pizzas.",
15+
"prepTime": 15,
16+
"cookTime": 0,
17+
"totalTime": 75,
18+
"servings": 2,
19+
"category": "Basics",
20+
"nutrition": {
21+
"calories": 200,
22+
"protein": "5g",
23+
"fat": "4g",
24+
"carbohydrates": "35g"
25+
},
26+
"imageUrl": "https://example.com/images/pizza-dough.jpg",
27+
"createdAt": "2025-01-28T00:00:00.000Z"
28+
},
29+
{
30+
"id": 2,
31+
"name": "Margherita Pizza",
32+
"cuisine": "Italian",
33+
"ingredients": [
34+
{ "name": "Pizza Dough", "quantity": "1 ball (12-inch crust)" },
35+
{ "name": "Tomato Sauce", "quantity": "1/2 cup" },
36+
{ "name": "Mozzarella Cheese", "quantity": "1.5 cups (shredded)" },
37+
{ "name": "Fresh Basil Leaves", "quantity": "6-8 leaves" },
38+
{ "name": "Olive Oil", "quantity": "1 tbsp" },
39+
{ "name": "Salt", "quantity": "1/4 tsp" }
40+
],
41+
"instructions": "Preheat oven to 500°F (260°C). Roll out the dough and place it on a pizza stone or baking sheet. Spread tomato sauce evenly over the dough, leaving a small border around the edges. Top with shredded mozzarella cheese and fresh basil leaves. Drizzle olive oil on top and sprinkle with salt. Bake for 8-12 minutes until the crust is golden and the cheese is bubbly.",
42+
"prepTime": 15,
43+
"cookTime": 10,
44+
"totalTime": 25,
45+
"servings": 2,
46+
"category": "Dinner",
47+
"nutrition": {
48+
"calories": 400,
49+
"protein": "18g",
50+
"fat": "14g",
51+
"carbohydrates": "50g"
52+
},
53+
"imageUrl": "https://example.com/images/margherita-pizza.jpg",
54+
"createdAt": "2025-01-28T00:00:00.000Z"
55+
},
56+
{
57+
"id": 3,
58+
"name": "BBQ Chicken Pizza",
59+
"cuisine": "Fusion",
60+
"ingredients": [
61+
{ "name": "Pizza Dough", "quantity": "1 ball (12-inch crust)" },
62+
{ "name": "BBQ Sauce", "quantity": "1/2 cup" },
63+
{ "name": "Cooked Chicken Breast", "quantity": "1 cup (shredded)" },
64+
{ "name": "Red Onion", "quantity": "1/4 cup (thinly sliced)" },
65+
{ "name": "Mozzarella Cheese", "quantity": "1.5 cups (shredded)" },
66+
{ "name": "Cilantro", "quantity": "2 tbsp (chopped)" }
67+
],
68+
"instructions": "Preheat oven to 500°F (260°C). Roll out the dough and place it on a pizza stone or baking sheet. Spread BBQ sauce evenly over the dough, leaving a small border around the edges. Top with shredded chicken, red onion slices, and mozzarella cheese. Bake for 10-15 minutes until the crust is golden and the cheese is melted. Sprinkle chopped cilantro on top before serving.",
69+
"prepTime": 20,
70+
"cookTime": 12,
71+
"totalTime": 32,
72+
"servings": 2,
73+
"category": "Dinner",
74+
"nutrition": {
75+
"calories": 450,
76+
"protein": "25g",
77+
"fat": "16g",
78+
"carbohydrates": "48g"
79+
},
80+
"imageUrl": "https://example.com/images/bbq-chicken-pizza.jpg",
81+
"createdAt": "2025-01-28T00:00:00.000Z"
82+
}
83+
]
84+

0 commit comments

Comments
 (0)