mirror of
https://github.com/Tribufu/TribufuDotNet
synced 2026-08-08 20:31:06 +00:00
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:
parent
be25ee8fe3
commit
7e8e192dc3
115 changed files with 41 additions and 262 deletions
|
|
@ -1,36 +0,0 @@
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue