This module allows you to make API calls to fetch a list of articles and decode it into an Elm records.
Helper method to generate a blank set of QueryParameters
Fetch a list of articles using a set of predefined filters represented by query parameters.
foremApiConfig : ForemApi.Config
foremApiConfig =
ForemApi.Config
"https://dev.to"
[ Http.header "accept" "application/vnd.forem.api-v1+json" ]
queryParameters : QueryParamters
queryParameters =
blankQueryParamters
cmd : Cmd msg
cmd =
ForemApi.Articles.fetch
foremApiConfig
{ queryParameters | tag = "elm" }
msg
A set of predefined query parameters used to fetch a list of articles.