An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# The Kerbside Lookup Widget
Powered by [RecycleNow](https://recyclenow.com)

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=etchteam_kerbside-lookup&metric=alert_status)](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.