Haskell


Installation

The nekos-best package is available on Hackage and can be added to the .cabal file

build-depends:
    nekos-best ^>= 0.2.0.0

Usage

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 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

About

Example added by: xQuantx

The source code is available at GitHub

NekosBest NekosBest NekoBest