summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@inventati.org>2020-03-12 16:59:35 +0530
committerAndinus <andinus@inventati.org>2020-03-12 16:59:35 +0530
commit8603c8e3845a1830971c88bb8bc66dc3c07d7a7c (patch)
tree63be2f4b8bf596f7c8a0d9b7e2e77dae83a70fc3
parent09623655adc5a3a4d9de56383f6ca8392978b518 (diff)
downloadcetus-8603c8e3845a1830971c88bb8bc66dc3c07d7a7c.tar.gz
Fix Bing Photo of the Day fetcher
-rw-r--r--README.org2
-rw-r--r--main.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/README.org b/README.org
index f65a565..2020912 100644
--- a/README.org
+++ b/README.org
@@ -81,7 +81,7 @@ Currently only Unsplash Source random is supported for width, height
 | flag     | var     | default                                  |
 |----------+---------+------------------------------------------|
 | bpod-api | bpodAPI | https://www.bing.com/HPImageArchive.aspx |
-| bpod-num | bpodNum | 16                                       |
+| bpod-num | bpodNum | 7 (max 7)                                |
 ** Unsplash Source
 | flag         | var         | default                     |
 |--------------+-------------+-----------------------------|
diff --git a/main.go b/main.go
index 9eca522..c226610 100644
--- a/main.go
+++ b/main.go
@@ -66,7 +66,7 @@ func main() {
 	flag.StringVar(&apodAPI, "apod-api", "https://api.nasa.gov/planetary/apod", "APOD API URL")
 	flag.StringVar(&apodAPIKey, "apod-api-key", "DEMO_KEY", "APOD API Key")
 	flag.StringVar(&bpodAPI, "bpod-api", "https://www.bing.com/HPImageArchive.aspx", "BPOD API URL")
-	flag.IntVar(&bpodNum, "bpod-num", 16, "BPOD Number of images to fetch")
+	flag.IntVar(&bpodNum, "bpod-num", 7, "BPOD Number of images to fetch (max 7)")
 	flag.StringVar(&unsplashAPI, "unsplash-api", "https://source.unsplash.com", "Unsplash Source API URL")
 	flag.DurationVar(&timeout, "timeout", 16, "Timeout for http client")
 	flag.Parse()
@@ -202,7 +202,7 @@ func getPathBPOD(wall string) (string, error) {
 	case "daily":
 		q.Add("n", "1")
 	case "random":
-		// Fetches 16 images (only info) & chooses a random image
+		// Fetches image (only info) & chooses a random image
 		q.Add("n", strconv.Itoa(bpodNum))
 	default:
 		return "", fmt.Errorf("Error: Unknown wall")