[{"name":"ForemApi","comment":" This module contains shared functions to call Forem Api\n\n\n# Definition\n\n@docs Config\n\n","unions":[],"aliases":[{"name":"Config","comment":" Shared config for all API calls\n\n    Config\n        \"https://dev.to\"\n        [ Http.header \"accept\" \"application/vnd.forem.api-v1+json\" ]\n\n","args":[],"type":"{ baseUrl : String.String, headers : List.List Http.Header }"}],"values":[],"binops":[]},{"name":"ForemApi.Article","comment":" This module allows you to make API calls to fetch an article and decode it into an Elm records.\n\n\n# Definition\n\n@docs Article\n\n\n# API calls\n\n@docs fetch, fetchBySlug\n\n\n# Decoders\n\n@docs articleDecoder\n\n","unions":[],"aliases":[{"name":"Article","comment":" Representation of an Article record from Forem API. All functions in this module should return an Article record.\n","args":[],"type":"{ typeOf : String.String, id : Basics.Int, title : String.String, slug : String.String, socialImage : String.String, description : String.String, readingTimeMinutes : Basics.Int, publishedAt : Time.Posix, user : ForemApi.User.User, bodyMarkdown : Maybe.Maybe String.String, bodyHtml : Maybe.Maybe String.String, tags : List.List String.String, url : String.String, canonicalUrl : String.String }"}],"values":[{"name":"articleDecoder","comment":" Decoder to decode article data from Forem Api into an Article record.\n","type":"Json.Decode.Decoder ForemApi.Article.Article"},{"name":"fetch","comment":" Fetch an article by article's ID.\n\n    foremApiConfig : ForemApi.Config\n    foremApiConfig =\n        ForemApi.Config\n            \"https://dev.to\"\n            [ Http.header \"accept\" \"application/vnd.forem.api-v1+json\" ]\n\n    cmd : Cmd msg\n    cmd =\n        ForemApi.Article.fetch foremApiConfig 1208487 msg\n\n","type":"ForemApi.Config -> Basics.Int -> (Result.Result Http.Error ForemApi.Article.Article -> msg) -> Platform.Cmd.Cmd msg"},{"name":"fetchBySlug","comment":" Fetch an article using author's username and article's unique slug.\n\n    foremApiConfig : ForemApi.Config\n    foremApiConfig =\n        ForemApi.Config\n            \"https://dev.to\"\n            [ Http.header \"accept\" \"application/vnd.forem.api-v1+json\" ]\n\n    cmd : Cmd msg\n    cmd =\n        ForemApi.Article.fetchBySlug foremApiConfig \"no_81\" \"1st-post-2a1\" msg\n\n","type":"ForemApi.Config -> String.String -> String.String -> (Result.Result Http.Error ForemApi.Article.Article -> msg) -> Platform.Cmd.Cmd msg"}],"binops":[]},{"name":"ForemApi.Articles","comment":" This module allows you to make API calls to fetch a list of articles and decode it into an Elm records.\n\n\n# Definition\n\n@docs QueryParameters\n\n\n# Helper functions\n\n@docs blankQueryParameters\n\n\n# API calls\n\n@docs fetch\n\n","unions":[],"aliases":[{"name":"QueryParameters","comment":" A set of predefined query parameters used to fetch a list of articles.\n","args":[],"type":"{ username : Maybe.Maybe String.String, page : Maybe.Maybe Basics.Int, perPage : Maybe.Maybe Basics.Int, tag : Maybe.Maybe String.String, tags : Maybe.Maybe (List.List String.String), tagsExclude : Maybe.Maybe (List.List String.String) }"}],"values":[{"name":"blankQueryParameters","comment":" Helper method to generate a blank set of QueryParameters\n","type":"ForemApi.Articles.QueryParameters"},{"name":"fetch","comment":" Fetch a list of articles using a set of predefined filters represented by query parameters.\n\n    foremApiConfig : ForemApi.Config\n    foremApiConfig =\n        ForemApi.Config\n            \"https://dev.to\"\n            [ Http.header \"accept\" \"application/vnd.forem.api-v1+json\" ]\n\n    queryParameters : QueryParamters\n    queryParameters =\n        blankQueryParamters\n\n    cmd : Cmd msg\n    cmd =\n        ForemApi.Articles.fetch\n            foremApiConfig\n            { queryParameters | tag = \"elm\" }\n            msg\n\n","type":"ForemApi.Config -> ForemApi.Articles.QueryParameters -> (Result.Result Http.Error (List.List ForemApi.Article.Article) -> msg) -> Platform.Cmd.Cmd msg"}],"binops":[]},{"name":"ForemApi.User","comment":" This module allows you decode user data into an Elm records.\n\n\n# Definition\n\n@docs User\n\n\n# Decoders\n\n@docs userDecoder\n\n","unions":[],"aliases":[{"name":"User","comment":" Representation of an User record from Forem API.\n","args":[],"type":"{ userId : Basics.Int, username : String.String, name : String.String, twitterUsername : Maybe.Maybe String.String, githubUsername : Maybe.Maybe String.String, websiteUrl : Maybe.Maybe String.String, profileImage : Maybe.Maybe String.String, profileImage90 : Maybe.Maybe String.String }"}],"values":[{"name":"userDecoder","comment":" Decoder to decode user data from Forem Api into a User record.\n","type":"Json.Decode.Decoder ForemApi.User.User"}],"binops":[]}]