parent
1025ada7e8
commit
fec4dc6d91
@ -0,0 +1,21 @@
|
||||
from geopy.geocoders import Nominatim
|
||||
from .location import Location
|
||||
|
||||
class Player():
|
||||
def __init__(self):
|
||||
self.location = None
|
||||
|
||||
def set_location_with_query(self, query):
|
||||
loc = Nominatim(user_agent="GetLoc")
|
||||
getLoc = loc.geocode(query)
|
||||
|
||||
self.location = Location(getLoc.latitude, getLoc.longitude)
|
||||
|
||||
def set_location(self, location):
|
||||
self.location = location
|
||||
|
||||
def get_location(self):
|
||||
return self.location
|
||||
|
||||
def cooldown_to(self, location):
|
||||
return self.location.get_cooldown(location)
|
@ -1,3 +1,13 @@
|
||||
class Raid():
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, name, number, level, location, start_time, end_time, country):
|
||||
self.name = name
|
||||
self.number = number
|
||||
self.level = level
|
||||
self.location = location
|
||||
self.start_time = start_time
|
||||
self.end_time = end_time
|
||||
self.country = country
|
||||
|
||||
def __repr__(self):
|
||||
return f"(Raid: {self.name} - {self.level}-star - {self.location} - Start: {self.start_time} - End: {self.end_time})"
|
||||
|
@ -1,4 +1,5 @@
|
||||
pymobiledevice3
|
||||
beautifulsoup4
|
||||
lxml
|
||||
requests
|
||||
requests
|
||||
geopy
|
Loading…
Reference in new issue