![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
dark-sky-skeleton
Advanced tools
Based on Elias Hussary's dark-sky.
A barebones isomorphic js wrapper library for Dark Sky API (previously known as Forecast.io). See Dark Sky developer docs: https://darksky.net/dev/docs.
For a more robust solution see dark-sky-api.
You can use dark-sky-skeleton client-side OR server-side. Note: an example of a server side proxy used with client side dark-sky-skeleton is forthecoming...
npm install dark-sky-skeleton
import DarkSkySkeleton from 'dark-sky-skeleton';
or Common JS
const DarkSkySkeleton = require('dark-sky-skeleton');
DarkSkySkeleton(apiKey, proxy)
const api = new DarkSkySkeleton('your-dark-sky-api-key');
The above is simple and great for testing, but your api key is exposed in every request (when running in client-side). Using a separate server-side proxy to make the actual api call to dark sky is highly suggested as this hides the api key. [ref].
To use a proxy set your api-key to false or an empty string, and pass a URL to the proxy service as the proxy (second) param.
const api = new DarkSkySkeleton(false, '//base-url-to-proxy/service');
dark-sky-skeleton theoretically supports a proxy service (aka untested). A proxy service would receive a request issued by dark-sky-skeleton, attach this query to a base URI (like the following: https://api.darksky.net/forecast/your-api-key
), and return a final request.
const api = new DarkSkySkeleton('your-dark-sky-api-key', true);
Passing true as the proxy parameter indicates that the caller is server-side. Awesome!
darkSky.latitude(lat)
.longitude(long)
.units('us')
.language('en')
.time('2000-04-06T12:20:05') // moment().year(2000).format('YYYY-MM-DDTHH:mm:ss')
.extendHourly(true)
.get();
.then(data => console.log(data));
Feel free to omit setting of latitude and longitude for subsequent calls i.e.:
darkSky.latitude(lat)
.longitude(long)
.get()
.then(data => console.log(data));
darkSky.get().then(data => console.log(data));
"Exclude some number of data blocks from the api response. This is useful for reducing latency and saving cache space (see 'Request Parameters')."
const excludes = ['alerts', 'currently', 'daily', 'flags', 'hoURLy', 'minutely'],
exludesBlock = excludes.filter(val => val != 'currently').join(',')
darkSky.latitude(lat)
.longitude(long)
.exclude(excludesBlock)
.get()
.then(data => console.log(data));
FAQs
barebones dark sky weather api - for client or server-side js
The npm package dark-sky-skeleton receives a total of 85 weekly downloads. As such, dark-sky-skeleton popularity was classified as not popular.
We found that dark-sky-skeleton demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.