Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md: .Net version + example code #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### Version 2 Released! It includes some breaking changes, you can find the changelist [here](https://github.com/EvoTM/GbxRemote.Net/releases/tag/2.0.0).

A library for interacting with the [XML-RPC](http://xmlrpc.com/) protocol of [TrackMania](https://www.trackmania.com/) servers and similar titles built with [.NET 5](https://dotnet.microsoft.com/download). It is built using the [task async pattern (TAP)](https://docs.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap). It comes with pre-made methods for all the [documented XML-RPC methods](https://wiki.trackmania.io/en/dedicated-server/XML-RPC/Methods) provided by the trackmania server and allows you to easily hook into and react on callbacks. Interacting with [ModeScript](https://wiki.trackmania.io/en/dedicated-server/XML-RPC/Modescript-documentation) is also simplified through special features.
A library for interacting with the [XML-RPC](http://xmlrpc.com/) protocol of [TrackMania](https://www.trackmania.com/) servers and similar titles built with [.NET 8](https://dotnet.microsoft.com/download). It is built using the [task async pattern (TAP)](https://docs.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap). It comes with pre-made methods for all the [documented XML-RPC methods](https://wiki.trackmania.io/en/dedicated-server/XML-RPC/Methods) provided by the trackmania server and allows you to easily hook into and react on callbacks. Interacting with [ModeScript](https://wiki.trackmania.io/en/dedicated-server/XML-RPC/Modescript-documentation) is also simplified through special features.

# Quickstart
Install the library from [Nuget](https://www.nuget.org/packages/GbxRemote.Net): `dotnet add package GbxRemote.Net`
Expand All @@ -24,12 +24,15 @@ using GbxRemoteNet;
// create client instance
GbxRemoteClient client = new("127.0.0.1", 5000);

await client.ConnectAsync();

// connect and login
if (!await client.LoginAsync("SuperAdmin", "SuperAdmin"))
if (!await client.AuthenticateAsync("SuperAdmin", "SuperAdmin"))
{
Console.WriteLine("Failed to login.");
Console.WriteLine("Failed to auth.");
return;
}
await client.SetApiVersionAsync(GbxRemoteClient.DefaultApiVersion);

Console.WriteLine("Connected and authenticated!");

Expand Down