WebService::SendInBlue - Perl API for https://www.sendinblue.com/ REST API
my $api = WebService::SendInBlue->new('api_key'=>'API_KEY') my $campaigns_list = $a->campaigns(); unless ( $campaigns_list->is_success ) { die "Error getting campaigns: } for my $campaign ( @{ $campaigns_list->data()->{'campaign_records'} ) { ... do something for each campaign }
This module provides a simple API to the SendInBlue API.
The API reference can be found here: https://apidocs.sendinblue.com/
You will need to register and set up your account with SendInBlue, you'll need an API key to use this module.
This is the constructor for a new WebService::SendInBlue object. The app_key is required.
app_key
Retrieves lists information.
Supported parameters: https://apidocs.sendinblue.com/list/#1
Retrieves details of all users for the given lists. lists_ids is mandatory.
lists_ids
Retrieves details of all campaigns.
Supported parameters: https://apidocs.sendinblue.com/campaign/#1
Retrieve details of any particular campaign. $campaign_id is mandatory.
Export the recipients of a specified campaign. It returns the background process ID which on completion calls the notify URL that you have set in the input. $campaign_id, $notify_url and $type are mandatory.
Supported parameters: https://apidocs.sendinblue.com/campaign/#6
Exports the recipients of a specified campaign and returns the remote url of the export result file. This method calls the campaign_recipients, waits for the export job completion, and retrieves the url of the export file. The file url is returned in the response data 'url' attribute
Example:
my $result = $api->campaign_recipients_file_url($campaign_id, 'all'); my $file_url = $result->data->{'url'};
Retrieves reports for the SendinBlue SMTP account
Supported parameters: https://apidocs.sendinblue.com/statistics/
For information about the SendInBlue API: https://apidocs.sendinblue.com
To sign up for an account: https://www.sendinblue.com/
Copyright (C) 2016 Bruno Tavares. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bruno Tavares <eu@brunotavares.net>
To install WebService::SendInBlue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::SendInBlue
CPAN shell
perl -MCPAN -e shell install WebService::SendInBlue
For more information on module installation, please visit the detailed CPAN module installation guide.