https://github.com/geocodeearth/core-js
JavaScript client for the Geocode Earth API
https://github.com/geocodeearth/core-js
api-client geocoding geocoding-api geodata
Last synced: 6 months ago
JSON representation
JavaScript client for the Geocode Earth API
- Host: GitHub
- URL: https://github.com/geocodeearth/core-js
- Owner: geocodeearth
- Created: 2021-03-30T15:00:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-05T11:13:54.000Z (about 2 years ago)
- Last Synced: 2025-03-25T07:51:30.433Z (7 months ago)
- Topics: api-client, geocoding, geocoding-api, geodata
- Language: TypeScript
- Homepage:
- Size: 222 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Geocode Earth Core JS
This repository contains the Geocode Earth Core API client for JavaScript. As it is still under development not all APIs are implemented yet and the API itself may change in the future.
## Implemented APIs
- Autocomplete (`/autocomplete`)
## Usage
```js
import { createAutocomplete } from 'geocode-earth-core'
const autocomplete = createAutocomplete('ge-abc123')
autocomplete('berlin').then(console.log)
```### Params
`createAutocomplete` accepts parameters as a second argument, for example:
```js
createAutocomplete('ge-abc123', {
size: 5,
focusPoint: {
lat: 52.520008,
lon: 13.404954
}
})
```All available parameters can be found in `src/api/autocomplete/params.ts`.
## Build tooling
- We use [`esbuild`](https://esbuild.github.io/) to bundle the code
- Tests use [jest](https://jestjs.io/)
- [Standard](https://standardjs.com/) is used for linting.## Commands
```bash
# creates ESM and CommonJS builds in `./dist`
$ npm run build# runs tests
$ npm test# removes dist folder
$ npm run clean# run standard
$ npm run lint
$ npm run lint-fix # with auto fix
```