NAME
App::Photobear - Photobear API client
VERSION
version 0.1.2
SYNOPSIS
use App::Photobear;
# Load configuration from file
my $config = App::Photobear::loadconfig($config_file);
# Save configuration to file
App::Photobear::saveconfig($config_file, $config);
# Check if a URL exists
my $url_exists = App::Photobear::url_exists($url);
# Get the content of a URL
my $content = App::Photobear::curl($url);
# Perform Photobear API request
my $result = App::Photobear::photobear($api_key, $mode, $url);
# Download a file from a URL
my $success = App::Photobear::download($url, $destination);
DESCRIPTION
App::Photobear is a Perl module that provides a client for the Photobear API. It includes functions to load and save configuration, check if a URL exists, perform API requests, and download files from URLs.
This script is meant to be used as a command-line tool, check photobear for more information.
FUNCTIONS
loadconfig($filename)
Load configuration from the specified file. Returns a hash reference containing the configuration.
saveconfig($filename, $config)
Save the configuration to the specified file.
url_exists($url)
Check if the specified URL exists. Returns a boolean value indicating whether the URL exists or not.
curl($url)
Retrieve the content of the specified URL. Returns the content as a string.
photobear($api_key, $mode, $url)
Perform a request to the Photobear API with the given API key, mode, and URL. Returns the result as a hash reference.
download($url, $destination)
Download a file from the specified URL to the given destination path. Returns a boolean value indicating the success of the download operation.
VARIABLES
@MODES
An array containing the supported modes for the Photobear API requests.
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