getCategory
Category detail
This endpoint includes all the basic information about the category shown on the webpage, except for past races. Current races are given in a summarised format, full race information must be retrieved individually.
/{category}/data
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://racetime.gg/{category}/data"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RacetimeApi;
import java.io.File;
import java.util.*;
public class RacetimeApiExample {
public static void main(String[] args) {
// Create an instance of the API class
RacetimeApi apiInstance = new RacetimeApi();
String category = ootr; // String | the category slug
try {
Category result = apiInstance.getCategory(category);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RacetimeApi#getCategory");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.RacetimeApi;
public class RacetimeApiExample {
public static void main(String[] args) {
RacetimeApi apiInstance = new RacetimeApi();
String category = ootr; // String | the category slug
try {
Category result = apiInstance.getCategory(category);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RacetimeApi#getCategory");
e.printStackTrace();
}
}
}
// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *category = ootr; // the category slug (default to null)
// Category detail
[apiInstance getCategoryWith:category
completionHandler: ^(Category output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var RacetimeGgApi = require('racetime_gg_api');
// Create an instance of the API class
var api = new RacetimeGgApi.RacetimeApi()
var category = ootr; // {String} the category slug
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getCategory(category, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class getCategoryExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new RacetimeApi();
var category = ootr; // String | the category slug (default to null)
try {
// Category detail
Category result = apiInstance.getCategory(category);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling RacetimeApi.getCategory: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RacetimeApi();
$category = ootr; // String | the category slug
try {
$result = $api_instance->getCategory($category);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RacetimeApi->getCategory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RacetimeApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RacetimeApi->new();
my $category = ootr; # String | the category slug
eval {
my $result = $api_instance->getCategory(category => $category);
print Dumper($result);
};
if ($@) {
warn "Exception when calling RacetimeApi->getCategory: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.RacetimeApi()
category = ootr # String | the category slug (default to null)
try:
# Category detail
api_response = api_instance.get_category(category)
pprint(api_response)
except ApiException as e:
print("Exception when calling RacetimeApi->getCategory: %s\n" % e)
extern crate RacetimeApi;
pub fn main() {
let category = ootr; // String
let mut context = RacetimeApi::Context::default();
let result = client.getCategory(category, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| category* |
String
the category slug
Required
|
Responses
| Name | Type | Format | Description |
|---|---|---|---|
| XMinusExactMinusDate | Date | date-time |