Module avandu

A module to connect and communicate with Tiny Tiny RSS.

Info:

  • Copyright: 2014 Tom Willemse
  • Release: 0.1.0
  • License: GPLv3
  • Author: Tom Willemse tom@ryuslash.org

Functions

login (user, password) Get a session ID from tt-rss by logging in.
set_logger (newlogger) Set the logger to use.
get_api_level () Get the API level number
unread () Get the number of unread articles.

Tables

Exception A class to hold data about error conditions.

Fields

ttrss_url The url where the Tiny Tiny RSS API resides.
session_id The session id that was fetched from Tiny Tiny RSS.


Functions

login (user, password)
Get a session ID from tt-rss by logging in. If succesfull, this function will return the generated session ID.

Parameters:

Returns:

    string or nil The generated session ID or nil

Or

  1. nil Indication that something went wrong
  2. Exception Infomation about what went wrong
set_logger (newlogger)
Set the logger to use.

Parameters:

  • newlogger The logger to use
get_api_level ()
Get the API level number

Returns:

    number The API level of the Tiny Tiny RSS instance, or 0 if the operation could not be called.

Or

  1. nil Indication that something went wrong
  2. Exception Information about what went wrong
unread ()
Get the number of unread articles. This function will try to log in if that hasn't happened yet.

Returns:

    number The number of unread articles, or -1 if there was an error

Or

  1. nil Indication that something went wrong
  2. Exception Information about what went wrong

Tables

Exception
A class to hold data about error conditions.

Fields:

  • message Description of the error
  • url The URL a request was sent to
  • code The HTTP status code of the response
  • status Description of the HTTP status code of the response

Fields

ttrss_url
The url where the Tiny Tiny RSS API resides. For example, this should be something like https://example.com/tt-rss/api/.
session_id
The session id that was fetched from Tiny Tiny RSS. Used after loggin-in to identify the user to Tiny Tiny RSS when makin API calls.
generated by LDoc 1.4.2