https://github.com/etchteam/kerbside-lookup
The Kerbside Lookup Widget by Recycle Now
https://github.com/etchteam/kerbside-lookup
Last synced: 12 months ago
JSON representation
The Kerbside Lookup Widget by Recycle Now
- Host: GitHub
- URL: https://github.com/etchteam/kerbside-lookup
- Owner: etchteam
- License: agpl-3.0
- Created: 2020-02-10T11:29:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-19T18:32:09.000Z (over 1 year ago)
- Last Synced: 2025-02-15T04:25:39.781Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://recyclenow.com
- Size: 9.14 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# The Kerbside Lookup Widget
Powered by [RecycleNow](https://recyclenow.com)
[](https://sonarcloud.io/summary/new_code?id=etchteam_kerbside-lookup)
Contact the [RecycleNow Digital Team](mailto:digitalteam@wrap.co.uk) for API Access.
## Usage
Include the script and CSS (optional) from jsdeliver:
```html
```
Add the following `div` in the location you want the widget to appear:
```html
```
### Options
You can set the following using `data-prop` attributes on your `div` tag.
* `token` - Your API token (required)
* `materials` - An array of material IDs to restrict the widget to (optional)
* `postcode` - A postcode to restrict the widget to (optional)
* `locale` - `cy` or `en`. Defaults to `en`.
* `button` - Button text. Defaults to `Submit` or `Cyflwyno` depending on the `locale` setting.
* `placeholder` - Placeholder text. Defaults to `Enter a postcode...` or `Rhowch eich cod post...` depending on `locale` setting.
* `apihost` - Used in development to override the api host on pre-built widget code.
For example:
```html
```
Alternatively, you can ue a script tag with a JSON object inside.
```html
{
"token": "MySuperSecureApiToken",
"locale": "cy"
}
```
## Support
For API access, full documentation, and a list of material IDs, please contact the [RecycleNow Digital Team](mailto:digitalteam@wrap.co.uk).
Raise issues on this repository for any bugs you find or feature requests that you have.