#!/usr/bin/perl

use strict;
use warnings;

my $token = $ARGV[0];
chomp $token;

my $url = "https://git.spwbk.site/api/v1/";

sub create_repo {
my $name = shift;

my $endpoint = "/user/repos";

my $curl_string = "curl -H \'Content-Type: application/json\' -X POST -d \'{\"name\": \"$name\", \"description\": \"$name\", \"private\": false}\' https://git.spwbk.site/api/v1/user/repos?token=$token";

print("$curl_string\n");
system($curl_string) == 0 or die "CURL ERROR with $name\n";

}


create_repo($ARGV[1]);