<commit_before>#!/usr/bin/perl

package Soccermetrics::API::Client;

use strict;
use warnings;
use REST::Client;
use JSON;
use URI::Escape 'uri_escape';

our $VERSION = '0.5';
our $Debug = 0;

sub API_URL  { 'http://api-summary.soccermetrics.net' };
sub API_VERSION { 'v0' };

my %app_id = ();
my %app_key = ();
my %api_version = ();
my %client = ();

sub new {
    my $class = shift;
    my %args = @_;

    my $self = bless \(my $ref), $class;

    $app_id      {$self} = $args{ApplicationId} || $ENV{SOCCERMETRICS_APP_ID};
    $app_key     {$self} = $args{ApplicationKey} || $ENV{SOCCERMETRICS_APP_KEY};
    $api_version {$self} = $args{VERSION} || API_VERSION();

    return $self;
}

sub toList {
    my $data = shift;
    my $key = shift;
    if (ref($data->{$key}) eq 'ARRAY') {<commit_msg>Change base url to https<commit_after>#!/usr/bin/perl

package Soccermetrics::API::Client;

use strict;
use warnings;
use REST::Client;
use JSON;
use URI::Escape 'uri_escape';

our $VERSION = '0.5';
our $Debug = 0;

sub API_URL  { 'https://api-summary.soccermetrics.net' };
sub API_VERSION { 'v0' };

my %app_id = ();
my %app_key = ();
my %api_version = ();
my %client = ();

sub new {
    my $class = shift;
    my %args = @_;

    my $self = bless \(my $ref), $class;

    $app_id      {$self} = $args{ApplicationId} || $ENV{SOCCERMETRICS_APP_ID};
    $app_key     {$self} = $args{ApplicationKey} || $ENV{SOCCERMETRICS_APP_KEY};
    $api_version {$self} = $args{VERSION} || API_VERSION();

    return $self;
}

sub toList {
    my $data = shift;
    my $key = shift;
    if (ref($data->{$key}) eq 'ARRAY') {
{'fraction_non_alphanumeric': 0.18679950186799502, 'fraction_numerical': 0.0049813200498132005, 'mean_word_length': 3.578347578347578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2952359', 'n_tokens_mistral': 635, 'n_tokens_neox': 620, 'n_words': 150}