The news as JSON, mounted with tayori_api/2 (imported with
Tayori.Router). See Tayori.API for the routes, and the
Any frontend guide.
Mount it behind a pipeline that accepts JSON and has the app's session,
so that the resolver finds the app's user in the conn's assigns. For
the :embed feature, mount it again, behind a pipeline with no session
(see Tayori.Embed). For the changes that CI and GitHub send
(Tayori.Ingest, Tayori.GitHub), mount it again behind a pipeline
with no session and no CSRF protection (see the
Automation guide).
Summary
Functions
Mounts Tayori.Router.API at path in a host router.
Functions
Mounts Tayori.Router.API at path in a host router.
import Tayori.Router.API
scope "/" do
pipe_through :browser
tayori_api "/tayori"
endOptions
:resolver(atom/0) - Required. The app'sTayori.Resolver, which reads the reader from the conn.:page(String.t/0) - The path or address of the public page, for theurlof each entry. By default, thetayori_pageof the same router.
Every mount also takes the options listed in PhoenixMountable, such as
:as, :on_mount and :csp_nonce_assign_key.