https://github.com/aaronc81/york-bin-collection
Ruby interface and scraper for City of York waste collection
https://github.com/aaronc81/york-bin-collection
ruby york
Last synced: about 1 year ago
JSON representation
Ruby interface and scraper for City of York waste collection
- Host: GitHub
- URL: https://github.com/aaronc81/york-bin-collection
- Owner: AaronC81
- License: mit
- Created: 2019-09-08T16:21:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-20T02:00:30.000Z (over 3 years ago)
- Last Synced: 2025-03-06T15:17:08.881Z (over 1 year ago)
- Topics: ruby, york
- Language: Ruby
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# YorkBinCollection
This is an interface to the City of York website, scraping the calendar page
for refuse collection (or using its JSON API where possible).
## Installation
```
gem install york-bin-collection
```
## Usage
```ruby
require 'york-bin-collection'
# Get the unique ID (UPRN) for some property in a postcode
uprn = YorkBinCollection.get_uprns_for_postcode("YO10 1AB").sample
# Get the collection schedules
dates = YorkBinCollection.get_collection_dates(uprn)
dates.recycling # => [Date, Date, ...]
dates.household # => [Date, Date, ...]
dates.garden # => [Date, Date, ...]
```