A library for working with the WikimediaCommons API
Internal.PictureResource
Main type of the library, a picture resource from WikiMedia Commons.
getUrl : Basics.Int -> PictureResource -> Maybe Url
Get an Url
from a PictureResource
if the given width is valid.
getMaxUrl : PictureResource -> Url
Get an Url
from a PictureResource
pointing to a picture in the largest possible size.
getMaxSize : PictureResource -> ( Basics.Int, Basics.Int )
Get the maximum size in which the resource is available.
Internal.Url
An URL String
fetchResources : Basics.Int -> Task Http.Error (List PictureResource)
Fetches a number of picture resources from the API.