ManiaAPI.TMX 2.0.0-beta3

This is a prerelease version of ManiaAPI.TMX.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ManiaAPI.TMX --version 2.0.0-beta3
                    
NuGet\Install-Package ManiaAPI.TMX -Version 2.0.0-beta3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ManiaAPI.TMX" Version="2.0.0-beta3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ManiaAPI.TMX" Version="2.0.0-beta3" />
                    
Directory.Packages.props
<PackageReference Include="ManiaAPI.TMX" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ManiaAPI.TMX --version 2.0.0-beta3
                    
#r "nuget: ManiaAPI.TMX, 2.0.0-beta3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=ManiaAPI.TMX&version=2.0.0-beta3&prerelease
                    
Install ManiaAPI.TMX as a Cake Addin
#tool nuget:?package=ManiaAPI.TMX&version=2.0.0-beta3&prerelease
                    
Install ManiaAPI.TMX as a Cake Tool

ManiaAPI.TMX

Wraps https://tm-exchange.com/ (old TMX).

Setup

using ManiaAPI.TMX;

// Pick one from TMUF, TMNF, Nations, Sunrise, Original
var tmx = new TMX(TmxSite.TMUF);

Get Replays

var replayCollection = await tmx.GetReplaysAsync(new()
{
    TrackId = 4808334,
    Count = 20
});

foreach (var item in replayCollection.Results)
{
    Console.WriteLine(item.ReplayTime);
})

Search Tracks

var trackCollection = await tmx.SearchTracksAsync(new()
{
    Name = "wirtual", // tracks that have wirtual in their name
    Count = 20
});

foreach (var item in trackCollection.Results)
{
    Console.WriteLine(item.TrackName);
})

Search Leaderboards

var leaderboardCollection = await tmx.SearchLeaderboardsAsync(new()
{
    Count = 10
});

foreach (var item in leaderboardCollection.Results)
{
    Console.WriteLine(item.User.Name);
}

Search Trackpacks

var trackpackCollection = await tmx.SearchTrackpacksAsync(new()
{
    Count = 15
});

foreach (var item in trackpackCollection.Results)
{
    Console.WriteLine(item.PackName);
}

Search Users

var userCollection = await tmx.SearchUsersAsync(new()
{
    InModerators = true,
    Count = 10
});

foreach (var item in userCollection.Results)
{
    Console.WriteLine(item.Name);
}

Get Replay Gbx

Just the URL:

string url = tmx.GetReplayGbxUrl(replayId: 5032240);

Or request it:

using HttpResponseMessage response = await tmx.GetReplayGbxResponseAsync(replayId: 5032240);

Or use ManiaAPI.TMX.Extensions.Gbx package to load it into CGameCtnReplayRecord, either just the header or full Gbx:

using ManiaAPI.TMX.Extensions.Gbx;

// Just the header
Gbx<CGameCtnReplayRecord> gbxReplayHeader = await tmx.GetReplayGbxHeaderAsync(replayId: 5032240);

// Full Gbx
Gbx<CGameCtnReplayRecord> gbxReplay = await tmx.GetReplayGbxAsync(replayId: 5032240);

Get Track Gbx

Just the URL:

string url = tmx.GetTrackGbxUrl(trackId: 4808334);

Or request it:

using HttpResponseMessage response = await tmx.GetTrackGbxResponseAsync(trackId: 4808334);

Or use ManiaAPI.TMX.Extensions.Gbx package to load it into CGameCtnChallenge, either just the header or full Gbx:

using ManiaAPI.TMX.Extensions.Gbx;

// Just the header
Gbx<CGameCtnChallenge> gbxMapHeader = await tmx.GetTrackGbxHeaderAsync(trackId: 4808334);

// Full Gbx
Gbx<CGameCtnChallenge> gbxMap = await tmx.GetTrackGbxAsync(trackId: 4808334);

Get Track Thumbnail

Just the URL:

string url = tmx.GetTrackThumbnailUrl(trackId: 4808334);

Or request it:

using HttpResponseMessage response = await tmx.GetTrackThumbnailResponseAsync(trackId: 4808334);

Get Track Image

Just the URL:

string url = tmx.GetTrackImageUrl(trackId: 4808334, imageIndex: 0);

Or request it:

using HttpResponseMessage response = await tmx.GetTrackImageResponseAsync(trackId: 4808334, imageIndex: 0);
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ManiaAPI.TMX:

Package Downloads
ManiaAPI.TMX.Extensions.Gbx

Extension methods of TMX API for GBX.NET features. Part of the ManiaAPI.NET library set.

ManiaAPI.TMX.Extensions.Hosting

Extension methods of TMX API for ASP.NET Core. Part of the ManiaAPI.NET library set.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.0 42 4/6/2025
2.1.0 454 3/24/2025
2.0.0 151 3/23/2025
2.0.0-beta3 149 12/21/2024
2.0.0-alpha4 160 12/23/2023
2.0.0-alpha2 175 11/1/2023
2.0.0-alpha10 105 6/19/2024
2.0.0-alpha1 173 7/5/2023
1.0.10 242 3/6/2024
1.0.9 264 5/7/2023
1.0.8 438 8/30/2022
1.0.7 478 6/3/2022
1.0.6 448 6/3/2022
1.0.5 454 5/7/2022
1.0.4 438 5/7/2022
1.0.3 436 5/7/2022
1.0.2 466 4/12/2022
1.0.0 481 4/8/2022