-module(blah@image). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([with_category/3, avatar/2, animal/2, sloth/2, jellyfish/2, cat/2, dog/2, food/2, sports/2, people/2, fashion/2, whatever/2]). -spec with_category(binary(), integer(), integer()) -> binary(). with_category(Category, Width, Height) -> <<<<<<<<<<<<<<"https://loremflickr.com/"/utf8, (gleam@int:to_string(Width))/binary>>/binary, "/"/utf8>>/binary, (gleam@int:to_string(Height))/binary>>/binary, "/"/utf8>>/binary, Category/binary>>/binary, "?lock="/utf8>>/binary, (gleam@int:to_string(blah@utils:get_random_int(4, 4294967296)))/binary>>. -spec avatar(integer(), integer()) -> binary(). avatar(Width, Height) -> Category = blah@utils:get_random_item( [<<"portrait"/utf8>>, <<"celebrity"/utf8>>, <<"face"/utf8>>, <<"smile"/utf8>>] ), with_category(Category, Width, Height). -spec animal(integer(), integer()) -> binary(). animal(Width, Height) -> with_category(<<"animal"/utf8>>, Width, Height). -spec sloth(integer(), integer()) -> binary(). sloth(Width, Height) -> with_category(<<"sloth"/utf8>>, Width, Height). -spec jellyfish(integer(), integer()) -> binary(). jellyfish(Width, Height) -> with_category(<<"jellyfish"/utf8>>, Width, Height). -spec cat(integer(), integer()) -> binary(). cat(Width, Height) -> with_category(<<"cat"/utf8>>, Width, Height). -spec dog(integer(), integer()) -> binary(). dog(Width, Height) -> with_category(<<"dog"/utf8>>, Width, Height). -spec food(integer(), integer()) -> binary(). food(Width, Height) -> with_category(<<"food"/utf8>>, Width, Height). -spec sports(integer(), integer()) -> binary(). sports(Width, Height) -> with_category(<<"sports"/utf8>>, Width, Height). -spec people(integer(), integer()) -> binary(). people(Width, Height) -> with_category(<<"people"/utf8>>, Width, Height). -spec fashion(integer(), integer()) -> binary(). fashion(Width, Height) -> with_category(<<"fashion"/utf8>>, Width, Height). -spec whatever(integer(), integer()) -> binary(). whatever(Width, Height) -> <<<<<<<<<<"https://picsum.photos/seed/"/utf8, (gleam@int:to_string( blah@utils:get_random_int(4, 4294967296) ))/binary>>/binary, "/"/utf8>>/binary, (gleam@int:to_string(Width))/binary>>/binary, "/"/utf8>>/binary, (gleam@int:to_string(Height))/binary>>.