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

@datafire/opencagedata

v6.0.0

Published

DataFire integration for OpenCage Geocoder

Downloads

16

Readme

@datafire/opencagedata

Client library for OpenCage Geocoder

Installation and Usage

npm install --save @datafire/opencagedata
let opencagedata = require('@datafire/opencagedata').create();

.then(data => {
  console.log(data);
});

Description

Worldwide forward and reverse geocoding

Actions

vversion.format.get

geocode a query

opencagedata.vversion.format.get({
  "version": 0,
  "format": "",
  "q": "",
  "key": ""
}, context)

Input

  • input object
    • version required integer: API version.
    • format required string: format of the response. One of 'json', 'xml' or 'map'.
    • q required string: string or lat,lng to be geocoded.
    • key required string: an application key.
    • abbrv boolean: when true we attempt to abbreviate the formatted field in the response.
    • add_request boolean: if true the request is included in the response.
    • bounds string: four coordinate points forming the south-west and north-east corners of a bounding box (min long, min lat, max long, max lat).
    • countrycode string: two letter code ISO 3166-1 Alpha 2 code to limit results to that country.
    • jsonp string: wraps the returned JSON with a function name.
    • language string: an IETF format language code (ex: 'es' or 'pt-BR').
    • limit integer: maximum number of results to return. Default is 10. Maximum is 100.
    • min_confidence integer: integer from 1-10. Only results with at least this confidence are returned.
    • no_annotations boolean: when true annotations are not added to results.
    • no_dedupe boolean: when true results are not deduplicated.
    • no_record boolean: when true query content is not logged.
    • pretty boolean: when true results are pretty printed. Useful for debugging.
    • proximity string: lat,lng to bias results.
    • roadinfo boolean: match nearest road, include roadinfo annotation

Output

Definitions

LatLng

  • LatLng object
    • lat number
    • lng number

Response

  • Response object
    • documentation string
    • licenses array
      • items object
        • name string
        • url string
    • rate object
      • limit integer
      • remaining integer
      • reset integer
    • results array
      • items object
        • annotations object
        • bounds object
        • components object
        • confidence integer
        • formatted string
        • geometry LatLng
    • status object
      • code integer
      • message string
    • stay_informed object
      • blog string
      • twitter string
    • thanks string
    • timestamp object
      • created_http string
      • created_unix integer
    • total_results integer