mirror of
https://github.com/sascha-hemi/hacs_waste_collection_schedule.git
synced 2026-03-21 02:04:22 +01:00
updates incorporating Norfolk County, ON
This commit is contained in:
@@ -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
|
- [London (ON)](/doc/source/recyclecoach_com.md) / london.ca
|
||||||
- [Montreal (QC)](/doc/source/montreal_ca.md) / montreal.ca/info-collectes
|
- [Montreal (QC)](/doc/source/montreal_ca.md) / montreal.ca/info-collectes
|
||||||
- [Niagara Region](/doc/ics/recollect.md) / niagararegion.ca
|
- [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
|
- [Orillia, Ontario](/doc/source/orillia_ca.md) / orillia.ca
|
||||||
- [Ottawa, Canada](/doc/ics/recollect.md) / ottawa.ca
|
- [Ottawa, Canada](/doc/ics/recollect.md) / ottawa.ca
|
||||||
- [Peel Region, ON](/doc/ics/recollect.md) / peelregion.ca
|
- [Peel Region, ON](/doc/ics/recollect.md) / peelregion.ca
|
||||||
|
|||||||
@@ -3595,6 +3595,12 @@
|
|||||||
},
|
},
|
||||||
"id": "ics_recollect"
|
"id": "ics_recollect"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "Norfolk County (ON)",
|
||||||
|
"module": "recyclecoach_com",
|
||||||
|
"default_params": {},
|
||||||
|
"id": "recyclecoach_com"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "Orillia, Ontario",
|
"title": "Orillia, Ontario",
|
||||||
"module": "orillia_ca",
|
"module": "orillia_ca",
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ EXTRA_INFO = [
|
|||||||
"country": "ca",
|
"country": "ca",
|
||||||
"default_params": {"city": "Kawartha Lakes", "state": "Ontario"},
|
"default_params": {"city": "Kawartha Lakes", "state": "Ontario"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "Norfolk County (ON)",
|
||||||
|
"url": "https://www.norfolkcounty.ca/",
|
||||||
|
"country": "ca",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_CASES = {
|
TEST_CASES = {
|
||||||
@@ -129,12 +134,23 @@ TEST_CASES = {
|
|||||||
"city": "Richmond Hill",
|
"city": "Richmond Hill",
|
||||||
"state": "Ontario",
|
"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:
|
class Source:
|
||||||
def __init__(
|
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
|
): # argX correspond to the args dict in the source configuration
|
||||||
self.street = self._format_key(street)
|
self.street = self._format_key(street)
|
||||||
self.city = self._format_key(city)
|
self.city = self._format_key(city)
|
||||||
|
|||||||
@@ -52,3 +52,15 @@ lookups and use those directly
|
|||||||
**zone_id**<br>
|
**zone_id**<br>
|
||||||
*(string) (optional)* string built from result set of
|
*(string) (optional)* string built from result set of
|
||||||
`https://api-city.recyclecoach.com/zone-setup/address` endpoint
|
`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"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user