npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudpower97/use-here-api

v0.5.0

Published

Collection of convenient React Hooks which lets you easily use HERE RESTful API services

Downloads

34

Readme

made-for-react code style: prettier GitHub release GitHub contributors PRs Welcome License: MIT


Overview

use-here-api exposes convenient hooks which lets you easily integrate HERE RESTful API services in your React.js projects.


Documentation

Usage

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:

  • API Key Credentials

    import { configureAuthentication } from '@cloudpower97/use-here-api';
    
    configureAuthentication({
      apiKey: '...'
    });
    
  • OAuth 2.0 Token Credentials

    import { configureAuthentication } from '@cloudpower97/use-here-api';
    
    configureAuthentication({
      token: '...'
    });
    
  • APP CODE Credentials

    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.

Available Hooks

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.

Contributing

Yes please!

Pull requests and reporting an issue are always welcome :D

Development

Fork and clone the repo:

git clone [email protected]: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,

Commit Guidelines

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.