Skip to content

Commit 0dae859

Browse files
added docstring
1 parent 3684df1 commit 0dae859

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

EazyDiner-Scraper/restaurants.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,36 @@
44

55

66
class EazyDiner:
7-
7+
"""
8+
Class - `EazyDiner`
9+
Example:
10+
```
11+
hotels = EazyDiner(location="Delhi NCR")
12+
```\n
13+
Methods :\n
14+
1. ``.getRestaurants() | Response - List of restraunts and its details.
15+
"""
816

917
def __init__(self, location):
1018
self.location = location
1119

1220
def getRestaurants(self):
13-
21+
"""
22+
Class - `EazyDiner`
23+
Example:
24+
```
25+
del = EazyDiner("Delhi NCR") or del = EazyDiner("delhi-ncr")
26+
del.getRestaurants()
27+
```
28+
Returns:
29+
{
30+
"restaurant": restaurant name
31+
"location": location of restaurant
32+
"rating": rating
33+
"cuisine": cuisines provided
34+
"price": price for two people
35+
}
36+
"""
1437
url = (
1538
"https://www.eazydiner.com/restaurants?location="
1639
+ self.location.replace(" ", "-").replace(",", "").lower()

0 commit comments

Comments
 (0)