summary refs log tree commit diff stats
path: root/pkg/wallhaven/wallhaven.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-18 18:00:10 +0530
committerAndinus <andinus@nand.sh>2020-03-18 18:00:10 +0530
commit2f15edf548ec131d2eb97bd5338a1adef768acea (patch)
treef498d24d809545ddec75c281b6edc473555a9f1c /pkg/wallhaven/wallhaven.go
parent183fb1d77eb2a949880538615d335d8c4d3a6518 (diff)
downloadcetus-2f15edf548ec131d2eb97bd5338a1adef768acea.tar.gz
Restructure for Cetus v0.5
This version aims for a cleaner code, better documentation & to adopt
better practices.
Diffstat (limited to 'pkg/wallhaven/wallhaven.go')
-rw-r--r--pkg/wallhaven/wallhaven.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/pkg/wallhaven/wallhaven.go b/pkg/wallhaven/wallhaven.go
deleted file mode 100644
index 25af77c..0000000
--- a/pkg/wallhaven/wallhaven.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package wallhaven
-
-import (
-	"time"
-
-	"framagit.org/andinus/cetus/pkg/cetus"
-)
-
-// GetWhJson returns json response received from the api
-func GetWhJson(reqInfo map[string]string, t time.Duration) (string, error) {
-	params := make(map[string]string)
-	params["apikey"] = reqInfo["apiKey"]
-	if reqInfo["random"] == "true" {
-		params["sorting"] = "random"
-
-	}
-
-	body, err := cetus.GetRes(reqInfo["api"], params, t)
-	return string(body), err
-}