Added village field to OpenCage
@@ -94,6 +94,8 @@ class OpenCage(Base):
return city
elif self.town:
return self.town
+ elif self.village:
+ return self.village
elif self.county:
return self.county
@@ -101,6 +103,10 @@ class OpenCage(Base):
def town(self):
return self.parse['components'].get('town')
+ @property
+ def village(self):
+ return self.parse['components'].get('village')
+
@property
def county(self):
return self.parse['components'].get('county')
