-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.js
33 lines (29 loc) · 827 Bytes
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const bg = require('./')
bg({
/**
* The location to save the resulting image.
* Default: `~/Pictures/himawari-images/${Date.now()}.jpg`
* @type {String}
*/
outfile: './example.jpg',
/**
* The time of the picture desired. If you want to get the latest image, use 'latest'.
* Default: 'latest'
* @type {String|Date}
*/
date: new Date(2016, 1, 1), // Or new Date() or a date string
/**
* The zoom level of the image. Can be 1-5 (default: 2)
* Each zoom level requires more images to be downloaded and therefore stitched
* together. Higher zoom yields a higher resolution image.
* Default: 2
* @type {Number}
*/
zoom: 1,
/**
* If set to true, an image on the infrared light spectrum will be generated
* Default: false
* @type {Boolean}
*/
infrared: true
})