[{"name":"ApiRoute","comment":" ApiRoute's are defined in `src/Api.elm` and are a way to generate files, like RSS feeds, sitemaps, or any text-based file that you output with an Elm function! You get access\nto a DataSource so you can pull in HTTP data, etc. Because ApiRoutes don't hydrate into Elm apps (like pages in elm-pages do), you can pull in as much data as you want in\nthe DataSource for your ApiRoutes, and it won't effect the payload size. Instead, the size of an ApiRoute is just the content you output for that route.\n\nIn a future release, ApiRoutes may be able to run at request-time in a serverless function, allowing you to use pure Elm code to create dynamic APIs, and even pulling in data from\nDataSources dynamically.\n\n@docs ApiRoute, ApiRouteBuilder, Response, buildTimeRoutes, capture, int, literal, single, slash, succeed, getBuildTimeRoutes\n\n","unions":[],"aliases":[{"name":"ApiRoute","comment":" ","args":["response"],"type":"Internal.ApiRoute.ApiRoute response"},{"name":"ApiRouteBuilder","comment":" ","args":["a","constructor"],"type":"Internal.ApiRoute.ApiRouteBuilder a constructor"},{"name":"Response","comment":" ","args":[],"type":"{ body : String.String }"}],"values":[{"name":"buildTimeRoutes","comment":" ","type":"(constructor -> DataSource.DataSource (List.List (List.List String.String))) -> ApiRoute.ApiRouteBuilder (DataSource.DataSource ApiRoute.Response) constructor -> ApiRoute.ApiRoute ApiRoute.Response"},{"name":"capture","comment":" ","type":"ApiRoute.ApiRouteBuilder (String.String -> a) constructor -> ApiRoute.ApiRouteBuilder a (String.String -> constructor)"},{"name":"getBuildTimeRoutes","comment":" For internal use by generated code. Not so useful in user-land.\n","type":"ApiRoute.ApiRoute response -> DataSource.DataSource (List.List String.String)"},{"name":"int","comment":" ","type":"ApiRoute.ApiRouteBuilder (Basics.Int -> a) constructor -> ApiRoute.ApiRouteBuilder a (Basics.Int -> constructor)"},{"name":"literal","comment":" ","type":"String.String -> ApiRoute.ApiRouteBuilder a constructor -> ApiRoute.ApiRouteBuilder a constructor"},{"name":"single","comment":" ","type":"ApiRoute.ApiRouteBuilder (DataSource.DataSource ApiRoute.Response) (List.List String.String) -> ApiRoute.ApiRoute ApiRoute.Response"},{"name":"slash","comment":" ","type":"ApiRoute.ApiRouteBuilder a constructor -> ApiRoute.ApiRouteBuilder a constructor"},{"name":"succeed","comment":" ","type":"a -> ApiRoute.ApiRouteBuilder a (List.List String.String)"}],"binops":[]},{"name":"DataSource","comment":" In an `elm-pages` app, each page can define a value `data` which is a `DataSource` that will be resolved **before** `init` is called. That means it is also available\nwhen the page's HTML is pre-rendered during the build step. You can also access the resolved data in `head` to use it for the page's SEO meta tags.\n\nA `DataSource` lets you pull in data from:\n\n - Local files ([`DataSource.File`](DataSource-File))\n - HTTP requests ([`DataSource.Http`](DataSource-Http))\n - Globs, i.e. listing out local files based on a pattern like `content/*.txt` ([`DataSource.Glob`](DataSource-Glob))\n - Ports, i.e. getting JSON data from running custom NodeJS, similar to a port in a vanilla Elm app except run at build-time in NodeJS, rather than at run-time in the browser ([`DataSource.Port`](DataSource-Port))\n - Hardcoded data (`DataSource.succeed \"Hello!\"`)\n-Oranycombinationoftheabove,using`DataSource.map2`,`DataSource.andThen`,orothercombining/continuinghelpersfromthismodule\n\n\n##WhereDoesDataSourceDataComeFrom?\n\nDatafroma`DataSource`isresolvedwhenyouloadapageinthe`elm-pages`devserver,orwhenyourun`elm-pagesbuild`.\n\nBecause`elm-pages`hydratesintoafullElmsingle-pageapp,itdoesneedthedatainordertoinitializetheElmapp.\nSowhynotjustgetthedatatheold-fashionedway,with`elm/http`,forexample?\n\nAfewreasons:\n\n1.DataSource'sallowyoutopullindatathatyouwouldn'tnormallybeabletoaccessfromanElmapp,likelocalfiles,orlistingsoff