# This file is part of Koha.
#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use Business::ISBN;
use C4::Koha;
+=head1 NAME
+
+C4::SocialData - Koha functions for dealing with social datas
+For now used by babeltheque, a french company providing, for books, comments, upload of videos, scoring (star)...
+the social_data table could be used and improved by other provides.
+
+=head1 SYNOPSIS
+
+use C4::SocialData;
+
+=head1 DESCRIPTION
+
+The functions in this module deal with social datas
+
+=head1 FUNCTIONS
+
=head2 get_data
Get social data from a biblio
score_avg = average score
num_scores = number of score
=cut
+
sub get_data {
my ( $isbn ) = @_;
my $dbh = C4::Context->dbh;
return $results;
}
-=head 2
+=head2 update_data
Update Social data
data order : isbn ; active ; critics number , critics pro number ; quotations number ; videos number ; average score ; scores number
=cut
+
sub update_data {
my ( $output_filepath ) = @_;
say "$i data insered or updated";
}
-=head 2
+=head2 get_report
Get social data report
=cut
+
sub get_report {
my $dbh = C4::Context->dbh;