Get a public user profile payload
curl --request GET \
--url https://punchplay.tv/api/public/v1/users/{username}import requests
url = "https://punchplay.tv/api/public/v1/users/{username}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://punchplay.tv/api/public/v1/users/{username}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://punchplay.tv/api/public/v1/users/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://punchplay.tv/api/public/v1/users/{username}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://punchplay.tv/api/public/v1/users/{username}")
.asString();require 'uri'
require 'net/http'
url = URI("https://punchplay.tv/api/public/v1/users/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": "v1",
"profile": {
"avatarUrl": "<string>",
"bio": "<string>",
"displayName": "<string>",
"donationCount": 123,
"isDonor": true,
"isOnline": true,
"isSubscriber": true,
"memberSince": "2023-11-07T05:31:56Z",
"username": "<string>",
"xp": 123
},
"stats": {
"watched": 123,
"topGenre": "<string>",
"tv": {
"totalMinutes": 123,
"plays": 123,
"unique": 123,
"episodes": 123,
"shows": 123
},
"movies": {
"totalMinutes": 123,
"plays": 123,
"unique": 123
},
"genreCounts": {}
},
"recentWatchHistory": [
{}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Public Users
Get a public user profile payload
GET
/
api
/
public
/
v1
/
users
/
{username}
Get a public user profile payload
curl --request GET \
--url https://punchplay.tv/api/public/v1/users/{username}import requests
url = "https://punchplay.tv/api/public/v1/users/{username}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://punchplay.tv/api/public/v1/users/{username}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://punchplay.tv/api/public/v1/users/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://punchplay.tv/api/public/v1/users/{username}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://punchplay.tv/api/public/v1/users/{username}")
.asString();require 'uri'
require 'net/http'
url = URI("https://punchplay.tv/api/public/v1/users/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": "v1",
"profile": {
"avatarUrl": "<string>",
"bio": "<string>",
"displayName": "<string>",
"donationCount": 123,
"isDonor": true,
"isOnline": true,
"isSubscriber": true,
"memberSince": "2023-11-07T05:31:56Z",
"username": "<string>",
"xp": 123
},
"stats": {
"watched": 123,
"topGenre": "<string>",
"tv": {
"totalMinutes": 123,
"plays": 123,
"unique": 123,
"episodes": 123,
"shows": 123
},
"movies": {
"totalMinutes": 123,
"plays": 123,
"unique": 123
},
"genreCounts": {}
},
"recentWatchHistory": [
{}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Path Parameters
Query Parameters
Required range:
1 <= x <= 20⌘I