boilerplate for many objects
This commit is contained in:
		| @@ -26,3 +26,6 @@ class SBBWrapper: | |||||||
|         } |         } | ||||||
|         return auth |         return auth | ||||||
|      |      | ||||||
|  |  | ||||||
|  |     def get_closest_station(self, station_name): | ||||||
|  |         pass | ||||||
							
								
								
									
										7
									
								
								event_providers/outdooractive.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								event_providers/outdooractive.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | |||||||
|  | from template import BaseProvider | ||||||
|  |  | ||||||
|  | class OutdoorActiveAPI: | ||||||
|  |     pass | ||||||
|  |  | ||||||
|  | class OutdoorActiveProvider(BaseProvider): | ||||||
|  |     pass | ||||||
							
								
								
									
										5
									
								
								event_providers/template.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								event_providers/template.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  |  | ||||||
|  | class BaseProvider: | ||||||
|  |     api = "" | ||||||
|  |     def __init__(self) -> None: | ||||||
|  |         pass | ||||||
							
								
								
									
										38
									
								
								models/event.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								models/event.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | |||||||
|  |  | ||||||
|  | class Event: | ||||||
|  |     coordinates = [] | ||||||
|  |     reviews = [] | ||||||
|  |     category = [] | ||||||
|  |     weather_requirements = 0 | ||||||
|  |  | ||||||
|  |     trip_to = "" | ||||||
|  |     trip_back = "" | ||||||
|  |  | ||||||
|  |     def __init__(self, **kwargs): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |      | ||||||
|  |     def find_optimal_trip(self): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def trip_is_good(self): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class Review: | ||||||
|  |     text = "" | ||||||
|  |     rating = 0 # max 5 | ||||||
|  |     additional_photos = [] | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     def __init__(self, text, rating) -> None: | ||||||
|  |         self.text = text | ||||||
|  |         self.rating = rating | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     def add_photo(self, photo): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -1,19 +0,0 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
| class User: |  | ||||||
|     name = "" |  | ||||||
|     event_preferences = [] |  | ||||||
|     event_blacklist = [] |  | ||||||
|     home_coordinates = [] |  | ||||||
|     group_size = 0 |  | ||||||
|     min_age = 0 |  | ||||||
|     max_age = 0 |  | ||||||
|      |  | ||||||
|     def __init__(self, **kwargs): |  | ||||||
|         self.name = kwargs.pop("name") |  | ||||||
|         self.home_coordinates = kwargs.pop("home_coordinates") |  | ||||||
|         self.event_preferences = kwargs.pop("event_preferences") |  | ||||||
|         self.event_blacklist = kwargs.pop("name") |  | ||||||
|         self.group_size = kwargs.pop("group_size") |  | ||||||
|         self.min_age = kwargs.pop("min_age") |  | ||||||
|         self.max_age = kwargs.pop("max_age") |  | ||||||
							
								
								
									
										17
									
								
								models/travel_route.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								models/travel_route.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
|  | class TravelRoute: | ||||||
|  |     def __init__(self, start_coords, end_coords, ) -> None: | ||||||
|  |         pass | ||||||
|  |      | ||||||
|  |     @property | ||||||
|  |     def duration(self): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def wait_time(self): | ||||||
|  |         pass | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def eco_score(self): | ||||||
|  |         pass | ||||||
| @@ -0,0 +1,17 @@ | |||||||
|  | class User: | ||||||
|  |     name = "" | ||||||
|  |     event_preferences = [] | ||||||
|  |     event_blacklist = [] | ||||||
|  |     home_coordinates = [] | ||||||
|  |     group_size = 0 | ||||||
|  |     min_age = 0 | ||||||
|  |     max_age = 0 | ||||||
|  |      | ||||||
|  |     def __init__(self, **kwargs): | ||||||
|  |         self.name = kwargs.pop("name") | ||||||
|  |         self.home_coordinates = kwargs.pop("home_coordinates") | ||||||
|  |         self.event_preferences = kwargs.pop("event_preferences") | ||||||
|  |         self.event_blacklist = kwargs.pop("name") | ||||||
|  |         self.group_size = kwargs.pop("group_size") | ||||||
|  |         self.min_age = kwargs.pop("min_age") | ||||||
|  |         self.max_age = kwargs.pop("max_age") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Remy Moll
					Remy Moll