local avandu = require 'avandu'
avandu.ttrss_url = "https://ryuslash.org/tt-rss/api/"
local status, level, err = pcall(avandu.get_api_level)
if status then
if level then
print("Your instance runs API level " .. level)
else
print("An error occurred: " .. err.message)
end
else
print("An exception occurred: " .. level)
end
local status, count, err = pcall(avandu.unread)
if status then
if count then
print(count .. " unread article(s)")
else
print("An error occurred: " .. err.message)
end
else
print("An exception occurred: " .. count)
end