Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Latest commit

 

History

History
20 lines (10 loc) · 372 Bytes

README.md

File metadata and controls

20 lines (10 loc) · 372 Bytes

JSONPromise

Promise-based JSONP API

Usage

We will use the Astro-Phys.com Ephemeris API to query for state of mars at January 20th, 1000AD:


import JSONP from './jsonp';

JSONP( 'http://www.astro-phys.com/api/de406/states?date=1000-1-20&bodies=mars&callback=' )
  .then( data => console.log( data ) )
  .catch( error => console.log( error ) );