Code Samples

Curl

curl https://api.natstat.com/v1/team/?token=XXXX-XXXXXX&level=NBA

Perl

use strict;
use warnings;
use Mojo::UserAgent;
use Data::Dumper;
my $url = "https://api.natstat.com/v1/team/?token=XXXX-XXXXXX&level=NBA";
print Dumper(Mojo::UserAgent->new->get($url)->result->json);

PHP

<?php
$url = 'https://api.natstat.com/v1/team/?key=XXXX-XXXXXX&level=NBA';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
print_r(json_decode($data));
?>

Python

import requests
url = "https://api.natstat.com/v1/team/?key=XXXX-XXXXXX&level=NBA"
print(requests.get(url).json())