Site map api data lister?
Posted: Mon Oct 07, 2024 3:11 pm
Esto es para post lister
Cómo lo adapto para api data lister?
Code: Select all
local rss = [=[<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"> <channel> <title> xkria-uy - Free Download Latest Musics</title> <atom:link href="https://xkria-uy.wapka.co/rss.xml" rel="self" type="application/rss+xml"/>
<link>https://xkria-uy.wapka.co/</link>
<description>Free Download Latest Musics</description> <lastBuildDate>%s</lastBuildDate> <language>id-ID</language> <sy:updatePeriod>
hourly </sy:updatePeriod> <sy:updateFrequency>
1 </sy:updateFrequency>]=]
print(string.format(rss, os.date("%a, %d %b %Y %X +0000")))
local param_post = {
limit = 20,
order = "DESC" } local post_html = [=[ <item> <title>%title%</title> <link>https://xkria-uy.wapka.co/post/%id%/%title|url.slug%</link> <dc:creator>Admin</dc:creator>
<pubDate>%date%</pubDate> <category>%forumname%</category>
<description><p>%content%</p>
The post <a href="https://xkria-uy.wapka.co/post/%id%/%title|url.slug%">%title%</a> first appeared on <a href="https://xkria-uy.wapka.co/">XKRIA-UY</a>.</description>
<content:encoded><p>%content%</p>The post <a href="https:// your wapka site mane/post/%id%/%title|url.slug%">%title%</a> first appeared on <a href="https://xkria-uy.wapka.co/">XKRIA-UY</a>.</content:encoded> <slash:comments>0</slash:comments>
</item>
]=]
local is_ok, postlist = api.post_info(param_post)
print(html.render_tag(post_html, postlist, true));
print("</channel>")
print("</rss>")
Cómo lo adapto para api data lister?