Generate client with open-api-generator ()

* Generate project with open-api-generator

* Add example project

* Create wrapper class
This commit is contained in:
2025-05-26 21:40:46 -03:00
committed by GitHub
parent 311678cfd6
commit d791408793
87 changed files with 24687 additions and 6126 deletions

@ -0,0 +1,31 @@
// Copyright (c) Tribufu. All Rights Reserved.
// SPDX-License-Identifier: UNLICENSED
using dotenv.net;
using Tribufu.Generated.Client;
namespace Tribufu.Test
{
public static class Program
{
public static async Task Main(string[] args)
{
DotEnv.Load(new DotEnvOptions(ignoreExceptions: true, envFilePaths: [".env", "../../.env"]));
var apiKey = Environment.GetEnvironmentVariable("TRIBUFU_API_KEY");
var tribufu = new TribufuApi(apiKey ?? "");
Console.WriteLine(TribufuApi.GetVersion());
try
{
var result = await tribufu.GetUserInfoAsync();
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine(e.Message);
}
}
}
}