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/openuv

v3.0.0

Published

DataFire integration for OpenUV - Global Real-Time UV Index Forecast API

Downloads

5

Readme

@datafire/openuv

Client library for OpenUV - Global Real-Time UV Index Forecast API

Installation and Usage

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

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

Description

The missing minimalistic JSON real-time UV Index API for awesome Developers, Innovators and Smart Home Enthusiasts

Actions

forecast.get

Get hourly UV Index Forecast by location and date. Optional altitude, ozone level and datetime could be provided.

openuv.forecast.get({
  "lat": 0,
  "lng": 0,
  "x-access-token": ""
}, context)

Input

  • input object
    • lat required number: latitude, from -90.00 to 90.00
    • lng required number: longitude, from -180.00 to 180.00
    • alt number: Altitude in meters, from 0 to 10000m, 0m by default. If provided the altitude correction factor will be applied to clear sky sea level UV Index value.
    • ozone number: Ozone in du (Dobson Units), from 100 to 550du, the latest forecast from OMI dataset is used by default.
    • dt string: UTC datetime in ISO-8601 format, now by default. Use that parameter to get UV Index Forecast for any point in time.
    • x-access-token required string: This header is used to send data that contains your OpenUV API key

Output

protection.get

Get daily protection time by location, UV Index from and UV Index to with 10 minutes accuracy. Optional altitide and ozone level could be provided.

openuv.protection.get({
  "lat": 0,
  "lng": 0,
  "from": 0,
  "to": 0,
  "x-access-token": ""
}, context)

Input

  • input object
    • lat required number: latitude, from -90.00 to 90.00
    • lng required number: longitude, from -180.00 to 180.00
    • from required number: UV Index from value for protection datetime lookup. From 0 to 40.
    • to required number: UV Index to value for protection datetime lookup. From 0 to 40.
    • alt number: Altitude in meters, from 0 to 10000m, 0m by default. If provided the altitude correction factor will be applied to clear sky sea level UV Index value.
    • ozone number: Ozone in du (Dobson Units), from 100 to 550du, the latest forecast from OMI dataset is used by default.
    • x-access-token required string: This header is used to send data that contains your OpenUV API key

Output

uv.get

Get real-time UV Index by location. Optional altitude, ozone level and datetime could be provided.

openuv.uv.get({
  "lat": 0,
  "lng": 0,
  "x-access-token": ""
}, context)

Input

  • input object
    • lat required number: latitude, from -90.00 to 90.00
    • lng required number: longitude, from -180.00 to 180.00
    • alt number: Altitude in meters, from 0 to 10000m, 0m by default. If provided the altitude correction factor will be applied to clear sky sea level UV Index value.
    • ozone number: Ozone in du (Dobson Units), from 100 to 550du, the latest forecast from OMI dataset is used by default.
    • dt string: UTC datetime in ISO-8601 format, now by default. Use that parameter to get UV Index Forecast for any point in time.
    • x-access-token required string: This header is used to send data that contains your OpenUV API key

Output

Definitions

Error

  • Error object
    • error required string

forecast

  • forecast object
    • uv required number
    • uv_time required string

forecastResult

protectionResult

  • result object
    • ozone required number
    • ozone_time required string
    • uv required number
    • uv_max required number
    • uv_max_time required string
    • uv_time required string

uvIndexResult

  • result object
    • from_time required string
    • from_uv required number
    • to_time required string
    • to_uv required number