Racetime.gg API

Racetime

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

Path parameters
Name Description
category*
String
the category slug
Required

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getLeaderboards

Category leaderboards

Provides category leaderboard data


/{category}/leaderboards/data

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/{category}/leaderboards/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 {
            Leaderboards result = apiInstance.getLeaderboards(category);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getLeaderboards");
            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 {
            Leaderboards result = apiInstance.getLeaderboards(category);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getLeaderboards");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *category = ootr; // the category slug (default to null)

// Category leaderboards
[apiInstance getLeaderboardsWith:category
              completionHandler: ^(Leaderboards 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.getLeaderboards(category, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getLeaderboardsExample
    {
        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 leaderboards
                Leaderboards result = apiInstance.getLeaderboards(category);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getLeaderboards: " + 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->getLeaderboards($category);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getLeaderboards: ', $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->getLeaderboards(category => $category);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getLeaderboards: $@\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 leaderboards
    api_response = api_instance.get_leaderboards(category)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getLeaderboards: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {
    let category = ootr; // String

    let mut context = RacetimeApi::Context::default();
    let result = client.getLeaderboards(category, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
category*
String
the category slug
Required

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getPastRacesByCategory

Past category races

Returns a list of all completed (finished and cancelled) races in a category. This list is paginated, and sorted by each race's completion time (the ended_at field), most recent first. 10 races are returned per page. By default each race has the same data as the all races endpoint, excluding the `category` field. If you enable `show_entrants`, the races will additionally list entrant data in the same format used by the race detail endpoint.


/{category}/races/data

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/{category}/races/data?show_entrants=&page="
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
        Boolean showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
        Integer page = 2; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data
        
        try {
            RacePagination result = apiInstance.getPastRacesByCategory(category, showEntrants, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getPastRacesByCategory");
            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
        Boolean showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
        Integer page = 2; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data
        
        try {
            RacePagination result = apiInstance.getPastRacesByCategory(category, showEntrants, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getPastRacesByCategory");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *category = ootr; // the category slug (default to null)
Boolean *showEntrants = true; // If set to true, include entrant data for each race returned (optional) (default to null)
Integer *page = 2; // Set to a positive integer (starting from 1) to retrieve paginated data (optional) (default to null)

// Past category races
[apiInstance getPastRacesByCategoryWith:category
    showEntrants:showEntrants
    page:page
              completionHandler: ^(RacePagination 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 opts = {
  'showEntrants': true, // {Boolean} If set to true, include entrant data for each race returned
  'page': 2 // {Integer} Set to a positive integer (starting from 1) to retrieve paginated data
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPastRacesByCategory(category, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPastRacesByCategoryExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new RacetimeApi();
            var category = ootr;  // String | the category slug (default to null)
            var showEntrants = true;  // Boolean | If set to true, include entrant data for each race returned (optional)  (default to null)
            var page = 2;  // Integer | Set to a positive integer (starting from 1) to retrieve paginated data (optional)  (default to null)

            try {
                // Past category races
                RacePagination result = apiInstance.getPastRacesByCategory(category, showEntrants, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getPastRacesByCategory: " + 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
$showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
$page = 2; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data

try {
    $result = $api_instance->getPastRacesByCategory($category, $showEntrants, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getPastRacesByCategory: ', $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
my $showEntrants = true; # Boolean | If set to true, include entrant data for each race returned
my $page = 2; # Integer | Set to a positive integer (starting from 1) to retrieve paginated data

eval { 
    my $result = $api_instance->getPastRacesByCategory(category => $category, showEntrants => $showEntrants, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getPastRacesByCategory: $@\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)
showEntrants = true # Boolean | If set to true, include entrant data for each race returned (optional) (default to null)
page = 2 # Integer | Set to a positive integer (starting from 1) to retrieve paginated data (optional) (default to null)

try: 
    # Past category races
    api_response = api_instance.get_past_races_by_category(category, showEntrants=showEntrants, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getPastRacesByCategory: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {
    let category = ootr; // String
    let showEntrants = true; // Boolean
    let page = 2; // Integer

    let mut context = RacetimeApi::Context::default();
    let result = client.getPastRacesByCategory(category, showEntrants, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
category*
String
the category slug
Required
Query parameters
Name Description
show_entrants
Boolean
If set to true, include entrant data for each race returned
page
Integer
Set to a positive integer (starting from 1) to retrieve paginated data

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getPastRacesByUser

Past user races

Returns a list of all finished (but not cancelled) races that a user has entered. This list is paginated, and sorted by each race's completion time (the `ended_at` field), most recent first. 10 races are returned per page. This endpoint behaves similarly to the past category races endpoint. Each race has the same data as the all races endpoint, unless you enable `show_entrants`. If enabled, the races will additionally list entrant data in the same format used by the race detail endpoint.


/user/{user}/races/data

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/user/{user}/races/data?show_entrants=&page="
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 user = b8GPMWwQpY31nEk0; // String | The unique identifier for the user returned by the user search endpoint
        Boolean showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
        Integer page = 1; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data
        
        try {
            RacePagination result = apiInstance.getPastRacesByUser(user, showEntrants, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getPastRacesByUser");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.RacetimeApi;

public class RacetimeApiExample {
    public static void main(String[] args) {
        RacetimeApi apiInstance = new RacetimeApi();
        String user = b8GPMWwQpY31nEk0; // String | The unique identifier for the user returned by the user search endpoint
        Boolean showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
        Integer page = 1; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data
        
        try {
            RacePagination result = apiInstance.getPastRacesByUser(user, showEntrants, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getPastRacesByUser");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *user = b8GPMWwQpY31nEk0; // The unique identifier for the user returned by the user search endpoint (default to null)
Boolean *showEntrants = true; // If set to true, include entrant data for each race returned (optional) (default to null)
Integer *page = 1; // Set to a positive integer (starting from 1) to retrieve paginated data (optional) (default to null)

// Past user races
[apiInstance getPastRacesByUserWith:user
    showEntrants:showEntrants
    page:page
              completionHandler: ^(RacePagination 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 user = b8GPMWwQpY31nEk0; // {String} The unique identifier for the user returned by the user search endpoint
var opts = {
  'showEntrants': true, // {Boolean} If set to true, include entrant data for each race returned
  'page': 1 // {Integer} Set to a positive integer (starting from 1) to retrieve paginated data
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPastRacesByUser(user, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPastRacesByUserExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new RacetimeApi();
            var user = b8GPMWwQpY31nEk0;  // String | The unique identifier for the user returned by the user search endpoint (default to null)
            var showEntrants = true;  // Boolean | If set to true, include entrant data for each race returned (optional)  (default to null)
            var page = 1;  // Integer | Set to a positive integer (starting from 1) to retrieve paginated data (optional)  (default to null)

            try {
                // Past user races
                RacePagination result = apiInstance.getPastRacesByUser(user, showEntrants, page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getPastRacesByUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RacetimeApi();
$user = b8GPMWwQpY31nEk0; // String | The unique identifier for the user returned by the user search endpoint
$showEntrants = true; // Boolean | If set to true, include entrant data for each race returned
$page = 1; // Integer | Set to a positive integer (starting from 1) to retrieve paginated data

try {
    $result = $api_instance->getPastRacesByUser($user, $showEntrants, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getPastRacesByUser: ', $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 $user = b8GPMWwQpY31nEk0; # String | The unique identifier for the user returned by the user search endpoint
my $showEntrants = true; # Boolean | If set to true, include entrant data for each race returned
my $page = 1; # Integer | Set to a positive integer (starting from 1) to retrieve paginated data

eval { 
    my $result = $api_instance->getPastRacesByUser(user => $user, showEntrants => $showEntrants, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getPastRacesByUser: $@\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()
user = b8GPMWwQpY31nEk0 # String | The unique identifier for the user returned by the user search endpoint (default to null)
showEntrants = true # Boolean | If set to true, include entrant data for each race returned (optional) (default to null)
page = 1 # Integer | Set to a positive integer (starting from 1) to retrieve paginated data (optional) (default to null)

try: 
    # Past user races
    api_response = api_instance.get_past_races_by_user(user, showEntrants=showEntrants, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getPastRacesByUser: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {
    let user = b8GPMWwQpY31nEk0; // String
    let showEntrants = true; // Boolean
    let page = 1; // Integer

    let mut context = RacetimeApi::Context::default();
    let result = client.getPastRacesByUser(user, showEntrants, page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
user*
String
The unique identifier for the user returned by the user search endpoint
Required
Query parameters
Name Description
show_entrants
Boolean
If set to true, include entrant data for each race returned
page
Integer
Set to a positive integer (starting from 1) to retrieve paginated data

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getRaceDetails

Race detail

This endpoint covers everything you might want to know about a race. All the data shown on the race page, except for chat messages, is provided. A full breakdown of entrants is also here, which is sorted by race status and finish position, as appropriate. **Note:** For races in progress, the timer is not part of the API response, since the API is cached it would be impossible to update this in real-time. To work out the timer, you should use the value of `started_at` (and the `X-Exact-Date` header to account for clock sync inaccuracy - see above) and `ended_at` (if the race has concluded).


/{category}/{race}/data

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/{category}/{race}/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
        String race = jolly-twinrova-3940; // String | the race room identifier
        
        try {
            Race result = apiInstance.getRaceDetails(category, race);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getRaceDetails");
            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
        String race = jolly-twinrova-3940; // String | the race room identifier
        
        try {
            Race result = apiInstance.getRaceDetails(category, race);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getRaceDetails");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *category = ootr; // the category slug (default to null)
String *race = jolly-twinrova-3940; // the race room identifier (default to null)

// Race detail
[apiInstance getRaceDetailsWith:category
    race:race
              completionHandler: ^(Race 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 race = jolly-twinrova-3940; // {String} the race room identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRaceDetails(category, race, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getRaceDetailsExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new RacetimeApi();
            var category = ootr;  // String | the category slug (default to null)
            var race = jolly-twinrova-3940;  // String | the race room identifier (default to null)

            try {
                // Race detail
                Race result = apiInstance.getRaceDetails(category, race);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getRaceDetails: " + 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
$race = jolly-twinrova-3940; // String | the race room identifier

try {
    $result = $api_instance->getRaceDetails($category, $race);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getRaceDetails: ', $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
my $race = jolly-twinrova-3940; # String | the race room identifier

eval { 
    my $result = $api_instance->getRaceDetails(category => $category, race => $race);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getRaceDetails: $@\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)
race = jolly-twinrova-3940 # String | the race room identifier (default to null)

try: 
    # Race detail
    api_response = api_instance.get_race_details(category, race)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getRaceDetails: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {
    let category = ootr; // String
    let race = jolly-twinrova-3940; // String

    let mut context = RacetimeApi::Context::default();
    let result = client.getRaceDetails(category, race, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
category*
String
the category slug
Required
race*
String
the race room identifier
Required

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getRaces

All races

Returns a list of all open and ongoing races **OpenAPI Note:** This endpoint does **not** include an `entrants` field in its response. Some documentation generated from this specification may erroneously state that it includes this field because of similar responses from other endpoints that include `entrants`.


/races/data

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/races/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();
        
        try {
            Races result = apiInstance.getRaces();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getRaces");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.RacetimeApi;

public class RacetimeApiExample {
    public static void main(String[] args) {
        RacetimeApi apiInstance = new RacetimeApi();
        
        try {
            Races result = apiInstance.getRaces();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getRaces");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];

// All races
[apiInstance getRacesWithCompletionHandler: 
              ^(Races 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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRaces(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getRacesExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new RacetimeApi();

            try {
                // All races
                Races result = apiInstance.getRaces();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getRaces: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RacetimeApi();

try {
    $result = $api_instance->getRaces();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getRaces: ', $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();

eval { 
    my $result = $api_instance->getRaces();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getRaces: $@\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()

try: 
    # All races
    api_response = api_instance.get_races()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getRaces: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {

    let mut context = RacetimeApi::Context::default();
    let result = client.getRaces(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time

getUsers

User search

Searches for registered users


/user/search

Usage and SDK Samples

curl -X GET\
 -H "Accept: application/json"\
 "https://racetime.gg/user/search?name=&scrim=&term="
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 name = sg4e; // String | Match users whose name starts with the given string (case insensitive)
        String scrim = 4461; // String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
        String term = sg4e#4461; // String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.
        
        try {
            Users result = apiInstance.getUsers(name, scrim, term);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getUsers");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.RacetimeApi;

public class RacetimeApiExample {
    public static void main(String[] args) {
        RacetimeApi apiInstance = new RacetimeApi();
        String name = sg4e; // String | Match users whose name starts with the given string (case insensitive)
        String scrim = 4461; // String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
        String term = sg4e#4461; // String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.
        
        try {
            Users result = apiInstance.getUsers(name, scrim, term);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RacetimeApi#getUsers");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
RacetimeApi *apiInstance = [[RacetimeApi alloc] init];
String *name = sg4e; // Match users whose name starts with the given string (case insensitive) (optional) (default to null)
String *scrim = 4461; // Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only. (optional) (default to null)
String *term = sg4e#4461; // Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data. (optional) (default to null)

// User search
[apiInstance getUsersWith:name
    scrim:scrim
    term:term
              completionHandler: ^(Users 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 opts = {
  'name': sg4e, // {String} Match users whose name starts with the given string (case insensitive)
  'scrim': 4461, // {String} Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
  'term': sg4e#4461 // {String} Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUsers(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getUsersExample
    {
        public void main()
        {
            
            // Create an instance of the API class
            var apiInstance = new RacetimeApi();
            var name = sg4e;  // String | Match users whose name starts with the given string (case insensitive) (optional)  (default to null)
            var scrim = 4461;  // String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only. (optional)  (default to null)
            var term = sg4e#4461;  // String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data. (optional)  (default to null)

            try {
                // User search
                Users result = apiInstance.getUsers(name, scrim, term);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RacetimeApi.getUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RacetimeApi();
$name = sg4e; // String | Match users whose name starts with the given string (case insensitive)
$scrim = 4461; // String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
$term = sg4e#4461; // String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.

try {
    $result = $api_instance->getUsers($name, $scrim, $term);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RacetimeApi->getUsers: ', $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 $name = sg4e; # String | Match users whose name starts with the given string (case insensitive)
my $scrim = 4461; # String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
my $term = sg4e#4461; # String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.

eval { 
    my $result = $api_instance->getUsers(name => $name, scrim => $scrim, term => $term);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RacetimeApi->getUsers: $@\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()
name = sg4e # String | Match users whose name starts with the given string (case insensitive) (optional) (default to null)
scrim = 4461 # String | Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only. (optional) (default to null)
term = sg4e#4461 # String | Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data. (optional) (default to null)

try: 
    # User search
    api_response = api_instance.get_users(name=name, scrim=scrim, term=term)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RacetimeApi->getUsers: %s\n" % e)
extern crate RacetimeApi;

pub fn main() {
    let name = sg4e; // String
    let scrim = 4461; // String
    let term = sg4e#4461; // String

    let mut context = RacetimeApi::Context::default();
    let result = client.getUsers(name, scrim, term, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
name
String
Match users whose name starts with the given string (case insensitive)
scrim
String
Match users with the given discriminator string (should be a set of four digits, e.g. '0844'). Exact match only.
term
String
Can be a name, partial name, or a name and discriminator (given in the form 'Name#1234'). Match users with the given data.

Responses

Name Type Format Description
XMinusExactMinusDate Date date-time