Register

Make sure your application has been initialized before attempting to register.

Winforms
private async void UserRegister(object sender, RoutedEventArg e)
{
var registerResponse = await App.Register(tbUsername.Text, tbPassword.Text, tbToken.Text);
if(registerResponse.Error == false)
{
// Successfully registered
MessageBox.Show(registerResponse.Message, "FusionAPI.dev");
}
else
{
// Failed register
MessageBox.Show(registerResponse.Message, "FusionAPI.dev");
}
}
Console
static async void Main(string[] args)
{
Console.Title = "FusionAPI.dev";
Console.Write("Enter your username: ");
string username = Console.ReadLine();
Console.Write("Enter your password: ");
string password = Console.ReadLine();
Console.Write("Enter your token: ");
string token = Console.ReadLine();
var registerResponse = await App.Register(username, password, token);
if(registerResponse.Error == false)
{
// Successfully registered
MessageBox.Show(registerResponse.Message, "FusionAPI.dev");
}
else
{
// Failed register
MessageBox.Show(registerResponse.Message, "FusionAPI.dev");
}
}