ember-adresse-data-gouv-fr-api
v0.0.1
Published
Provides an Ember.js service to call https://adresse.data.gouv.fr/api
Downloads
1
Readme
ember-adresse-data-gouv-fr-api
Usage
Installation
ember install ember-adresse-data-gouv-fr-api
Application Usage
import Service from "@ember/service";
import { inject } from "@ember/service";
export default Service.extend({
adresseDataGouvFrApi: inject(),
actions: {
// location: {latitude: ..., longitude: ...}
reverseGeocode(location) {
// response: [GeoCodeJSON](https://github.com/geocoders/geocodejson-spec/tree/master/draft)
get(this, 'adresseDataGouvFrApi').reverse(location).then((response) => {
// ...
});
}
}
})
Running Tests
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit https://ember-cli.com/.