Migrate to new tribufu project structure (#2)

* Migrate to new tribufu project structure

* Update .gitignore

* Remove old api files

* Update Directory.Build.props

* Rename solution
This commit is contained in:
Guilherme Werner 2026-06-21 12:27:05 -03:00 committed by GitHub
parent be25ee8fe3
commit 7e8e192dc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
115 changed files with 41 additions and 262 deletions

View file

@ -0,0 +1,36 @@
// Copyright (c) Tribufu. All Rights Reserved.
// SPDX-License-Identifier: MIT
using dotenv.net;
using System;
using System.Threading.Tasks;
using Tribufu.Client;
using Tribufu.Logging;
namespace Tribufu.Test
{
public static class Program
{
public static async Task Main(string[] args)
{
Logger.Initialize(LogLevel.Trace);
DotEnv.Load(new DotEnvOptions(ignoreExceptions: true, envFilePaths: [".env", "../../.env"]));
var apiKey = Environment.GetEnvironmentVariable("TRIBUFU_API_KEY");
var tribufu = new TribufuApi(apiKey ?? "");
Logger.Debug(TribufuApi.GetUserAgent());
try
{
var result = await tribufu.GetUserInfoAsync();
Logger.Debug(result.ToString());
}
catch (ApiException e)
{
Logger.Debug(e.Message);
}
}
}
}

View file

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="dotenv.net" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tribufu.Logging\Tribufu.Logging.csproj" />
<ProjectReference Include="..\Tribufu\Tribufu.csproj" />
</ItemGroup>
</Project>