NAME
FR24::Bot - Subroutines for FR24-Bot
VERSION
version 0.0.3
SYNOPSIS
use FR24::Bot;
my $bot = FR24::Bot->new(
-conf => "config.json",
-name => "bot_1"
);
$bot->update();
DESCRIPTION
The FR24::Bot module provides an interface for managing and updating a FR24 Bot, which is designed to interact with flight data from the FR24 API.
CLASS METHODS
new
The new method is the constructor for the FR24::Bot object. It expects a hash with -conf
and -name
keys, or it will throw an exception.
my $bot = FR24::Bot->new(
-conf => "config.json",
-name => "bot_1"
);
Here, the -conf
key is a configuration file or a hashref with configuration information.
The -name
key is a string with the name of the bot.
INSTANCE METHODS
update
The update method fetches the latest flight data from the FR24 API and updates the FR24::Bot object.
This method should be called periodically to keep the bot's data up to date.
$bot->update();
This method does not take any arguments, and does not return any value.
Will not execute if the last update was less than 10 seconds ago.
AUTHOR
Andrea Telatin <proch@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023 by Andrea Telatin.
This is free software, licensed under:
The MIT (X11) License