1 ! Copyright (C) 2011 John Benediktsson.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: images.http kernel sequences urls urls.encoding ;
10 : robohash-url ( str -- url )
11 url-encode "http://robohash.org/" prepend >url ;
13 : (robohash) ( str type -- image )
14 [ robohash-url ] [ "set" set-query-param ] bi*
19 : robohash1 ( str -- image ) "set1" (robohash) ;
21 : robohash2 ( str -- image ) "set2" (robohash) ;
23 : robohash3 ( str -- image ) "set3" (robohash) ;