Skip to content

Commit

Permalink
update geocoding api
Browse files Browse the repository at this point in the history
  • Loading branch information
iBinh committed Jul 13, 2021
1 parent b87e87e commit 11edbe6
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
# @goongmaps/goong-sdk

[![npm](https://img.shields.io/npm/v/@goongmaps/goong-sdk.svg)](https://www.npmjs.com/package/@goongmaps/goong-sdk)

A JS SDK for working with [Goong REST APIs](https://docs.goong.io/rest/).
A Javascript SDK for working with [Goong REST APIs](https://docs.goong.io/rest/).

- [Directions API](https://docs.goong.io/rest/directions/)
- [Distance Matrix API](https://docs.goong.io/rest/distance_matrix/)
- [Geocoding API](https://docs.goong.io/rest/geocode/)
- [Place API](https://docs.goong.io/rest/place/)
- [Static Map API](https://docs.goong.io/rest/staticmap/)

- [Directions API](https://docs.goong.io/rest/direction/)
- [Distance Matrix API](https://docs.goong.io/rest/distance_matrix/)
- [Geocoding API](https://docs.goong.io/rest/geocode/)
- [Place API](https://docs.goong.io/rest/place/)
- [Static Map API](https://docs.goong.io/rest/staticmap/)

Works in Node, the browser, and React Native.

## Table of contents

- [Installation](#installation)
- [Npm](#npm)
- [Yarn](#yarn)
- [Usage](#usage)
- [Creating clients](#creating-clients)
- [Creating and sending requests](#creating-and-sending-requests)
- [Services](#services)
- [Pre-bundled files on unpkg.com](#pre-bundled-files-on-unpkgcom)

## Installation

### Npm

```
npm install @goongmaps/goong-sdk
```

### Yarn

```
yarn add @gongmaps/goong-sdk
```

**If you are supporting older browsers, you will need a Promise polyfill.**
[es6-promise](https://github.com/stefanpenner/es6-promise) is a good one, if you're uncertain.

Expand All @@ -45,7 +53,7 @@ There are 3 basic steps to getting an API response:

### Creating clients

To **create a service client**, import the service's factory function from `'@goongmaps/goong-sdk/services/{service}'` and provide it with your access token.
To **create a service client**, import the service's factory function from `'@goongmaps/goong-sdk/services/{service}'` and provide it with your [access token](https://docs.goong.io/rest/api-key/).

The service client exposes methods that create requests.

Expand Down Expand Up @@ -109,15 +117,3 @@ Here's how you might use it.
.then(..);
</script>
```

[`got`]: https://github.com/sindresorhus/got

[`http`]: https://nodejs.org/api/http.html

[`xmlhttprequest`]: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

[`gapirequest`]: #gapirequest

[`gapiresponse`]: #gapiresponse

[`gapierror`]: #gapierror
17 changes: 1 addition & 16 deletions config/service-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,4 @@ toc:
- Geocoding
- Autocomplete
- Directions
- DistanceMatrix
# - name: Data structures
# description: |
# Data structures used in service method configuration.
# children:
# - DirectionsWaypoint
# - MapMatchingPoint
# - MatrixPoint
# - OptimizationWaypoint
# - SimpleMarkerOverlay
# - CustomMarkerOverlay
# - PathOverlay
# - GeoJsonOverlay
# - UploadableFile
# - Coordinates
# - BoundingBox
- DistanceMatrix
Loading

0 comments on commit 11edbe6

Please sign in to comment.