npm i use-here-apior
yarn add use-here-api
Table of Contents
use-here-api
exposes convenient hooks which lets you easily integrate HERE RESTful API services in your React.js projects.
Prior using any of the exposed hook you should provide credentials to authenticate your requests.
As noted in the Authentication and Authorization Developer Guide there are three supported authentication credential types:
-
import { configureAuthentication } from '@cloudpower97/use-here-api'; configureAuthentication({ apiKey: '...' });
-
import { configureAuthentication } from '@cloudpower97/use-here-api'; configureAuthentication({ token: '...' });
-
import { configureAuthentication } from '@cloudpower97/use-here-api'; configureAuthentication({ app_id: '...', app_code: '...', });
With the introduction of OAuth 2.0 Token and API Key authentication types there are also new domain names for HERE services.
The domain names used with APPCODE Credentials and the new domain names to be used with either OAuth 2.0 Token or API Key Credentials are different.
However, once configured properly, use-here-api
will automatically use the correct domain name to be used for the respective HERE services.
At the moment the following hooks
are available:
-
Geocoding and Search
useForwardGeocoding
- Submit an address to request the corresponding geocoordinates. Addresses may use structured input or free-form search strings with complete or partial address information. The more detailed the address you submit, the higher the potential match accuracy.useReverseGeocoding
- Submit a geocoordinate and an optional radius to request the corresponding address.useAutocomplete
- Get better search suggestions for your addresses with fewer keystrokes.
-
useWeather
- Give insights into real-time weather forecasts, alerts, and astronomical info for any location. -
Places
usePlacesAutosuggest
- Provides you a lists of suggested search terms, instants results and refined search links related to a given (partial) search term and location context. This is used to help users save time, iterate on their searches, and get the results.
Yes please!
Pull requests and reporting an issue are always welcome :D
Fork and clone the repo:
git clone git@github.com:your-username/use-here-api.git
Create a branch for the feature/fix:
git checkout -b feat:new-great-idea
Once you are done, push to your fork and submit a pull request.
And remember,
We follow the Angular Commit Guidelines.
Refer to their documentation for more information.
Note: If you DON'T follow the Angular Commit Guidelines you will not be able to commit your changes.