Haskell wrapper for nekos.best API
Get a neko image
import NekosBest.API (getNbImage)
import qualified NekosBest.Category as C
main = do
res <- getNbImage C.Neko
print res
For random images you can use randomNbImage
passing a RandomGen
value
import NekosBest.API (randomNbImage)
import qualified NekosBest.Category as C
main = do
gen <- getStdGen
(res, gen') <- randomNbImage gen
print res
Downloading an image
import NekosBest.API (getNbImage, downloadNbImage)
import qualified NekosBest.Category as C
main = do
res <- getNbImage C.Neko
mapM_ (\x -> downloadNbImage x "filename") res