updates incorporating Norfolk County, ON

This commit is contained in:
dt215git
2024-09-21 10:10:02 +01:00
committed by 5ila5
parent bab50e0120
commit 6c1a3b5432
5 changed files with 37 additions and 2 deletions

View File

@@ -622,6 +622,7 @@ If your service provider is not listed, feel free to open a [source request issu
- [London (ON)](/doc/source/recyclecoach_com.md) / london.ca
- [Montreal (QC)](/doc/source/montreal_ca.md) / montreal.ca/info-collectes
- [Niagara Region](/doc/ics/recollect.md) / niagararegion.ca
- [Norfolk County (ON)](/doc/source/recyclecoach_com.md) / norfolkcounty.ca
- [Orillia, Ontario](/doc/source/orillia_ca.md) / orillia.ca
- [Ottawa, Canada](/doc/ics/recollect.md) / ottawa.ca
- [Peel Region, ON](/doc/ics/recollect.md) / peelregion.ca

View File

@@ -3595,6 +3595,12 @@
},
"id": "ics_recollect"
},
{
"title": "Norfolk County (ON)",
"module": "recyclecoach_com",
"default_params": {},
"id": "recyclecoach_com"
},
{
"title": "Orillia, Ontario",
"module": "orillia_ca",

View File

@@ -74,6 +74,11 @@ EXTRA_INFO = [
"country": "ca",
"default_params": {"city": "Kawartha Lakes", "state": "Ontario"},
},
{
"title": "Norfolk County (ON)",
"url": "https://www.norfolkcounty.ca/",
"country": "ca",
},
]
TEST_CASES = {
@@ -129,12 +134,23 @@ TEST_CASES = {
"city": "Richmond Hill",
"state": "Ontario",
},
"Norfolk County, Ontario, Canada (with district_id, project_id & zone_id)": {
"district_id": "OLYMP",
"project_id": 3107,
"zone_id": "zone-z11266-z16205-z16208-z16218",
},
}
class Source:
def __init__(
self, street, city, state, project_id=None, district_id=None, zone_id=None
self,
street=None,
city=None,
state=None,
project_id=None,
district_id=None,
zone_id=None,
): # argX correspond to the args dict in the source configuration
self.street = self._format_key(street)
self.city = self._format_key(city)

View File

@@ -52,3 +52,15 @@ lookups and use those directly
**zone_id**<br>
*(string) (optional)* string built from result set of
`https://api-city.recyclecoach.com/zone-setup/address` endpoint
As an example: Main St, Port Dover, Norfolk County, Ontario, Canada
```yaml
waste_collection_schedule:
sources:
- name: recyclecoach_com
args:
district_id: "OLYMP",
project_id: 3107,
zone_id: "zone-z11266-z16205-z16208-z16218"
```

File diff suppressed because one or more lines are too long